OK, I did some experimenting and this is what I found out. If I put the following goal in my root/maven.xml, the <fail> tag executes on any project that has NO unit tests.
<goal name="continuousintegration"> <attainGoal name="clean"/> <attainGoal name="site"/> <!-- avoid running tests again --> <j:if test="${maven.test.failure}"> <fail message="There were test failures."/> </j:if> <j:set var="maven.test.skip" value="true"/> <attainGoal name="jar:deploy"/> <j:set var="maven.test.skip" value="false"/> </goal> To fix this, I had to add the following before the "site" goal: <j:set var="maven.test.failure" value="false"/> I find the fact that maven.test.failure defaults to true a little puzzling. How can there be test failures if no tests are run? Is there anything wrong with what I've done? Does it somehow break some accepted best practice use of maven? On 8/17/05, Craig McDaniel <[EMAIL PROTECTED]> wrote: > Wait a second...do I have to create a "continuousintegration" goal in > every sub-project? > > On 8/17/05, Emmanuel Schmitt <[EMAIL PROTECTED]> wrote: > > For the 1.X branch, you can avoid to run tests twice using this kind > > of tip : http://jroller.com/page/carlossg?entry=maven_tips_and_tricks_avoid > > > > Emmanuel Schmitt. > > > > 2005/8/17, Jamie Bisotti <[EMAIL PROTECTED]>: > > > On 8/17/05, Craig McDaniel <[EMAIL PROTECTED]> wrote: > > > > I am using Damage Control on my project to run automated builds. As > > > > part of the automated build, I want to deploy a snapshot jar and build > > > > the site. DC is therefore executing "maven clean jar:deploy-snapshot > > > > site". Unfortunately, this causes the unit tests to execute twice, > > > > once for jar:deploy and once for site. Is this the expected behavior? > > > > > > > > -- > > > > Craig McDaniel > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > AFAIK, yes...for the 1.X branch at least. > > > -- > > > Jamie Bisotti > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Craig McDaniel > -- Craig McDaniel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]