Summary
A brief description of why anyone would want to attempt this. In a Maven project, I have a need to run tests against classes in target/classes
, and a need to debug (using the Eclipse Servers plugin) tomcat within the Eclipse IDE, which is loading classes and a number of other assembled resources in target/<name-version-package>/WEB-INF/classes
. When my main source folder has output set at the WEB-INF/classes
directory, tomcat debugging works great in the IDE. When the ouptut is changed to target/classes
, the tests work fine too, as the test resources are properly assembled and loaded outside the context of the package.
Problem
The issue is that I have to manually change my main source directory's output based on the task at hand (testing or debugging in tomcat). The configuration and build changes would be prohibitively complex based on other configuration files, etc. to merely work around this.
Therefore, is there a straightforward way to tell Eclipse to output source into two directories? That way the incremental Maven build of Java class files will be copied into both places and I won't have such a fragile configuration.