Skip to content

Instantly share code, notes, and snippets.

@syhily
Forked from ansell/gist:1141550
Created January 31, 2021 17:54
Show Gist options
  • Save syhily/6567c92a83f426b289e24942c0094c43 to your computer and use it in GitHub Desktop.
Save syhily/6567c92a83f426b289e24942c0094c43 to your computer and use it in GitHub Desktop.
Maven: Compiling and installing test jar without running them
mvn -DskipTests test-compile jar:test-jar install
the similar command below, will not compile or package the jar file (if you are using the surefire plugin) so, don't use it if you want to distribute the test jar file without running the tests
mvn -Dmaven.test.skip test-compile jar:test-jar install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment