Command to skip maven tests

I tried to use the flag maven.test.skip=true to skip tests using the following command

mvn clean install -Dmaven.test.skip=true

But it turned out to skip compiling test files, too. I read the Maven book and it says

“The maven.test.skip variable controls both the Compiler and the Surefire plugin,
if you pass in maven.test.skip you’ve told Maven to ignore tests altogether.”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s