Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions hotswap-agent-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,6 @@
<profile>
<id>default-tools</id>
<activation>
<os>
<family>!mac</family>
</os>
<jdk>(,1.11)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>${java.version}</version>
<scope>system</scope>
<optional>true</optional>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
<profile>
<id>mac-tools</id>
<activation>
<os>
<family>mac</family>
</os>
<jdk>(,1.11)</jdk>
</activation>
<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static void agentmain(String args, Instrumentation inst) {

public static void premain(String args, Instrumentation inst) {
parseArgs(args);
LOGGER.info("Loading Hotswap agent {{}} - unlimited runtime class redefinition.", Version.version());
LOGGER.info("Loading Hotswap agent {} - unlimited runtime class redefinition.", Version.version());
fixJboss7Modules();
PluginManager.getInstance().init(inst);
LOGGER.debug("Hotswap agent initialized.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ public static boolean isClassLoderStarted(ClassLoader classLoader) {
boolean isStarted;
if ("org.apache.catalina.loader.WebappClassLoaderBase".equals(clazz.getSuperclass().getName())) {
clazz = clazz.getSuperclass();
isStarted = "STARTED".equals((String) ReflectionHelper.invoke(classLoader, clazz, "getStateName", new Class[] {}, null));
isStarted = "STARTED".equals((String) ReflectionHelper.invoke(classLoader, clazz, "getStateName", new Class[] {}));
} else {
isStarted = (boolean) ReflectionHelper.invoke(classLoader, clazz, "isStarted", new Class[] {}, null);
isStarted = (boolean) ReflectionHelper.invoke(classLoader, clazz, "isStarted", new Class[] {});
}
return isStarted;
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package org.hotswap.agent.logging;

import org.hamcrest.text.StringContains;
import org.hamcrest.core.StringContains;
import org.hotswap.agent.config.PluginManager;
import org.jmock.Expectations;
import org.jmock.Mockery;
Expand Down
32 changes: 20 additions & 12 deletions hotswap-agent-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<version>3.14.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
Expand All @@ -58,24 +58,24 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<version>3.9.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.15</version>
<version>3.5.4</version>
<configuration>
<argLine>-XX:+AllowEnhancedClassRedefinition</argLine>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.17</version>
<version>3.5.4</version>
<executions>
<execution>
<goals>
Expand Down Expand Up @@ -160,15 +160,15 @@
<useManifestOnlyJar>false</useManifestOnlyJar>
<argLine>-javaagent:${org.hotswapagent:hotswap-agent-core:jar} -Xbootclasspath/a:"${org.hotswapagent:hotswap-agent-core:jar}:${project.build.OutputDirectory}"</argLine>
-->
<argLine>${dcevm.test.arguments} -javaagent:${org.hotswapagent:hotswap-agent-core:jar}</argLine>
<argLine>${dcevm.test.arguments} -javaagent:${project.basedir}/../../hotswap-agent-core/target/hotswap-agent-core-${project.version}.jar</argLine>
<jvm>${java.home}/bin/java</jvm>
</configuration>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.2.2</version>
<version>1.7.3</version>
<configuration>
<flattenMode>minimum</flattenMode>
</configuration>
Expand Down Expand Up @@ -276,7 +276,7 @@
<profile>
<id>default-tools</id>
<activation>
<jdk>11</jdk>
<jdk>(,11)</jdk>
</activation>

<dependencyManagement>
Expand All @@ -301,29 +301,37 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jmock</groupId>
<artifactId>jmock-junit4</artifactId>
<version>2.6.0</version>
<version>2.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jmock</groupId>
<artifactId>jmock-legacy</artifactId>
<version>2.6.0</version>
<version>2.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>9.9</version>
<scope>test</scope>
</dependency>

</dependencies>
</dependencyManagement>

<properties>
<revision>2.0.2</revision>
<dcevm>dcevm</dcevm>
<dcevm.test.arguments>-XX:+AllowEnhancedClassRedefinition -XX:HotswapAgent=external
--add-exports java.base/sun.security.action=ALL-UNNAMED
--add-exports java.base/sun.security.util=ALL-UNNAMED
--add-opens java.base/java.lang.reflect=ALL-UNNAMED
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED</dcevm.test.arguments>
<project.build.outputEncoding>UTF-8</project.build.outputEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
8 changes: 4 additions & 4 deletions plugin/hotswap-agent-deltaspike-jakarta-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemProperties>
<systemPropertyVariables>
<cdicontainer.version>${cdicontainer.version}</cdicontainer.version>
</systemProperties>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
Expand Down Expand Up @@ -233,9 +233,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemProperties>
<systemPropertyVariables>
<cdicontainer.version>${cdicontainer.version}</cdicontainer.version>
</systemProperties>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
Expand Down
14 changes: 7 additions & 7 deletions plugin/hotswap-agent-deltaspike-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemProperties>
<systemPropertyVariables>
<cdicontainer.version>${cdicontainer.version}</cdicontainer.version>
</systemProperties>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
Expand All @@ -250,7 +250,7 @@
</activation>

<properties>
<owb.version>2.0.13</owb.version>
<owb.version>2.0.28</owb.version>
<cdicontainer.version>owb-${owb.version}</cdicontainer.version>
</properties>

Expand Down Expand Up @@ -318,9 +318,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemProperties>
<systemPropertyVariables>
<cdicontainer.version>${cdicontainer.version}</cdicontainer.version>
</systemProperties>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
Expand Down Expand Up @@ -364,9 +364,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemProperties>
<systemPropertyVariables>
<cdicontainer.version>${cdicontainer.version}</cdicontainer.version>
</systemProperties>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
Expand Down
19 changes: 17 additions & 2 deletions plugin/hotswap-agent-mybatis-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
<artifactId>hotswap-agent-core</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${org.springframework.version}</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
Expand Down Expand Up @@ -108,5 +112,16 @@
</dependency>

</dependencies>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ public void hotswapPrototypeTestNotFailWhenHoldingInstanceBecauseSingletonInject
@Test
public void newBeanClassIsManagedBeanReRunTestOnlyAfterMvnClean() throws Exception {
try {
ClassFile.MAJOR_VERSION = ClassFile.JAVA_11; // hack, ASM9 does not support java17 (owb 2.0.26)
OwbJakartaPlugin.isTestEnvironment = true;
Class<?> clazz = getClass();
String path = clazz.getResource(clazz.getSimpleName() + ".class")
Expand Down
2 changes: 1 addition & 1 deletion plugin/hotswap-agent-owb-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<artifactId>hotswap-agent-owb-plugin</artifactId>

<properties>
<owb.version>2.0.13</owb.version>
<owb.version>2.0.28</owb.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ public void hotswapPrototypeTestNotFailWhenHoldingInstanceBecauseSingletonInject
@Test
public void newBeanClassIsManagedBeanReRunTestOnlyAfterMvnClean() throws Exception {
try {
ClassFile.MAJOR_VERSION = ClassFile.JAVA_11; // hack, ASM9 does not support java17 (owb 2.0.26)
OwbPlugin.isTestEnvironment = true;
Class<?> clazz = getClass();
String path = clazz.getResource(clazz.getSimpleName() + ".class")
Expand Down
35 changes: 32 additions & 3 deletions plugin/hotswap-agent-proxy-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<artifactId>hotswap-agent-proxy-plugin</artifactId>

<properties>
<org.springframework.version>5.3.30</org.springframework.version>
<org.springframework.version>5.3.39</org.springframework.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -41,13 +41,13 @@
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>7.0</version>
<version>9.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>7.0</version>
<version>9.9</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -64,5 +64,34 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>jdk9+</id>
<activation>
<jdk>[1.9,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkCount>1</forkCount>
<reuseForks>false</reuseForks>
<argLine>
-XX:+AllowEnhancedClassRedefinition
-XX:HotswapAgent=external
-Xlog:redefine+class*=info
--add-exports java.base/sun.security.action=ALL-UNNAMED
--add-exports java.base/sun.security.util=ALL-UNNAMED
--add-opens java.base/java.lang.reflect=ALL-UNNAMED
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
-Dblank
-javaagent:${project.basedir}/../../hotswap-agent-core/target/hotswap-agent-core-${project.version}.jar
</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>

</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Type;
import org.objectweb.asm.commons.AnnotationRemapper;
import org.objectweb.asm.commons.ClassRemapper;
import org.objectweb.asm.commons.MethodRemapper;
import org.objectweb.asm.commons.Remapper;
import org.objectweb.asm.commons.RemappingAnnotationAdapter;
import org.objectweb.asm.commons.RemappingMethodAdapter;

/**
* @author Ivan Dubrov
Expand Down Expand Up @@ -89,7 +89,7 @@ public String getClassName() {

protected MethodVisitor createRemappingMethodAdapter(int access,
String newDesc, MethodVisitor mv) {
return new RemappingMethodAdapter(access, newDesc, mv, remapper) {
return new MethodRemapper(mv, remapper) {
@Override
public void visitMethodInsn(int opcode, String owner, String name,
String desc, boolean itf) {
Expand All @@ -115,7 +115,7 @@ public AnnotationVisitor visitAnnotation(final String desc,
AnnotationVisitor av = super.visitAnnotation(remapper.mapDesc(desc),
visible);
return av == null ? null
: new RemappingAnnotationAdapter(av, remapper) {
: new AnnotationRemapper(av, remapper) {
@Override
public void visitEnum(String name, String enumDesc,
String value) {
Expand Down
Loading