If you follow the standard layout with production code under src/main and test classes under src/test than you test classes will be excluded from the resulting artifact automatically.
But maybe I am misreading your email. Do you want to create a binary containing the source (.java) files or are you talking about the binary used for production? However if you need multiple output than you might want to look at the assembly plug-in which allow you to define a distribution that might contain a jar file with binaries, a jar file with javadoc, etc. Andreas -----Original Message----- From: Tomek Korzeniewski [mailto:[EMAIL PROTECTED] Sent: Saturday, November 04, 2006 11:19 AM To: users@maven.apache.org Subject: Exclude tests from packaged artifact Hello, What is the easiest way to prevent tests being packaged together with source files in the resulting artifact package? I would like the tests to execute, but be packaged in a seperate jar. Currently I have configured the maven-jar-plugin as follows: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <executions> <execution> <goals> <goal>test-jar</goal> </goals> </execution> </executions> </plugin> So this creates the tests packaged on their own , however they are still included in the generted package. Is there some way I can exclude the test-classes directory from being packaged? -- View this message in context: http://www.nabble.com/Exclude-tests-from-packaged-artifact-tf2574864s177 .html#a7177951 Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]