[
https://jira.codehaus.org/browse/MECLIPSE-171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Osipov closed MECLIPSE-171.
-----------------------------------
Resolution: Won't Fix
Please refer to
https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014
if you're wondering why this issue was closed out.
> compile dependencies not used in tests
> --------------------------------------
>
> Key: MECLIPSE-171
> URL: https://jira.codehaus.org/browse/MECLIPSE-171
> Project: Maven Eclipse Plugin
> Issue Type: Bug
> Components: Core : Dependencies resolution and build path
> (.classpath)
> Affects Versions: 2.3
> Environment: Win XP, Eclipse 3.2.1
> Reporter: Andre Ranvik
>
> I had dependencies to other components setup in "compile" scope in the pom
> file. I created a test (under src/test/java), which used some of these
> dependencies. All well so far.
> Now I added a method to a class, which was part of one of the modules I had a
> compile dependency on. I then called this method from my test. No problems
> within Eclipse finding the new method, since I was using project references.
> This means that Eclipse did not complain about the new method at compile
> time. BUT - when I ran the test, it gives me a "NoSuchMethodException" on the
> newly added method.
> When I run the test from command line (mvn test), then it runs fine, without
> any problems.
> I was able to resolve the problem by changing all dependencies to "test"
> scope (instead of "compile"). Everything worked fine then. I tried to change
> it back to compile, and now that worked too...!
> I then tried adding another method in the same class that caused the problem
> - in order to see if there was a pattern here, but that worked too, meaning I
> did not have to change the dependencies to "test" to get Eclipse to find the
> new method call.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)