When I generate eclipse artifacts, Eclipse shows the sou开发者_StackOverflow社区rce folder in this order.
src/test/java src/test/resources src/main/java src/main/resources
I would prefer,
src/main/java src/main/resources src/test/java src/test/resources
Thanks in advance!
I'm not aware of any configuration parameter in the maven-eclipse-plugin that would allow to tweak the ordering of classpathentry
in the generated .classpath
.
Assuming this is what Eclipse uses, changing the order would require patching the plugin.
Another option would be to use m2eclipse which gives you what you're looking for out of the box.
This would break default functionality. Per convention, the contents of src/test/java and src/test/resources must be on top in the class path, so that you can easily replace artifacts from the main tree with test implementations without changing the main tree.
Example:
src/test/resources/META-INF/persistence.xml
src/main/resources/META-INF/persistence.xml
(tests will use the first version, while the second version will be deployed)
精彩评论