• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • findbugs-plugin
    • None
    • FindBugs.4.65
      Jenkins 2.7.4
      maven-findbugs-plugin 2.5.5
      Java 1.7
      maven 3.0.3

      For Maven Project FindBugs does not collects analysis results.
      The Problems are shown in console but not parsed and shown in job results.

      Maven goals:

      clean site install -Dmaven.javadoc.skip=true -Dsoe.env.Unit-Test-Environment=CI --fail-never -Dorg.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser
      

      SaxParser beacuse of problem with SaxParser (another Issue)

      [INFO] 
      [INFO] --- findbugs-maven-plugin:2.5.5:findbugs (findbugs) @ XxxxImpl ---
      [INFO] Fork Value is true
           [java] Warnings generated: 1
      [INFO] Done FindBugs Analysis....
      [FINDBUGS] Finding all files that match the pattern findbugsXml.xml
      [FINDBUGS] Parsing 1 file in /root/.jenkins/workspace/A_CI/XxxxImpl/target
      [FINDBUGS] Successfully parsed file /root/.jenkins/workspace/A_CI/XxxxImpl/target/findbugsXml.xml of module XxxxImpl with 0 unique warnings and 0 duplicates.
      [FINDBUGS] Computing warning deltas based on reference build #3380
      [PMD] No report found for mojo check
      [INFO] 
      [INFO] --- findbugs-maven-plugin:2.5.5:check (default) @ XxxxImpl ---
      [INFO] BugInstance size is 1
      [INFO] Error size is 0
      [INFO] Total bugs: 1
      [INFO] Nullcheck of prodVehicleSelection at line 157 of value previously dereferenced in com.Xxxx.xxx(XxxxTO, Set) ["com.Xxxx"] At Xxxx.java:[lines 48-377]
      [PMD] No report found for mojo check

          [JENKINS-38727] FindBugs does not collects analysis results

          Ulli Hafner added a comment -

          The site goal is not supported with the maven project type. Can't you run the findbugs:findbugs goal?

          Ulli Hafner added a comment - The site goal is not supported with the maven project type. Can't you run the findbugs:findbugs goal?

          We have auto activating profile in pom.xml which runs findbugs:check (as findbugs:findbugs is not fully supported by m2e-code-quality) and as long as I know findbugs:findbugs should be run only in report phase where check is being run during a build phase.

          Waldemar Prabucki added a comment - We have auto activating profile in pom.xml which runs findbugs:check (as findbugs:findbugs is not fully supported by m2e-code-quality) and as long as I know findbugs:findbugs should be run only in report phase where check is being run during a build phase.

          QA profile in pom.xml:

          								<profile>
          			<id>STATIC-ANALYSIS</id>
          			<activation>
          				<property>
          					<name>!no.analysis.static</name>
          				</property>
          			</activation>
          			<build>
          				<pluginManagement>
          					<plugins>
          						<plugin>
          							<groupId>org.apache.maven.plugins</groupId>
          							<artifactId>maven-checkstyle-plugin</artifactId>
          							<version>2.15</version>
          							<dependencies>
          								<dependency>
          									<groupId>com.xxx</groupId>
          									<artifactId>XXX-Build-Tools</artifactId>
          								    <version>0.2.0</version>
          								</dependency>
          							</dependencies>
          							<configuration>
          								<consoleOutput>true</consoleOutput>
          								<configLocation>xxx/checkstyle_checks.xml</configLocation>
          								<suppressionsLocation>xxx/checkstyle_suppressions.xml</suppressionsLocation>
          							</configuration>
          						</plugin>
          						<plugin>
          							<groupId>org.apache.maven.plugins</groupId>
          							<artifactId>maven-pmd-plugin</artifactId>
          							<version>3.6</version>
          							<dependencies>
          								<dependency>
          									<groupId>com.xxx</groupId>
          									<artifactId>XXX-Build-Tools</artifactId>
          								    <version>0.2.0</version>
          								</dependency>
          							</dependencies>
          							<configuration>
          								<printFailingErrors>true</printFailingErrors>
          								<linkXref>true</linkXref>
          								<targetJdk>1.6</targetJdk>
          								<rulesets>
          									<ruleset>xxx/pmd_ruleset.xml</ruleset>
          								</rulesets>
          								<excludes>
          									<exclude>com/daimler/xxx/foundation/common/types/message/*.java</exclude>
          									<exclude>com/daimler/xxx/foundation/common/types/*.java</exclude>
          									<exclude>com/daimler/xxx/vehicleproduct/enrichmentexternal/business/function/jaxb/uvsrequest/*.java</exclude>
          									<exclude>com/daimler/xxx/vehicleproduct/enrichmentexternal/business/function/jaxb/uvsresponse/*.java</exclude>
          		
          									<exclude>com/daimler/xxx/vehicleproduct/enrichmentexternal/mock/*.java</exclude>
          									<exclude>com/daimler/xxx/vehicleproduct/externalvehicleconfiguration/mock/*.java</exclude>
          									<exclude>com/daimler/xxx/foundation/environment/business/service/mock/*.java</exclude>
          									<exclude>com/daimler/xxx/foundation/userandorg/mock/*.java</exclude>
          									
          									<exclude>com/daimler/xxx/externalsystemsout/externalsystems/*.xml</exclude>
          		
          									<exclude>daimler/.*</exclude>
          									<exclude>.*/gen/.*</exclude>
          									<exclude>.*/test-classes/.*</exclude>
          								</excludes>
          							</configuration>
          						</plugin>
          						<plugin>
          							<groupId>org.codehaus.mojo</groupId>
          							<artifactId>findbugs-maven-plugin</artifactId>
          							<version>2.5.5</version>
          							<dependencies>
          								<dependency>
          									<groupId>com.xxx</groupId>
          									<artifactId>XXX-Build-Tools</artifactId>
          								    <version>0.2.0</version>
          								</dependency>
          							</dependencies>
          							<configuration>
          								<findbugsXmlOutput>true</findbugsXmlOutput>
          								<excludeFilterFile>xxx/FindBugs_Classes.xml</excludeFilterFile>
          								<includeFilterFile>xxx/FindBugs_Rules.xml</includeFilterFile>
          							</configuration>
          						</plugin>
          					</plugins>
          				</pluginManagement>
          		
          				<plugins>
          					<plugin>
          						<groupId>org.apache.maven.plugins</groupId>
          						<artifactId>maven-checkstyle-plugin</artifactId>
          						<executions>
          							<execution>
          								<goals>
          									<goal>check</goal>
          								</goals>
          								<phase>verify</phase>
          							</execution>
          						</executions>
          					</plugin>
          					<plugin>
          						<groupId>org.codehaus.mojo</groupId>
          						<artifactId>findbugs-maven-plugin</artifactId>
          						<executions>
          							<execution>
          								<goals>
          									<goal>check</goal>
          								</goals>
          								<phase>verify</phase>
          							</execution>
          						</executions> 
                			    </plugin>
          					<plugin>
          						<groupId>org.apache.maven.plugins</groupId>
          						<artifactId>maven-pmd-plugin</artifactId>
          						<executions>
          							<execution>
          								<goals>
          									<goal>check</goal>
          								</goals>
          								<phase>verify</phase>
          							</execution>
          						</executions> 
          					</plugin>
          				</plugins>
          			</build>
          			<reporting>
          				<excludeDefaults>true</excludeDefaults>
          				<outputDirectory>${project.build.directory}/site</outputDirectory>
          				<plugins>
          					<plugin>
          						<groupId>org.apache.maven.plugins</groupId>
          						<artifactId>maven-jxr-plugin</artifactId>
          						<version>2.3</version>
          					</plugin>
          					<plugin>
          						<groupId>org.apache.maven.plugins</groupId>
          						<artifactId>maven-javadoc-plugin</artifactId>
          						<version>2.9</version>
          						<reportSets>
          							<!-- We only need the aggregated report since we do not want to collect 
          								the reports of every module manually. -->
          							<reportSet>
          								<id>aggregate</id>
          								<reports>
          									<report>aggregate</report>
          								</reports>
          							</reportSet>
          						</reportSets>
          					</plugin>
          					<plugin>
          						<groupId>org.apache.maven.plugins</groupId>
          						<artifactId>maven-project-info-reports-plugin</artifactId>
          						<version>2.4</version>
          						<configuration>
          							<dependencyDetailsEnabled>false</dependencyDetailsEnabled>
          							<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
          							<relativizeDecorationLinks>false</relativizeDecorationLinks>
          						</configuration>
          						<reportSets>
          							<reportSet>
          								<reports>
          									<report>dependencies</report>
          									<report>scm</report>
          								</reports>
          							</reportSet>
          						</reportSets>
          					</plugin>
          				</plugins>
          			</reporting>
          		</profile>
          

          Waldemar Prabucki added a comment - QA profile in pom.xml: <profile> <id>STATIC-ANALYSIS</id> <activation> <property> <name>!no.analysis. static </name> </property> </activation> <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <version>2.15</version> <dependencies> <dependency> <groupId>com.xxx</groupId> <artifactId>XXX-Build-Tools</artifactId> <version>0.2.0</version> </dependency> </dependencies> <configuration> <consoleOutput> true </consoleOutput> <configLocation>xxx/checkstyle_checks.xml</configLocation> <suppressionsLocation>xxx/checkstyle_suppressions.xml</suppressionsLocation> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <version>3.6</version> <dependencies> <dependency> <groupId>com.xxx</groupId> <artifactId>XXX-Build-Tools</artifactId> <version>0.2.0</version> </dependency> </dependencies> <configuration> <printFailingErrors> true </printFailingErrors> <linkXref> true </linkXref> <targetJdk>1.6</targetJdk> <rulesets> <ruleset>xxx/pmd_ruleset.xml</ruleset> </rulesets> <excludes> <exclude>com/daimler/xxx/foundation/common/types/message/*.java</exclude> <exclude>com/daimler/xxx/foundation/common/types/*.java</exclude> <exclude>com/daimler/xxx/vehicleproduct/enrichmentexternal/business/function/jaxb/uvsrequest/*.java</exclude> <exclude>com/daimler/xxx/vehicleproduct/enrichmentexternal/business/function/jaxb/uvsresponse/*.java</exclude> <exclude>com/daimler/xxx/vehicleproduct/enrichmentexternal/mock/*.java</exclude> <exclude>com/daimler/xxx/vehicleproduct/externalvehicleconfiguration/mock/*.java</exclude> <exclude>com/daimler/xxx/foundation/environment/business/service/mock/*.java</exclude> <exclude>com/daimler/xxx/foundation/userandorg/mock/*.java</exclude> <exclude>com/daimler/xxx/externalsystemsout/externalsystems/*.xml</exclude> <exclude>daimler/.*</exclude> <exclude>.*/gen/.*</exclude> <exclude>.*/test-classes/.*</exclude> </excludes> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> <version>2.5.5</version> <dependencies> <dependency> <groupId>com.xxx</groupId> <artifactId>XXX-Build-Tools</artifactId> <version>0.2.0</version> </dependency> </dependencies> <configuration> <findbugsXmlOutput> true </findbugsXmlOutput> <excludeFilterFile>xxx/FindBugs_Classes.xml</excludeFilterFile> <includeFilterFile>xxx/FindBugs_Rules.xml</includeFilterFile> </configuration> </plugin> </plugins> </pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <executions> <execution> <goals> <goal>check</goal> </goals> <phase>verify</phase> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> <executions> <execution> <goals> <goal>check</goal> </goals> <phase>verify</phase> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <executions> <execution> <goals> <goal>check</goal> </goals> <phase>verify</phase> </execution> </executions> </plugin> </plugins> </build> <reporting> <excludeDefaults> true </excludeDefaults> <outputDirectory>${project.build.directory}/site</outputDirectory> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jxr-plugin</artifactId> <version>2.3</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>2.9</version> <reportSets> <!-- We only need the aggregated report since we do not want to collect the reports of every module manually. --> <reportSet> <id>aggregate</id> <reports> <report>aggregate</report> </reports> </reportSet> </reportSets> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> <version>2.4</version> <configuration> <dependencyDetailsEnabled> false </dependencyDetailsEnabled> <dependencyLocationsEnabled> false </dependencyLocationsEnabled> <relativizeDecorationLinks> false </relativizeDecorationLinks> </configuration> <reportSets> <reportSet> <reports> <report>dependencies</report> <report>scm</report> </reports> </reportSet> </reportSets> </plugin> </plugins> </reporting> </profile>

          Only minro? I would say it preety much questions the sense of installing the plugin if it is unable to parse the results. Also makes the analysis of errors much harder.
          I have attached the file with result findbugsXml.xml which was not parsed correctly.

          Waldemar Prabucki added a comment - Only minro? I would say it preety much questions the sense of installing the plugin if it is unable to parse the results. Also makes the analysis of errors much harder. I have attached the file with result findbugsXml.xml which was not parsed correctly.

          Ulli Hafner added a comment - - edited

          Minor since there is an easy workaround, just don't use maven project type or don't use your profile tricks. These are not supported by Jenkins (and will not be). As you can see from the log, the findbugs analysis starts after the findbugs Jenkins plug-in jumps in.

          Ulli Hafner added a comment - - edited Minor since there is an easy workaround, just don't use maven project type or don't use your profile tricks. These are not supported by Jenkins (and will not be). As you can see from the log, the findbugs analysis starts after the findbugs Jenkins plug-in jumps in.

          Not true. The analysis result is just summary after the module build, not an analysis itself. As it can be seen in attached log, the analysis is done (warnings generated: 1), then starts jenkins plugin ([FINDBUGS] Parsing....), and then comes summary in console ([INFO] Bug Instance...)(enabled as workaround for the bug).

          Waldemar Prabucki added a comment - Not true. The analysis result is just summary after the module build, not an analysis itself. As it can be seen in attached log, the analysis is done (warnings generated: 1), then starts jenkins plugin ( [FINDBUGS] Parsing....), and then comes summary in console ( [INFO] Bug Instance...)(enabled as workaround for the bug).

            drulli Ulli Hafner
            toudick Waldemar Prabucki
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: