If Eclipse is automatically generating classes in target/classes from your classes in src/test/java, I think there is a problem, since src/test/java classes should end up in target/test-classes. I would recommend (1) running eclipse:eclipse on your project (to update your Eclipse .classpath) and then (2) perform a clean (to clean out the old files in target/classes). As an example, if I execute 'mvn eclipse:eclipse' on a web project of mine, my Eclipse project .classpath file ends up with the following: ... <classpathentry kind="src" path="src/main/java"/> <classpathentry kind="src" path="src/test/java" output="target/test-classes"/> <classpathentry kind="output" path="target/classes"/> ... Notice that src/test/java classes go to target/test-classes. After performing eclipse:eclipse and refreshing your project, your .classpath should be similar to the above. After this, you should perform a 'mvn clean' and refresh your project. You should end up with target/classes (empty folder) target/test-classes (empty folder) Now, if you perform a 'mvn clean package', you should see that your regular classes end up in target/classes and your test classes end up in target/test-classes. If you inspect your war file that is created, you should see that it does not contain your test classes. Deron Eriksson
-- View this message in context: http://www.nabble.com/how-to-exclude-classes-from-package-in-target-classes-to-be-copied-to-WAR-in-packaging-tp21540465p21542863.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
