[ http://jira.codehaus.org/browse/MNGECLIPSE-214?page=all ]
Eugene Kuleshov closed MNGECLIPSE-214.
--------------------------------------
Assignee: Eugene Kuleshov
Resolution: Won't Fix
As you poined out, it can't be fixed in Eclipse.
More over, you don't have to use same resource between tests and main classes.
In my experience it is a bad practice to make assumprions on the order in the
classpatch. So, your test can explicitly pick which resource to use, either
using system properties (in the test or externally), or make tst case
explicitly inject required resources.
> Order of resources in classpath is wrong
> ----------------------------------------
>
> Key: MNGECLIPSE-214
> URL: http://jira.codehaus.org/browse/MNGECLIPSE-214
> Project: Maven 2.x Extension for Eclipse
> Issue Type: Bug
> Affects Versions: 0.0.9
> Reporter: Aaron Digulla
> Assigned To: Eugene Kuleshov
>
> Create a project with src/main/resources and src/test/resources.
> Put the same resource in both paths (for example, log4j.properties).
> When you run the tests from maven, the resources from src/test shadow the
> files from src/main (as it should be).
> When you run the tests in Eclipse, src/main takes precedence. This is because
> the order of entries in the .classpath file is wrong.
> I'm not sure how to solve this. For maven, every project is made up from two
> "modules": A "test" module and a "main" module. Depending on what you want to
> do, either the test module takes precedence or the "main" module (or rather:
> in the former case, the test module is injected as the first element in the
> classpath and in the second case, it's omitted).
> So when running a project in Eclipse, we're in trouble. If I move src/test to
> the top of the classpath, starting the real application could become an issue.
> I guess it's a limitation of Eclipse itself. I've opened
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=166321 to see what the Eclipse
> guys say.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira