-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins 2.479.1
Analysis Model API Plugin 12.9.1
Maven 3.9.x
JDK 21
Having the following log output in jenkins the error prone parser does not detect warnings anymore
11:24:08 [WARNING] Picked up JAVA_TOOL_OPTIONS: -Duser.language=en -Duser.region=US -Dfile.encoding=UTF-8 -Djansi.force=true -Dmaven.ext.class.path="/foofoo_master@tmp/withMaven88890a94/pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/foofoo_master@tmp/withMaven88890a94" 11:24:08 /foofoo/app/src/main/java/foofoo/MonitorRepository.java:[29,7] [MissingOverride] deleteById implements method in CrudRepository; expected @Override 11:24:08 (see https://errorprone.info/bugpattern/MissingOverride) 11:24:08 Did you mean '@Override @Modifying(flushAutomatically = true, clearAutomatically = true)'? 11:24:08 [INFO] 11:24:08 [INFO] --- resources:3.3.1:testResources (default-testResources) @ app --- 11:24:08 [INFO] Copying 6 resources from src/test/resources to target/test-classes 11:24:08 [INFO] 11:24:08 [INFO] --- compiler:3.13.0:testCompile (default-testCompile) @ app --- 11:24:08 [INFO] Recompiling the module because of changed dependency. 11:24:08 [INFO] Compiling 58 source files with javac [forked debug parameters release 21] to target/test-classes 11:24:16 [WARNING] Picked up JAVA_TOOL_OPTIONS: -Duser.language=en -Duser.region=US -Dfile.encoding=UTF-8 -Djansi.force=true -Dmaven.ext.class.path="/foofoo_master@tmp/withMaven88890a94/pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/foofoo_master@tmp/withMaven88890a94" 11:24:16 /foofoo/app/src/test/java/foofoo/DeviceTestDataGenerator.java:[54,4] [BadImport] Importing nested classes/static methods/static fields with commonly-used names can make code harder to read, because it may not be clear from the context exactly which type is being referred to. Qualifying the name with that of the containing class can make the code clearer. Here we recommend using qualified class: FooModel. 11:24:16 (see https://errorprone.info/bugpattern/BadImport) 11:24:16 Did you mean 'FooModel.Builder builder = FooModel.newBuilder()'? 11:24:16 [INFO] 11:24:16 [INFO] --- jacoco:0.8.12:prepare-agent (pre-unit-test) @ app --- 11:24:16 [INFO] surefireArgLine set to -javaagent:/home/jenkins/agent/workspace/BA-RD-CIT_app-oneview_master/.repository/org/jacoco/org.jacoco.agent/0.8.12/org.jacoco.agent-0.8.12-runtime.jar=destfile=/foofoo_master/bar/app/target/coverage-reports/jacoco-ut.exec,excludes=**/*_.* 11:24:16 [INFO]
Looks like that the JAVA TOOLS OPTION warning somehow interfers with the logging
Maybe its also that we run errorProne as a separate maven step with the default compile just annotation processing and not compilation
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <executions> <execution> <id>default-compile</id><!-- runs only annotation processors, but need to override default id for intellij to recognize compiler args --> <phase>generate-sources</phase> <goals> <goal>compile</goal> </goals> <configuration> <skipMain>${skipAP}</skipMain> <compilerArgs> <arg>-implicit:class&lt;/arg><!-- set explicit for annotation processors --> <arg>-XprintProcessorInfo</arg><!-- Print information about which annotations a processor is asked to process --> <arg>-XprintRounds</arg><!-- Print information about initial and subsequent annotation processing rounds --> </compilerArgs> <proc>only</proc><!-- runs only annotation processors --> </configuration> </execution> <execution> <id>errorprone-compile</id> <phase>compile</phase> <goals> <goal>compile</goal> </goals> <configuration> <fork>true</fork> <annotationProcessorPaths> <path> <groupId>com.google.errorprone</groupId> <artifactId>error_prone_core</artifactId> <version>${version.error-prone}</version> </path> </annotationProcessorPaths> <compilerArgs combine.children="append"> <arg>-XDcompilePolicy=simple</arg><!-- recommended by error-prone --> <arg>--should-stop=ifError=FLOW</arg> <arg>-Xplugin:ErrorProne ${error-prone.flags}</arg> <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg> <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg> <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg> <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg> <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg> <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg> <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg> <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg> <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg> <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg> </compilerArgs> <generatedSourcesDirectory>${project.build.directory}/generated-sources/unused</generatedSourcesDirectory><!-- otherwise it ignores sources already available --> </configuration> </execution> </executions> </plugin>
Which tool reports the "Picked up JAVA_TOOL_OPTIONS:" message? javac? ErrorProne javac plugin? It looks like the process that creates the log is broken and not the warnings plugins that reads these broken lines.