maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Fox (JIRA)" <>
Subject [jira] Updated: (MECLIPSE-171) compile dependencies not used in tests
Date Thu, 28 Jun 2007 12:43:14 GMT


Brian Fox updated MECLIPSE-171:

    Fix Version/s:     (was: 2.4)

> compile dependencies not used in tests
> --------------------------------------
>                 Key: MECLIPSE-171
>                 URL:
>             Project: Maven 2.x Eclipse Plugin
>          Issue Type: Bug
>          Components: dependency resolution
>    Affects Versions: 2.3
>         Environment: Win XP, Eclipse 3.2.1
>            Reporter: Andre Ranvik
>             Fix For: 2.5
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message