Skip to content

Commit fb45843

Browse files
Refactor structure of project and bump plugins
1 parent 0b1de99 commit fb45843

File tree

17 files changed

+112
-88
lines changed

17 files changed

+112
-88
lines changed

hotswap-agent-core/pom.xml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,6 @@
1616
<profile>
1717
<id>default-tools</id>
1818
<activation>
19-
<os>
20-
<family>!mac</family>
21-
</os>
22-
<jdk>(,1.11)</jdk>
23-
</activation>
24-
<dependencies>
25-
<dependency>
26-
<groupId>com.sun</groupId>
27-
<artifactId>tools</artifactId>
28-
<version>${java.version}</version>
29-
<scope>system</scope>
30-
<optional>true</optional>
31-
<systemPath>${java.home}/../lib/tools.jar</systemPath>
32-
</dependency>
33-
</dependencies>
34-
</profile>
35-
<profile>
36-
<id>mac-tools</id>
37-
<activation>
38-
<os>
39-
<family>mac</family>
40-
</os>
4119
<jdk>(,1.11)</jdk>
4220
</activation>
4321
<dependencies>

hotswap-agent-core/src/main/java/org/hotswap/agent/HotswapAgent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public static void agentmain(String args, Instrumentation inst) {
6363

6464
public static void premain(String args, Instrumentation inst) {
6565
parseArgs(args);
66-
LOGGER.info("Loading Hotswap agent {{}} - unlimited runtime class redefinition.", Version.version());
66+
LOGGER.debug("Loading Hotswap agent {} - unlimited runtime class redefinition.", Version.version());
6767
fixJboss7Modules();
6868
PluginManager.getInstance().init(inst);
6969
LOGGER.debug("Hotswap agent initialized.");

hotswap-agent-core/src/main/java/org/hotswap/agent/util/classloader/ClassLoaderHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ public static boolean isClassLoderStarted(ClassLoader classLoader) {
8181
boolean isStarted;
8282
if ("org.apache.catalina.loader.WebappClassLoaderBase".equals(clazz.getSuperclass().getName())) {
8383
clazz = clazz.getSuperclass();
84-
isStarted = "STARTED".equals((String) ReflectionHelper.invoke(classLoader, clazz, "getStateName", new Class[] {}, null));
84+
isStarted = "STARTED".equals((String) ReflectionHelper.invoke(classLoader, clazz, "getStateName", new Class[] {}));
8585
} else {
86-
isStarted = (boolean) ReflectionHelper.invoke(classLoader, clazz, "isStarted", new Class[] {}, null);
86+
isStarted = (boolean) ReflectionHelper.invoke(classLoader, clazz, "isStarted", new Class[] {});
8787
}
8888
return isStarted;
8989
} catch (Exception e) {

hotswap-agent-core/src/test/java/org/hotswap/agent/logging/AgentLoggerHandlerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919
package org.hotswap.agent.logging;
2020

21-
import org.hamcrest.text.StringContains;
21+
import org.hamcrest.core.StringContains;
2222
import org.hotswap.agent.config.PluginManager;
2323
import org.jmock.Expectations;
2424
import org.jmock.Mockery;

hotswap-agent-parent/pom.xml

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<plugin>
5050
<groupId>org.apache.maven.plugins</groupId>
5151
<artifactId>maven-compiler-plugin</artifactId>
52-
<version>3.8.0</version>
52+
<version>3.14.1</version>
5353
<configuration>
5454
<source>1.8</source>
5555
<target>1.8</target>
@@ -58,24 +58,24 @@
5858
<plugin>
5959
<groupId>org.apache.maven.plugins</groupId>
6060
<artifactId>maven-dependency-plugin</artifactId>
61-
<version>2.8</version>
61+
<version>3.9.0</version>
6262
</plugin>
6363
<plugin>
6464
<groupId>org.apache.maven.plugins</groupId>
6565
<artifactId>maven-source-plugin</artifactId>
66-
<version>3.2.1</version>
66+
<version>3.3.1</version>
6767
</plugin>
6868
<plugin>
6969
<groupId>org.apache.maven.plugins</groupId>
7070
<artifactId>maven-surefire-plugin</artifactId>
71-
<version>2.15</version>
71+
<version>3.5.4</version>
7272
<configuration>
7373
<argLine>-XX:+AllowEnhancedClassRedefinition</argLine>
7474
</configuration>
7575
</plugin>
7676
<plugin>
7777
<artifactId>maven-failsafe-plugin</artifactId>
78-
<version>2.17</version>
78+
<version>3.5.4</version>
7979
<executions>
8080
<execution>
8181
<goals>
@@ -160,15 +160,15 @@
160160
<useManifestOnlyJar>false</useManifestOnlyJar>
161161
<argLine>-javaagent:${org.hotswapagent:hotswap-agent-core:jar} -Xbootclasspath/a:"${org.hotswapagent:hotswap-agent-core:jar}:${project.build.OutputDirectory}"</argLine>
162162
-->
163-
<argLine>${dcevm.test.arguments} -javaagent:${org.hotswapagent:hotswap-agent-core:jar}</argLine>
163+
<argLine>${dcevm.test.arguments} -javaagent:${project.basedir}/../../hotswap-agent-core/target/hotswap-agent-core-2.0.2.jar</argLine>
164164
<jvm>${java.home}/bin/java</jvm>
165165
</configuration>
166166
</plugin>
167167

168168
<plugin>
169169
<groupId>org.codehaus.mojo</groupId>
170170
<artifactId>flatten-maven-plugin</artifactId>
171-
<version>1.2.2</version>
171+
<version>1.7.3</version>
172172
<configuration>
173173
<flattenMode>minimum</flattenMode>
174174
</configuration>
@@ -276,7 +276,7 @@
276276
<profile>
277277
<id>default-tools</id>
278278
<activation>
279-
<jdk>11</jdk>
279+
<jdk>(,11)</jdk>
280280
</activation>
281281

282282
<dependencyManagement>
@@ -301,30 +301,39 @@
301301
<dependency>
302302
<groupId>junit</groupId>
303303
<artifactId>junit</artifactId>
304-
<version>4.13</version>
304+
<version>4.13.2</version>
305305
<scope>test</scope>
306306
</dependency>
307307
<dependency>
308308
<groupId>org.jmock</groupId>
309309
<artifactId>jmock-junit4</artifactId>
310-
<version>2.6.0</version>
310+
<version>2.13.1</version>
311311
<scope>test</scope>
312312
</dependency>
313313
<dependency>
314314
<groupId>org.jmock</groupId>
315315
<artifactId>jmock-legacy</artifactId>
316-
<version>2.6.0</version>
316+
<version>2.13.1</version>
317+
<scope>test</scope>
318+
</dependency>
319+
<dependency>
320+
<groupId>org.ow2.asm</groupId>
321+
<artifactId>asm</artifactId>
322+
<version>9.9</version>
317323
<scope>test</scope>
318324
</dependency>
319-
320325
</dependencies>
321326
</dependencyManagement>
322327

323328
<properties>
324329
<revision>2.0.2</revision>
325330
<dcevm>dcevm</dcevm>
326331
<dcevm.test.arguments>-XX:+AllowEnhancedClassRedefinition -XX:HotswapAgent=external
327-
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED</dcevm.test.arguments>
332+
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
333+
--add-opens java.base/sun.security.util=ALL-UNNAMED
334+
--add-opens java.base/sun.security.action=ALL-UNNAMED
335+
--add-opens java.base/java.lang.reflect=ALL-UNNAMED
336+
</dcevm.test.arguments>
328337
<project.build.outputEncoding>UTF-8</project.build.outputEncoding>
329338
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
330339
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

plugin/hotswap-agent-deltaspike-jakarta-plugin/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@
187187
<groupId>org.apache.maven.plugins</groupId>
188188
<artifactId>maven-surefire-plugin</artifactId>
189189
<configuration>
190-
<systemProperties>
190+
<systemPropertyVariables>
191191
<cdicontainer.version>${cdicontainer.version}</cdicontainer.version>
192-
</systemProperties>
192+
</systemPropertyVariables>
193193
</configuration>
194194
</plugin>
195195
</plugins>
@@ -233,9 +233,9 @@
233233
<groupId>org.apache.maven.plugins</groupId>
234234
<artifactId>maven-surefire-plugin</artifactId>
235235
<configuration>
236-
<systemProperties>
236+
<systemPropertyVariables>
237237
<cdicontainer.version>${cdicontainer.version}</cdicontainer.version>
238-
</systemProperties>
238+
</systemPropertyVariables>
239239
</configuration>
240240
</plugin>
241241
</plugins>

plugin/hotswap-agent-deltaspike-plugin/pom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,9 @@
232232
<groupId>org.apache.maven.plugins</groupId>
233233
<artifactId>maven-surefire-plugin</artifactId>
234234
<configuration>
235-
<systemProperties>
235+
<systemPropertyVariables>
236236
<cdicontainer.version>${cdicontainer.version}</cdicontainer.version>
237-
</systemProperties>
237+
</systemPropertyVariables>
238238
</configuration>
239239
</plugin>
240240
</plugins>
@@ -250,7 +250,7 @@
250250
</activation>
251251

252252
<properties>
253-
<owb.version>2.0.13</owb.version>
253+
<owb.version>2.0.28</owb.version>
254254
<cdicontainer.version>owb-${owb.version}</cdicontainer.version>
255255
</properties>
256256

@@ -318,9 +318,9 @@
318318
<groupId>org.apache.maven.plugins</groupId>
319319
<artifactId>maven-surefire-plugin</artifactId>
320320
<configuration>
321-
<systemProperties>
321+
<systemPropertyVariables>
322322
<cdicontainer.version>${cdicontainer.version}</cdicontainer.version>
323-
</systemProperties>
323+
</systemPropertyVariables>
324324
</configuration>
325325
</plugin>
326326
</plugins>
@@ -364,9 +364,9 @@
364364
<groupId>org.apache.maven.plugins</groupId>
365365
<artifactId>maven-surefire-plugin</artifactId>
366366
<configuration>
367-
<systemProperties>
367+
<systemPropertyVariables>
368368
<cdicontainer.version>${cdicontainer.version}</cdicontainer.version>
369-
</systemProperties>
369+
</systemPropertyVariables>
370370
</configuration>
371371
</plugin>
372372
</plugins>

plugin/hotswap-agent-mybatis-plugin/pom.xml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@
2525
<artifactId>hotswap-agent-core</artifactId>
2626
<version>${project.version}</version>
2727
</dependency>
28-
28+
<dependency>
29+
<groupId>org.springframework</groupId>
30+
<artifactId>spring-tx</artifactId>
31+
<version>${org.springframework.version}</version>
32+
</dependency>
2933
<dependency>
3034
<groupId>org.mybatis</groupId>
3135
<artifactId>mybatis</artifactId>
@@ -108,5 +112,16 @@
108112
</dependency>
109113

110114
</dependencies>
111-
115+
<build>
116+
<resources>
117+
<resource>
118+
<directory>src/main/resources</directory>
119+
</resource>
120+
</resources>
121+
<testResources>
122+
<testResource>
123+
<directory>src/test/resources</directory>
124+
</testResource>
125+
</testResources>
126+
</build>
112127
</project>

plugin/hotswap-agent-owb-jakarta-plugin/src/test/java/org/hotswap/agent/plugin/owb_jakarta/OwbJakartaPluginTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ public void hotswapPrototypeTestNotFailWhenHoldingInstanceBecauseSingletonInject
208208
@Test
209209
public void newBeanClassIsManagedBeanReRunTestOnlyAfterMvnClean() throws Exception {
210210
try {
211-
ClassFile.MAJOR_VERSION = ClassFile.JAVA_11; // hack, ASM9 does not support java17 (owb 2.0.26)
212211
OwbJakartaPlugin.isTestEnvironment = true;
213212
Class<?> clazz = getClass();
214213
String path = clazz.getResource(clazz.getSimpleName() + ".class")

plugin/hotswap-agent-owb-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<artifactId>hotswap-agent-owb-plugin</artifactId>
1212

1313
<properties>
14-
<owb.version>2.0.13</owb.version>
14+
<owb.version>2.0.28</owb.version>
1515
</properties>
1616

1717
<dependencies>

0 commit comments

Comments
 (0)