Running maven tests without including them in output jar

I've got an IntelliJ Maven project set up with some tests in a separate 'tests' folder, which is marked as a tests source folder in IntelliJ. I've got a TC build setup with the Maven goals 'compile test package'. It looks like the tests aren't being included in the output jar (which is correct), but aren't being run.

What's the best way of not including the tests in the output jar, but still running them as part of a build by Maven?


1 comment
Comment actions Permalink

Simon,

Please refer to Maven doumentation. In this section http://maven.apache.org/pom.html#Directoriesyou can find info on customization of directory structure. As Maven knows nothing about Idea project settings, you will need to add your 'tests' directory to maven layout.

0

Please sign in to leave a comment.