You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by lukewpatterson <lu...@gmail.com> on 2010/05/28 14:12:49 UTC
I want Maven to fail
I'm looking for a plugin which has a "fail" goal, something like:
mvn fail-maven-plugin:fail -Dfail.maven.plugin.message="you failed!"
I've seen how enforcer or antrun can fail "on-demand", but I'm looking for
something I can fully configure from the command line
Thanks
--
View this message in context: http://old.nabble.com/I-want-Maven-to-fail-tp28706080p28706080.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: I want Maven to fail
Posted by Wayne Fay <wa...@gmail.com>.
> I'm looking for a plugin which has a "fail" goal, something like:
>
> mvn fail-maven-plugin:fail -Dfail.maven.plugin.message="you failed!"
Never seen one or needed one myself, but it would be super trivial to
build yourself. If you had a good justification for it, you could
maybe get it added to the Codehaus Mojo project for broader
deployment.
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: I want Maven to fail
Posted by Ben Lidgey <BL...@movenetworks.com>.
You could use the enforcer always fail rule in a profile of its own, and then activate from the command line with something like
mvn -P alwaysFailProfile enforcer:enforce
or even with profile activation using properties, something like:
<profiles>
<profile>
<id>alwaysFailProfile </id>
<activation>
<property>
<name>failure</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>enforce</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<AlwaysFail/>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
Ben
On 28 May 2010, at 13:12, lukewpatterson wrote:
I'm looking for a plugin which has a "fail" goal, something like:
mvn fail-maven-plugin:fail -Dfail.maven.plugin.message="you failed!"
I've seen how enforcer or antrun can fail "on-demand", but I'm looking for
something I can fully configure from the command line
Thanks
--
View this message in context: http://old.nabble.com/I-want-Maven-to-fail-tp28706080p28706080.html
Sent from the Maven - Users mailing list archive at Nabble.com<http://Nabble.com>.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org<ma...@maven.apache.org>
For additional commands, e-mail: users-help@maven.apache.org<ma...@maven.apache.org>