I am using maven and Clover in my project, but I do not want the integration test classes get executed. These integration test classes were written a long time ago, which will fail the Clover procedure. Is there a way to disable integration test when running Clover? I am using automation Clover integration.
1) In case your integration tests are launched using maven-failsafe-plugin (and not the maven-surefire-plugin), then you can disable their execution by adding the following parameter in configuration of a Maven Task:
2) Alternatively, you can use manual Clover integration and do not run the 'integration-test' phase. For instance:
mvn clean clover2:setup test clover2:aggregate clover2:clover -Dmaven.clover.licenseLocation=/path/to/clover.license
3) Alternatively, you can also define proper exclusion patterns to omit your integration tests. This works for both maven-surefire-plugin and maven-failsafe-plugin.
Hi Marek, thanks so much for the reply. I finally adopt 2nd option. 1) I configured Clover in a individual job and followed the instructment create a separate Job in which automatic Clover integration is enabled create a Maven task in this job, which will do nothing (call the "clean" goal, for instance) Bamboo will automatically add Clover-related goals (clover2:setup verify clover2:aggregate clover2:clover) So in my step it is just a clean command. The -DskipITs=true does not help at all in my test. 2) "test" phrase works as expected. Just a bit more complicated than automatically Clover. Finally I figured it out. One thing to mention is the com.atlassian.maven.plugins:: prefix is needed before clover2, otherwise there is an exception related to m2e. I did not add com.atlassian.maven.plugins in my pom.xml. I can not figure the root cause... 3) Need update pom.xml or something else. Aside. HOWEVER, the integrating with Clover, it looks like bamboo can not fetch code from Stash frequently. I have to manully run branch, but it is definitely not the spirit of CI. I opened another card https://answers.atlassian.com/questions/12911103/checkout-default-repository1-failed-with-code-128 Could you please help on this card as well? Thank you!
> The -DskipITs=true does not help at all in my test. Maybe you're not using maven-cargo-plugin for them? Or test naming convention used is different? > One thing to mention is the com.atlassian.maven.plugins:: prefix is needed before clover2 Maven searches for build plugins in the 'org.apache.maven.plugins' groupId by default. As Clover plugin has "com.atlassian.maven.plugins" gropuId, you have to either use fully qualified name (as you did) or to declare the following snippet in ~/.m2/settings.xml: <pluginGroups> <pluginGroup>com.atlassian.maven.plugins</pluginGroup> </pluginGroups> > otherwise there is an exception related to m2e. [...] I can not figure the root cause... Could you share build logs, please? (you can create a ticket on support.atlassian.com or paste a link here) > HOWEVER, the integrating with Clover, it looks like bamboo can not fetch code from Stash frequently. [...] Could you please help on this card as well? I guess this is a problem with Stash. I'll ask Stash team to have a look at it.
Hi Marek, Thanks for the explanation. We do not use maven-cargo-plugin. My understanding is in automatic integration, according to https://confluence.atlassian.com/display/BAMBOO/Enabling+the+Clover+add-on this beneath Maven goals is like "clover2:setup verify clover2:aggregate clover2:clover" And IT will be run during verify phrase. The log related to m2e is here: 01-Mar-2015 20:38:49 [WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available 01-Mar-2015 20:38:49 [WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 Although it is a warning, I did not see it in a successful build. And all the build steps failed after this warning. So I consider it is a fatal warning.
hi @Marek Parfianowicz , I created a ticket regarding the m2e exception here https://support.atlassian.com/servicedesk/customer/portal/13/CLV-6218 Please take a look. Another question is Clover report is not generated in multi-module maven project, could you please take a look as well? https://answers.atlassian.com/questions/12918095 or https://support.atlassian.com/servicedesk/customer/portal/13/CLV-6219 I appreciate your great help!
Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs