Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-24611

Warnings plugin, missing AntJavaParser in the parser selection list


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • warnings-plugin
    • Windows 7 x64 with Java SE 8u20, CentOS 6.5 with Java SE 7u55

      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.

      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)".

        1. 24611_case1.log
          33 kB
        2. 24611_case2.log
          33 kB
        3. 24611_case3.log
          32 kB
        4. 24611_case4.log
          32 kB
        5. mvn-test.log
          46 kB
        6. mvn-test.log
          46 kB
        7. parserlist.png
          39 kB

            drulli Ulli Hafner
            momotaro Toru Takahashi
            0 Vote for this issue
            3 Start watching this issue