How to skip Maven unit test
By default, when building project, Maven will run the entire unit tests automatically. If any of unit test is failed, it will force Maven to abort the building process.
$ mvn install
$ mvn packageIn real life, you may “STILL” need to build your project even some of the cases are failed.
Skip Unit Test
To skip the entire unit test, uses argument “-Dmaven.test.skip=true“.
$ mvn install -Dmaven.test.skip=true $ mvn package -Dmaven.test.skip=true
Or define skipTests in maven-surefire-plugin.
pom.xml
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.12.4</version> <configuration> <skipTests>true</skipTests> </configuration> </plugin>
Now, build the project again, the entire unit tests will be ignored.

Well, the test was one we could safely ignore:
testFindDomainBounds in the TimeSeriesCollectionTests returned:
expected: but was:
So we can assume it’s a basic rounding error, but very minor so safe to ignore.
Not sure if it’s a Mac thing, perhaps a 64-bit issue but the test should be updated to round somewhat.
Thanks alot mkyong. I had one unit test out of over 2000 fail in jFreeChart! Annoying, but your tip saved the day. Thanks again…
Pete
Melbourne, Australia
haha, you need to find out why the tests are failed, skip is just ignore it temporary :)