[JIRA] (JENKINS-60044) mavenConsole tool doesn't extract compile warnings

6 views
Skip to first unread message

james@howeswho.co.uk (JIRA)

unread,
Nov 4, 2019, 12:10:02 PM11/4/19
to jenkinsc...@googlegroups.com
James Howe created an issue
 
Jenkins / Bug JENKINS-60044
mavenConsole tool doesn't extract compile warnings
Issue Type: Bug Bug
Assignee: Ulli Hafner
Attachments: image-2019-11-04-17-08-44-596.png
Components: warnings-ng-plugin
Created: 2019-11-04 17:09
Environment: Jenkins 2.190.2
Warnings 7.1.0
Maven 3.6.2
Priority: Major Major
Reporter: James Howe

I have a build that logs multiple warnings across multiple maven executions. However the warning plugin is only picking up the warnings from add-resource and test, not compile nor testCompile.

recordIssues tool: mavenConsole(),
             qualityGates: [[threshold: 1, type: 'TOTAL', unstable: true]]
Console log (abbreviated)
[INFO] --- license-maven-plugin:2.0.0:add-third-party (default) @ project ---
[WARNING] 
[WARNING] licenseMerges will be overridden by licenseMergesUrl.
[WARNING] 
[INFO] Writing third-party file to /var/lib/jenkins/node/workspace/job/target/generated-sources/license/THIRD-PARTY.tsv
[INFO] 
[INFO] --- build-helper-maven-plugin:3.0.0:add-resource (add-resources) @ project ---
[INFO] 
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ project ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 31 resources
[INFO] Copying 0 resource
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ project ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 94 source files to /var/lib/jenkins/node/workspace/job/target/classes
[WARNING] /var/lib/jenkins/node/workspace/job/src/main/java/com/example/ResourceServerConfig.java:[20,19] org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerProperties in org.springframework.boot.autoconfigure.security.oauth2.resource has been deprecated
...
[INFO] 
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ project ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 10 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ project ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 37 source files to /var/lib/jenkins/node/workspace/job/target/test-classes
[WARNING] /var/lib/jenkins/node/workspace/job/src/test/java/com/example/AuthorizationServerTests.java:[148,59] APPLICATION_JSON_UTF8 in org.springframework.http.MediaType has been deprecated
...
[INFO] Results:
[INFO] 
[WARNING] Tests run: 233, Failures: 0, Errors: 0, Skipped: 1
[INFO] 
...

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

ullrich.hafner@gmail.com (JIRA)

unread,
Nov 4, 2019, 1:55:03 PM11/4/19
to jenkinsc...@googlegroups.com
Ulli Hafner updated Bug JENKINS-60044
 

This is intentional. There are specific parsers for the compile goal. In your case the Java parser will find these warnings. All other warnings are picked up by the maven console parser.

Change By: Ulli Hafner
Status: Open Fixed but Unreleased
Resolution: Not A Defect

ullrich.hafner@gmail.com (JIRA)

unread,
Nov 4, 2019, 1:56:03 PM11/4/19
to jenkinsc...@googlegroups.com

james@howeswho.co.uk (JIRA)

unread,
Nov 4, 2019, 2:55:03 PM11/4/19
to jenkinsc...@googlegroups.com
James Howe commented on Bug JENKINS-60044
 
Re: mavenConsole tool doesn't extract compile warnings

Ah, that's quite surprising behaviour.

 

ullrich.hafner@gmail.com (JIRA)

unread,
Nov 4, 2019, 4:39:02 PM11/4/19
to jenkinsc...@googlegroups.com

Typically, maven users have both parsers installed. In this case it would be surprising to see the same warning twice. Additionally, maven warnings and compiler warnings share no common properties. (Example: https://ci.jenkins.io/job/Plugins/job/warnings-ng-plugin/job/master/629/)

james@howeswho.co.uk (JIRA)

unread,
Nov 5, 2019, 5:48:02 AM11/5/19
to jenkinsc...@googlegroups.com

Well that's why I didn't add the Java parser, because I'm using Maven, which has a different output format to javac.
Ah well. Solved now.

Reply all
Reply to author
Forward
0 new messages