maven findbugs Exception – Caused by: java.io.FileNotFoundException: /target/findbugsXml.xml

Problem Statement:

Embedded error: /target/findbugsXml.xml (No such file or directory)
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: A java source file could not be added

.....
Caused by: java.io.FileNotFoundException: /target/findbugsXml.xml (No such file or directory)

This bug is not producible in Windows OS

Solution:

Link: https://hudson.dev.java.net/issues/show_bug.cgi?id=2714 

After using following settings, the error is gone. The problem is version number. 
If we dont give version it will take 1.2.1 and failed in Linux. 
If you put 1.2 it works fine in Linux.

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>1.2</version>
<configuration>
	<findbugsXmlOutput>true</findbugsXmlOutput>
	<findbugsXmlWithMessages>
		true
	</findbugsXmlWithMessages>
	<xmlOutput>true</xmlOutput>
</configuration>
</plugin>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s