Hello Maven Experts,
I've been using Maven 2 for a few months, and I'm not sure if I've
stumbled upon a bug, or if a configuration change is in order. I have
the following set of projects/subprojects:
ProjA
-- SubProjA1
-- SubProjA2
-- SubProjA3
...
-- SubProjAn
ProjB
-- SubProjB1
-- SubProjB2
-- SubProjB3
-- SubProjB4
ProjC
-- SubProjC1
Here are the details surrounding the problem. ProjA, ProjB, and ProjC
inherit from a common parent pom.xml. All of the sub projects inherit
from their respective parent projects pom files. SubProjA3 is dependent
upon SubProjA1 and SubProjA2, as well as SubProjB4 and SubProjC1. The
appropriate dependencies exist in the various pom files, and the entire
set of projects and subprojects compiles successfully. That's all good,
so here's the problem. When I attempt to execute the jar file produced
by SubProjA3 (the main entry point to my program), I end up with an error:
java.lang.NoClassDefFoundError
with a reference to a class in SubProjB4. (The manifest correctly
points to the main-class, otherwise I wouldn't be getting as far into
the execution as I am.) This seems to be telling me that the classes
are being seen during compile time, but are not being properly
referenced in the local maven repository at runtime. I've
double-checked, and each of the resulting subproject jars exist in the
local repository, so it seems like some sort of classpath issue within
maven.
Any ideas on where to look for the problem? It looks like the uberjar
plugin is not yet ready for maven2 (it didn't run for me). I've also
tried to narrow it down by doing various minor refactoring experiments,
but no luck thus far. (I can post additional information if helpful,
but I want to keep the message somewhat succinct to start.)
Any ideas would be appreciated. I've looked through the archives and
the documentation, so if I've inadvertently missed something, please
reply with a pointer.
Best Regards,
Glenn
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]