Skip to content

Commit

Permalink
change target to jdk8. #2146
Browse files Browse the repository at this point in the history
  • Loading branch information
hengyunabc committed Apr 23, 2023
1 parent acd9844 commit 8834a0f
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 193 deletions.
34 changes: 2 additions & 32 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
run: mvn clean package -P full
10 changes: 0 additions & 10 deletions agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@
<build>
<finalName>arthas-agent</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down
15 changes: 0 additions & 15 deletions arthas-agent-attach/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,4 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
</plugins>
</build>

</project>
10 changes: 0 additions & 10 deletions boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@
<build>
<finalName>arthas-boot</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down
10 changes: 0 additions & 10 deletions client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@
<build>
<finalName>arthas-client</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down
12 changes: 0 additions & 12 deletions common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,6 @@
<!-- This module can not add any dependencies -->
<build>
<finalName>arthas-common</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
</plugins>
</build>

</project>
11 changes: 0 additions & 11 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,6 @@
<build>
<finalName>arthas-core</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down
10 changes: 0 additions & 10 deletions math-game/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@
<build>
<finalName>math-game</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand Down
16 changes: 0 additions & 16 deletions memorycompiler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,4 @@
</dependency>
</dependencies>

<build>
<finalName>arthas-agent</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
</plugins>
</build>

</project>
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
<properties>
<revision>3.6.8</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.6</maven.compiler.target>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<spring-boot.version>2.7.0</spring-boot.version>
<maven-invoker-plugin.version>3.0.0</maven-invoker-plugin.version>
<project.build.outputTimestamp>2020-09-27T15:10:43Z</project.build.outputTimestamp>
Expand Down Expand Up @@ -170,7 +170,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.28.2</version>
<version>4.11.0</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -209,13 +209,13 @@
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>1.11.6</version>
<version>1.14.4</version>
</dependency>

<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
<version>1.11.6</version>
<version>1.14.4</version>
</dependency>

<dependency>
Expand Down
12 changes: 0 additions & 12 deletions spy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,6 @@

<build>
<finalName>arthas-spy</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
</plugins>
</build>

</project>
14 changes: 0 additions & 14 deletions testcase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,4 @@
<artifactId>junit</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
</project>
16 changes: 0 additions & 16 deletions tunnel-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,4 @@

</dependencies>

<build>
<finalName>arthas-tunnel-client</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
</plugins>
</build>

</project>
16 changes: 0 additions & 16 deletions tunnel-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,4 @@

</dependencies>

<build>
<finalName>arthas-tunnel-common</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
</plugins>
</build>

</project>

0 comments on commit 8834a0f

Please sign in to comment.