diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9825ca7ab2d..8bff96d1e0b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [8, 11] + java: [8, 11, 17, 19] steps: - uses: actions/checkout@v3 - name: Setup java @@ -49,34 +49,4 @@ jobs: distribution: 'zulu' cache: 'maven' - name: Build with Maven - run: mvn clean package -P full - - ubuntu_build_jdk_ge_12: - runs-on: ubuntu-latest - strategy: - matrix: - # https://static.azul.com/zulu/bin/ - java: [12, 13, 14 , 17, 18, 19] - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 1.8 - uses: actions/setup-java@v3 - with: - java-version: 8 - distribution: 'zulu' - cache: 'maven' - - name: save java8 home - run: | - export JAVA8_HOME=$JAVA_HOME && echo $JAVA8_HOME - echo "export JAVA8_HOME=$JAVA_HOME" > ~/.testenv - - - name: Setup java - uses: actions/setup-java@v3 - with: - java-version: ${{ matrix.java }} - distribution: 'zulu' - cache: 'maven' - - name: Build with Maven - run: | - source ~/.testenv - mvn -Dmaven.compiler.fork=true -Dmaven.compiler.executable=$JAVA8_HOME/bin/javac -DJAVA8_HOME=$JAVA8_HOME clean package -P full \ No newline at end of file + run: mvn clean package -P full \ No newline at end of file diff --git a/agent/pom.xml b/agent/pom.xml index eaa2d5e6490..5752d7bae45 100644 --- a/agent/pom.xml +++ b/agent/pom.xml @@ -28,16 +28,6 @@ arthas-agent - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - UTF-8 - true - - org.apache.maven.plugins maven-assembly-plugin diff --git a/arthas-agent-attach/pom.xml b/arthas-agent-attach/pom.xml index ba7387b412b..8c1464bc5fa 100644 --- a/arthas-agent-attach/pom.xml +++ b/arthas-agent-attach/pom.xml @@ -34,19 +34,4 @@ - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - UTF-8 - true - - - - - diff --git a/boot/pom.xml b/boot/pom.xml index 9235f89d2c8..56c9a559ab8 100644 --- a/boot/pom.xml +++ b/boot/pom.xml @@ -31,16 +31,6 @@ arthas-boot - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - UTF-8 - true - - org.apache.maven.plugins maven-assembly-plugin diff --git a/client/pom.xml b/client/pom.xml index 88b6b67fbb8..77fb6b703ab 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -15,16 +15,6 @@ arthas-client - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - UTF-8 - true - - org.apache.maven.plugins maven-assembly-plugin diff --git a/common/pom.xml b/common/pom.xml index cf2c6967750..025c28692d5 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -14,18 +14,6 @@ arthas-common - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - UTF-8 - true - - - diff --git a/core/pom.xml b/core/pom.xml index 6899d764cce..94491e45a94 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -18,17 +18,6 @@ arthas-core - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - UTF-8 - true - - - org.apache.maven.plugins maven-shade-plugin diff --git a/core/src/test/java/com/taobao/arthas/core/server/ArthasBootstrapTest.java b/core/src/test/java/com/taobao/arthas/core/server/ArthasBootstrapTest.java index 93ea81f27ee..b878ac577f8 100644 --- a/core/src/test/java/com/taobao/arthas/core/server/ArthasBootstrapTest.java +++ b/core/src/test/java/com/taobao/arthas/core/server/ArthasBootstrapTest.java @@ -3,13 +3,14 @@ import static org.assertj.core.api.Assertions.assertThat; import java.lang.instrument.Instrumentation; +import java.lang.reflect.Field; import org.jboss.modules.ModuleClassLoader; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; -import org.mockito.internal.util.reflection.FieldSetter; +import com.alibaba.bytekit.utils.ReflectionUtils; import com.taobao.arthas.common.JavaVersionUtils; import com.taobao.arthas.core.bytecode.TestHelper; import com.taobao.arthas.core.config.Configure; @@ -40,9 +41,13 @@ public void test() throws Exception { Configure configure = Mockito.mock(Configure.class); Mockito.when(configure.getEnhanceLoaders()) .thenReturn("java.lang.ClassLoader,org.jboss.modules.ConcurrentClassLoader"); - FieldSetter.setField(arthasBootstrap, ArthasBootstrap.class.getDeclaredField("configure"), configure); - FieldSetter.setField(arthasBootstrap, ArthasBootstrap.class.getDeclaredField("instrumentation"), - instrumentation); + Field configureField = ArthasBootstrap.class.getDeclaredField("configure"); + configureField.setAccessible(true); + ReflectionUtils.setField(configureField, arthasBootstrap, configure); + + Field instrumentationField = ArthasBootstrap.class.getDeclaredField("instrumentation"); + instrumentationField.setAccessible(true); + ReflectionUtils.setField(instrumentationField, arthasBootstrap, instrumentation); org.jboss.modules.ModuleClassLoader moduleClassLoader = Mockito.mock(ModuleClassLoader.class); diff --git a/math-game/pom.xml b/math-game/pom.xml index dc91b4b3af5..02de79e12f0 100644 --- a/math-game/pom.xml +++ b/math-game/pom.xml @@ -14,16 +14,6 @@ math-game - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - UTF-8 - true - - org.apache.maven.plugins maven-jar-plugin diff --git a/memorycompiler/pom.xml b/memorycompiler/pom.xml index 5af5df2dbcf..d20283e04c7 100644 --- a/memorycompiler/pom.xml +++ b/memorycompiler/pom.xml @@ -36,20 +36,4 @@ - - arthas-agent - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - UTF-8 - true - - - - - diff --git a/pom.xml b/pom.xml index 795ba07655b..0347b4590b2 100644 --- a/pom.xml +++ b/pom.xml @@ -79,8 +79,8 @@ 3.6.8 UTF-8 - 1.6 - 1.6 + 1.8 + 1.8 2.7.0 3.0.0 2020-09-27T15:10:43Z @@ -170,7 +170,7 @@ org.mockito mockito-core - 2.28.2 + 4.11.0 test @@ -209,13 +209,13 @@ net.bytebuddy byte-buddy - 1.11.6 + 1.14.4 net.bytebuddy byte-buddy-agent - 1.11.6 + 1.14.4 diff --git a/spy/pom.xml b/spy/pom.xml index 118e1b227c2..05c42c5fe30 100644 --- a/spy/pom.xml +++ b/spy/pom.xml @@ -23,18 +23,6 @@ arthas-spy - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - UTF-8 - true - - - diff --git a/testcase/pom.xml b/testcase/pom.xml index d0007fceb12..73b635d40c4 100644 --- a/testcase/pom.xml +++ b/testcase/pom.xml @@ -17,18 +17,4 @@ junit - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - UTF-8 - - - - diff --git a/tunnel-client/pom.xml b/tunnel-client/pom.xml index 2334eaae7af..968eeb74b67 100644 --- a/tunnel-client/pom.xml +++ b/tunnel-client/pom.xml @@ -59,20 +59,4 @@ - - arthas-tunnel-client - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - UTF-8 - true - - - - - diff --git a/tunnel-common/pom.xml b/tunnel-common/pom.xml index c5a9a22043c..8a80f027087 100644 --- a/tunnel-common/pom.xml +++ b/tunnel-common/pom.xml @@ -16,20 +16,4 @@ - - arthas-tunnel-common - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.6 - 1.6 - UTF-8 - true - - - - -