Details
-
Bug
-
Status: Resolved (View Workflow)
-
Major
-
Resolution: Fixed
-
Windows 7 x64 with Java SE 8u20, CentOS 6.5 with Java SE 7u55
Description
I created the jenkins project with ant build for java sources.
Install Warnings plugin, and add post-build action scan for compiler warnings.
To select parser for ant java, but there are no parser in the parser drop down list.
(screen capture attached.)
There are two javac parser, "Java Compiler(Eclipse)" and "Java Compiler(javac)".
I selected the later one, then no warning is reported in the ant build.
The console output sample is as follows:
[javac] Compiling 2 source files to C:\Users\momo\.jenkins\jobs\GoodMorningMrJenkins\workspace\app\Java8Lambdas\Album\build\classes
[javac] C:\Users\momo\.jenkins\jobs\GoodMorningMrJenkins\workspace\app\Java8Lambdas\Album\src\music\album\Artist.java:65: warning: [deprecation] getDate() in Date has been deprecated
[javac] int d = new Date().getDate();
[javac] ^
[javac] C:\Users\momo\.jenkins\jobs\GoodMorningMrJenkins\workspace\app\Java8Lambdas\Album\src\music\album\Artist.java:67: warning: [unchecked] unchecked call to add(E) as a member of the raw type List
[javac] list.add("Warning?");
[javac] ^
[javac] where E is a type-variable:
[javac] E extends Object declared in interface List
[javac] 2 warnings
Java Compiler(javac) parser cannot capture these warnings.
I found a AntJavaParser.java source file in Warnings plugin source files.
https://github.com/jenkinsci/warnings-plugin/blob/master/src/main/java/hudson/plugins/warnings/parser/AntJavacParser.java
This file seemed to define a proper regular expression for ant javac output.
It should be in parser seletion list like a "Java Compiler(Ant)".
Code changed in jenkins
User: Ulli Hafner
Path:
.idea/libraries/Maven__org_apache_commons_commons_lang3_3_1.xml
analysis-core
tasks
http://jenkins-ci.org/commit/analysis-suite-plugin/db3e86644600ecedef1315cc00291d2003f154b6
Log:
[FIXED JENKINS-24611] Use default encoding when reading the console log.