Skip to content

Commit

Permalink
fixes #728
Browse files Browse the repository at this point in the history
  • Loading branch information
caochengxiang committed Sep 21, 2023
1 parent f9f9903 commit 75fcea8
Show file tree
Hide file tree
Showing 15 changed files with 112 additions and 29 deletions.
20 changes: 20 additions & 0 deletions jcommon/codecheck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,24 @@
<version>3.7</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>20</source>
<target>20</target>
<encoding>UTF-8</encoding>
<compilerArgs>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
</project>
6 changes: 3 additions & 3 deletions jcommon/es/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.11.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>20</source>
<target>20</target>
<verbose>true</verbose>
<encoding>UTF-8</encoding>
<compilerArguments>
Expand Down
4 changes: 2 additions & 2 deletions jcommon/graalvm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
<source>20</source>
<target>20</target>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.xiaomi.youpin.infra.rpc.Result;
import com.xiaomi.youpin.infra.rpc.errors.ErrorScope;
import lombok.Getter;
import lombok.var;

import java.util.HashSet;
import java.util.Set;
Expand Down Expand Up @@ -45,7 +44,7 @@ public static ErrorCode createOnce(ErrorScope errorScope, int internalCode) {
if (internalCode < 0 || internalCode >= 1000) {
throw new IllegalArgumentException("Bad internal code range. " + internalCode);
}
var code = new ErrorCode(Integer.valueOf(String.format("%03d%03d%03d", ERROR_CODE_PREFIX, errorScope.getScopeId(), internalCode)));
ErrorCode code = new ErrorCode(Integer.valueOf(String.format("%03d%03d%03d", ERROR_CODE_PREFIX, errorScope.getScopeId(), internalCode)));
if (allCodes.contains(code.getCode())) {
throw new IllegalArgumentException("Duplicated error code defination.");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.xiaomi.youpin.infra.rpc.errors;

import lombok.Getter;
import lombok.var;

import java.util.Set;
import java.util.TreeSet;
Expand All @@ -26,7 +25,7 @@ public static ErrorScope createOnce(int scopeId) {
if (scopes.contains(scopeId)) {
throw new IllegalArgumentException("Duplicate scope id:" + scopeId);
}
var scope = new ErrorScope(scopeId);
ErrorScope scope = new ErrorScope(scopeId);
scopes.add(scopeId);
return scope;
}
Expand Down
21 changes: 21 additions & 0 deletions jcommon/jmonitor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,25 @@
<dependencies>

</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>20</source>
<target>20</target>
<encoding>UTF-8</encoding>
<compilerArgs>
<arg>--add-modules=jdk.jcmd</arg>
<arg>--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.jcmd/sun.tools.jps=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.jcmd/sun.tools.jstat=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.jcmd/sun.tools.jstack=ALL-UNNAMED</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
</project>
20 changes: 20 additions & 0 deletions jcommon/monitor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,24 @@
<version>1.4-jdk20-SNAPSHOT</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>20</source>
<target>20</target>
<encoding>UTF-8</encoding>
<compilerArgs>
<arg>--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.jcmd/sun.tools.jps=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.jcmd/sun.tools.jstack=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.jcmd/sun.tools.jstat=ALL-UNNAMED</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
</project>
8 changes: 4 additions & 4 deletions jcommon/mv-plugin/codecheck-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@
<plugins>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.5.2</version>
<version>3.9.0</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.11.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>20</source>
<target>20</target>
<encoding>UTF-8</encoding>
<compilerArguments>
<sourcepath>${project.basedir}/src/main/java</sourcepath>
Expand Down
8 changes: 4 additions & 4 deletions jcommon/mv-plugin/jarcheck-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@
<plugins>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.5.2</version>
<version>3.9.0</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.11.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>20</source>
<target>20</target>
<encoding>UTF-8</encoding>
<compilerArguments>
<sourcepath>${project.basedir}/src/main/java</sourcepath>
Expand Down
2 changes: 1 addition & 1 deletion jcommon/mv-plugin/native-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<plugins>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.6.0</version>
<version>3.9.0</version>
<executions>
<execution>
<id>default-addPluginArtifactMetadata</id>
Expand Down
7 changes: 3 additions & 4 deletions jcommon/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.28</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand Down Expand Up @@ -177,10 +176,10 @@
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.11.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>20</source>
<target>20</target>
<verbose>true</verbose>
<encoding>UTF-8</encoding>
<compilerArguments>
Expand Down
14 changes: 11 additions & 3 deletions jcommon/processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,20 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.11.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>20</source>
<target>20</target>
<encoding>UTF-8</encoding>
<compilerArgument>-proc:none</compilerArgument>
<compilerArgs>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
Expand Down
4 changes: 2 additions & 2 deletions jcommon/prometheus/prometheus-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
<source>20</source>
<target>20</target>
</configuration>
</plugin>
</plugins>
Expand Down
4 changes: 2 additions & 2 deletions jcommon/prometheus/prometheus-trace-etl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
<source>20</source>
<target>20</target>
</configuration>
</plugin>
</plugins>
Expand Down
17 changes: 17 additions & 0 deletions jcommon/rcurve/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,21 @@
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<compilerArgs>
<arg>--enable-preview</arg>
</compilerArgs>
<compilerVersion>20</compilerVersion>
<source>20</source>
<target>20</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 75fcea8

Please sign in to comment.