From 75fcea8ce57d6cdfe2f31688f14adcaca93b28fc Mon Sep 17 00:00:00 2001 From: zhangping17 Date: Thu, 21 Sep 2023 17:06:07 +0800 Subject: [PATCH] fixes #728 --- jcommon/codecheck/pom.xml | 20 ++++++++++++++++++ jcommon/es/pom.xml | 6 +++--- jcommon/graalvm/pom.xml | 4 ++-- .../youpin/infra/rpc/errors/ErrorCode.java | 3 +-- .../youpin/infra/rpc/errors/ErrorScope.java | 3 +-- jcommon/jmonitor/pom.xml | 21 +++++++++++++++++++ jcommon/monitor/pom.xml | 20 ++++++++++++++++++ .../mv-plugin/codecheck-maven-plugin/pom.xml | 8 +++---- .../mv-plugin/jarcheck-maven-plugin/pom.xml | 8 +++---- jcommon/mv-plugin/native-plugin/pom.xml | 2 +- jcommon/pom.xml | 7 +++---- jcommon/processor/pom.xml | 14 ++++++++++--- jcommon/prometheus/prometheus-client/pom.xml | 4 ++-- .../prometheus/prometheus-trace-etl/pom.xml | 4 ++-- jcommon/rcurve/pom.xml | 17 +++++++++++++++ 15 files changed, 112 insertions(+), 29 deletions(-) diff --git a/jcommon/codecheck/pom.xml b/jcommon/codecheck/pom.xml index 7e4227707..61aa086ac 100644 --- a/jcommon/codecheck/pom.xml +++ b/jcommon/codecheck/pom.xml @@ -26,4 +26,24 @@ 3.7 + + + + + maven-compiler-plugin + 3.11.0 + + 20 + 20 + UTF-8 + + --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + + + + + diff --git a/jcommon/es/pom.xml b/jcommon/es/pom.xml index b03ef7a44..734d620d9 100644 --- a/jcommon/es/pom.xml +++ b/jcommon/es/pom.xml @@ -70,10 +70,10 @@ maven-compiler-plugin - 3.10.1 + 3.11.0 - 1.8 - 1.8 + 20 + 20 true UTF-8 diff --git a/jcommon/graalvm/pom.xml b/jcommon/graalvm/pom.xml index 1771ec947..63f76ede7 100644 --- a/jcommon/graalvm/pom.xml +++ b/jcommon/graalvm/pom.xml @@ -63,8 +63,8 @@ maven-compiler-plugin - 8 - 8 + 20 + 20 diff --git a/jcommon/infra-result/src/main/java/com/xiaomi/youpin/infra/rpc/errors/ErrorCode.java b/jcommon/infra-result/src/main/java/com/xiaomi/youpin/infra/rpc/errors/ErrorCode.java index 492d375fb..1884b41c0 100644 --- a/jcommon/infra-result/src/main/java/com/xiaomi/youpin/infra/rpc/errors/ErrorCode.java +++ b/jcommon/infra-result/src/main/java/com/xiaomi/youpin/infra/rpc/errors/ErrorCode.java @@ -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; @@ -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."); } diff --git a/jcommon/infra-result/src/main/java/com/xiaomi/youpin/infra/rpc/errors/ErrorScope.java b/jcommon/infra-result/src/main/java/com/xiaomi/youpin/infra/rpc/errors/ErrorScope.java index fd6177d86..283020b25 100644 --- a/jcommon/infra-result/src/main/java/com/xiaomi/youpin/infra/rpc/errors/ErrorScope.java +++ b/jcommon/infra-result/src/main/java/com/xiaomi/youpin/infra/rpc/errors/ErrorScope.java @@ -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; @@ -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; } diff --git a/jcommon/jmonitor/pom.xml b/jcommon/jmonitor/pom.xml index b4c308cdb..0ed4db608 100644 --- a/jcommon/jmonitor/pom.xml +++ b/jcommon/jmonitor/pom.xml @@ -11,4 +11,25 @@ + + + + + maven-compiler-plugin + 3.11.0 + + 20 + 20 + UTF-8 + + --add-modules=jdk.jcmd + --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED + --add-exports=jdk.jcmd/sun.tools.jps=ALL-UNNAMED + --add-exports=jdk.jcmd/sun.tools.jstat=ALL-UNNAMED + --add-exports=jdk.jcmd/sun.tools.jstack=ALL-UNNAMED + + + + + diff --git a/jcommon/monitor/pom.xml b/jcommon/monitor/pom.xml index 9bcef8e34..9d19f1b88 100644 --- a/jcommon/monitor/pom.xml +++ b/jcommon/monitor/pom.xml @@ -15,4 +15,24 @@ 1.4-jdk20-SNAPSHOT + + + + + maven-compiler-plugin + 3.11.0 + + 20 + 20 + UTF-8 + + --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED + --add-exports=jdk.jcmd/sun.tools.jps=ALL-UNNAMED + --add-exports=jdk.jcmd/sun.tools.jstack=ALL-UNNAMED + --add-exports=jdk.jcmd/sun.tools.jstat=ALL-UNNAMED + + + + + diff --git a/jcommon/mv-plugin/codecheck-maven-plugin/pom.xml b/jcommon/mv-plugin/codecheck-maven-plugin/pom.xml index 710901cab..1d3016a73 100644 --- a/jcommon/mv-plugin/codecheck-maven-plugin/pom.xml +++ b/jcommon/mv-plugin/codecheck-maven-plugin/pom.xml @@ -52,14 +52,14 @@ maven-plugin-plugin - 3.5.2 + 3.9.0 maven-compiler-plugin - 3.8.1 + 3.11.0 - 1.8 - 1.8 + 20 + 20 UTF-8 ${project.basedir}/src/main/java diff --git a/jcommon/mv-plugin/jarcheck-maven-plugin/pom.xml b/jcommon/mv-plugin/jarcheck-maven-plugin/pom.xml index 5ff4f9d27..b9cb56433 100644 --- a/jcommon/mv-plugin/jarcheck-maven-plugin/pom.xml +++ b/jcommon/mv-plugin/jarcheck-maven-plugin/pom.xml @@ -46,14 +46,14 @@ maven-plugin-plugin - 3.5.2 + 3.9.0 maven-compiler-plugin - 3.8.1 + 3.11.0 - 1.8 - 1.8 + 20 + 20 UTF-8 ${project.basedir}/src/main/java diff --git a/jcommon/mv-plugin/native-plugin/pom.xml b/jcommon/mv-plugin/native-plugin/pom.xml index 813cad17b..3fc7aef96 100644 --- a/jcommon/mv-plugin/native-plugin/pom.xml +++ b/jcommon/mv-plugin/native-plugin/pom.xml @@ -42,7 +42,7 @@ maven-plugin-plugin - 3.6.0 + 3.9.0 default-addPluginArtifactMetadata diff --git a/jcommon/pom.xml b/jcommon/pom.xml index f591a6520..f83fe4360 100644 --- a/jcommon/pom.xml +++ b/jcommon/pom.xml @@ -117,7 +117,6 @@ org.projectlombok lombok 1.18.28 - provided ch.qos.logback @@ -177,10 +176,10 @@ maven-compiler-plugin - 3.10.1 + 3.11.0 - 1.8 - 1.8 + 20 + 20 true UTF-8 diff --git a/jcommon/processor/pom.xml b/jcommon/processor/pom.xml index 0f877341e..fabca4fb5 100644 --- a/jcommon/processor/pom.xml +++ b/jcommon/processor/pom.xml @@ -34,12 +34,20 @@ maven-compiler-plugin - 3.10.1 + 3.11.0 - 1.8 - 1.8 + 20 + 20 UTF-8 -proc:none + + --add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + diff --git a/jcommon/prometheus/prometheus-client/pom.xml b/jcommon/prometheus/prometheus-client/pom.xml index 20e010113..afc89d8f3 100644 --- a/jcommon/prometheus/prometheus-client/pom.xml +++ b/jcommon/prometheus/prometheus-client/pom.xml @@ -18,8 +18,8 @@ org.apache.maven.plugins maven-compiler-plugin - 8 - 8 + 20 + 20 diff --git a/jcommon/prometheus/prometheus-trace-etl/pom.xml b/jcommon/prometheus/prometheus-trace-etl/pom.xml index 0ca544d3b..275d7f042 100644 --- a/jcommon/prometheus/prometheus-trace-etl/pom.xml +++ b/jcommon/prometheus/prometheus-trace-etl/pom.xml @@ -24,8 +24,8 @@ org.apache.maven.plugins maven-compiler-plugin - 8 - 8 + 20 + 20 diff --git a/jcommon/rcurve/pom.xml b/jcommon/rcurve/pom.xml index 191de5843..4314e3595 100644 --- a/jcommon/rcurve/pom.xml +++ b/jcommon/rcurve/pom.xml @@ -59,4 +59,21 @@ provided + + + + + maven-compiler-plugin + 3.11.0 + + + --enable-preview + + 20 + 20 + 20 + + + + \ No newline at end of file