How can I get maven-release-plugin to skip my tests?

Steven picture Steven · Dec 31, 2011 · Viewed 60.1k times · Source

How can I get the maven-release-plugin to run without triggering the tests?

I have tried

-Dmaven.test.skip=true 

and

-DskipTests 

and

-DpreparationGoals=clean

...yet none work.

Yes, I know I shouldn't release if the tests don't pass, but I don't have control over making my coworkers write reliable tests.

Answer

bmargulies picture bmargulies · Dec 31, 2011

-Darguments="-DskipTests" is what you want, or explicitly configuring the forked executions in the pom.