Hi chamara,
I have already tried the way you have mentioned that removing testOnFailure
as well as change <phase> to compile. Even when I changed the phase to
compile, it does not produce findbugxml file.And I have version
specification in a Parent POM as below.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>${maven.findbugsplugin.version}</version>
</plugin>
<maven.findbugsplugin.version>3.0.2</maven.findbugsplugin.version>
my current find-bug plugin in POM of test module.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<effort>Max</effort>
<threshold>Low</threshold>
<xmlOutput>true</xmlOutput>
<findbugsXmlOutputDirectory>${project.build.directory}/findbugs</findbugsXmlOutputDirectory>
<includeTests>true</includeTests>
</configuration>
<executions>
<execution>
<id>analyze-compile</id>
<phase>compile</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
Can you please give more suggestions on this.Thanks in advance.
On Fri, Nov 20, 2015 at 9:31 AM, Isuru Rupasinghe <[email protected]> wrote:
> Hi Chamara,
>
> Released the message.
>
> Thanks & Regards,
>
> *Isuru Rupasinghe*
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middle-ware
>
> mobile: +94 77 590 4545
> <%2B94%2077%20352%C2%A05930>
> office: +94 11 214 5345 / +94 11 743 5800 ext: 5739
>
>
> On Fri, Nov 20, 2015 at 8:23 AM, Chamara Philips <[email protected]>
> wrote:
>
>> Please release the mail.
>> ---------- Forwarded message ----------
>> From: Chamara Philips <[email protected]>
>> Date: Fri, Nov 20, 2015 at 8:21 AM
>> Subject: Fwd: [Dev] [Automation][DS] Build is not getting fail since the
>> find-bug finds bugs in the code
>> To: WSO2 Developers' List <[email protected]>
>>
>>
>>
>> ---------- Forwarded message ----------
>> From: Chamara Philips <[email protected]>
>> Date: Fri, Nov 20, 2015 at 8:15 AM
>> Subject: Re: [Dev] [Automation][DS] Build is not getting fail since the
>> find-bug finds bugs in the code
>> To: Rajeenthini Satkunam <[email protected]>
>>
>>
>> Hi Rajeenthini,
>>
>> It is not necessary to set failOnError to true, as it is default. Can you
>> please try removing the "failOnError" property. Also you have missed the
>> version. Following plugin declaration worked for me to run it successfully
>> without integrating tests. I think adding "includeTests" should work fine
>> with tests.
>>
>> <build>
>> <plugins>
>> <plugin>
>> <groupId>org.codehaus.mojo</groupId>
>> <artifactId>findbugs-maven-plugin</artifactId>
>> <version>2.5.2</version>
>> <configuration>
>>
>> <effort>Max</effort>
>>
>> <threshold>Low</threshold>
>>
>> <xmlOutput>true</xmlOutput>
>>
>>
>> <findbugsXmlOutputDirectory>${project.build.directory}/findbugs</findbugsXmlOutputDirectory>
>> </configuration>
>> <executions>
>> <execution>
>> <id>analyze-compile</id>
>> <phase>compile</phase>
>> <goals>
>> <goal>check</goal>
>> </goals>
>> </execution>
>> </executions>
>> </plugin>
>> </plugins>
>> </build>
>>
>> Thanks.
>>
>> On Thu, Nov 19, 2015 at 2:54 PM, Rajeenthini Satkunam <
>> [email protected]> wrote:
>>
>>> Hi all,
>>>
>>> I would like to integrate find-bug plugin with a maven build of product
>>> DS Integration test module(Dashboard Server).So I have added the plugin
>>> maven find-bug under plugins in POM of integration module of product DS.
>>> Here is the code I have added in POM.
>>>
>>> <plugin>
>>> <groupId>org.codehaus.mojo</groupId>
>>> <artifactId>findbugs-maven-plugin</artifactId>
>>> <configuration>
>>> <effort>Max</effort>
>>> <threshold>Low</threshold>
>>> <xmlOutput>true</xmlOutput>
>>>
>>> <findbugsXmlOutputDirectory>${project.build.directory}/findbugs</findbugsXmlOutputDirectory>
>>> <includeTests>true</includeTests>
>>> <failOnError>true</failOnError>
>>> </configuration>
>>> <executions>
>>> <execution>
>>> <id>analyze-compile</id>
>>> <phase>verify</phase>
>>> <goals>
>>> <goal>check</goal>
>>> </goals>
>>> </execution>
>>> </executions>
>>> </plugin>
>>>
>>> But the build is not getting fail even I got some bugs through find-bug
>>> tool.I can produce the findbugsXml.xml file under directory findBug.Can
>>> anyone tell that do I need to add any other configurations to run this tool
>>> for test sources rather than adding this plugin to POM?
>>>
>>> I have asked this from StackOverFlow as well you can find the question
>>> here[1].
>>> [1] -
>>> http://stackoverflow.com/questions/33796044/how-can-i-integrate-find-bug-maven-plugin-to-integration-test-module
>>>
>>> references
>>>
>>> [2] - http://gleclaire.github.io/findbugs-maven-plugin/
>>> [3] -
>>> http://stackoverflow.com/questions/33234692/maven-findbugs-plugin-how-to-run-findbug-on-the-test-classes
>>> --
>>>
>>> *Thank You.*
>>>
>>> *Rajeenthini Satkunam*
>>>
>>> *Associate Software Engineer | WSO2*
>>>
>>>
>>> *E:[email protected] <[email protected]>*
>>>
>>> *M :+94770832823 <%2B94770832823> *
>>>
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Hareendra Chamara P h i l i p s
>> *Software Engineer*
>> Mobile : +94 (0) 767 184161 <%2B94%20%280%29%20773%20451194>
>> [email protected] <[email protected]>
>>
>>
>>
>>
>> --
>> Hareendra Chamara P h i l i p s
>> *Software Engineer*
>> Mobile : +94 (0) 767 184161 <%2B94%20%280%29%20773%20451194>
>> [email protected] <[email protected]>
>>
>>
>>
>>
>> --
>> Hareendra Chamara P h i l i p s
>> *Software Engineer*
>> Mobile : +94 (0) 767 184161 <%2B94%20%280%29%20773%20451194>
>> [email protected] <[email protected]>
>>
>>
>
--
*Thank You.*
*Rajeenthini Satkunam*
*Associate Software Engineer | WSO2*
*E:[email protected] <[email protected]>*
*M :+94770832823 *
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev