Benny,
Unfortunately it is still not enough to reproduce issue and we need a
simple test project that would show it.
What I think happen in your case is that you have your jars in Eclipse
classpath, so JDT can compile classes, and if it compiles into the same
dir as Maven, it won't recompile them, hence don't need any
dependencies. "mvn clean" would bring things back to obvious.
Maven solution for jars that are not in the local repository is to use
<system> scope and specify <location> element for such dependencies, but
they still should be listed in pom.xml. That is not specific to
m2eclipse but general Maven feature.
regards,
Eugene
Benny Sadeh wrote:
it actually just happened to me as well ... and I think I've isolated
the scenario in which it happens
the context:
migrating an existing ant-based project to be maven-based (using
m2eclipse)
my approach was:
I have all the dependent libraries in a .../lib directory. for each
dependency in lib, I find the same in the maven repository, add it to
the pom, then delete it from lib.
at some point, cglib-nodep-2.1_3.jar was in lib but no in the pom, and
that's when I got the exact same trace, and it happens in the
test-compile stage (goal?). (and yes, I'm using that library while
testing)
why it happens, I don't know, but maybe you can shed some light ;-)
once I added cglib-nodep-2.1_3 to the pom (and removed it from lib),
that problem disappeared, and I'm happy with that.
but I still have a problem which relates to that, which is more
general and I could use some help with it. please. pretty please.
the general scenario is:
if one has a library that is not in the maven repository, but is
stored locally (under some lib directory), the m2eclipse and java
builders seems to be happy and content, until we get to the testing
stage. at that point running the tests via eclipse (Run As) succeeds,
but running same test via m2 Maven(Run As) fails.
without tracing it (don't know how), I postulate that it is because
m2eclipse can not find those "special" libraries (they are not under
its dependency graph).
the specific scenario I have is using jboss-serialization.jar within
an ObjectSerializer, and while running ObjectSerializerTest I get:
...
Running mindsmiths.util.io.ObjectSerializerTest
Tests run: 4, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 0.047
sec <<< FAILURE!
...
Results :
Tests in error:
...
simpleObjects(mindsmiths.util.io.ObjectSerializerTest)
aggregateObjects(mindsmiths.util.io.ObjectSerializerTest)
nestedAggregateObjects( mindsmiths.util.io.ObjectSerializerTest)
nestedObjects(mindsmiths.util.io.ObjectSerializerTest)
I understand that I can install any library in the local Maven
repository using Maven directly, but that is not an acceptable
solution, and I believe you can understand why.
so, in general, I does one overcomes such obstacles in a transparent way?
your advice would be appreciated.
thanks,
Benny
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email