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:
[email protected]<mailto:[email protected]>
For additional commands, e-mail:
[email protected]<mailto:[email protected]>