I have a large project with a top-level pom building lower-level
projects.  When each of the lower-level projects had as their packaging
target a "jar" file, everything worked as I would expect.  I could do a
"mvn install" in the top-level directory and maven would recurse into
each sub-project (<module>) and do the appropriate thing.  However, as I
filled out my project, some of the sub-modules had other targets - war
and wsr - and therefore not all projects had "jar" packaging.  Now, when
I do a "mvn install" from the top-level module, I get errors like this:

 

[ERROR] BUILD ERROR

[INFO]
------------------------------------------------------------------------

[INFO] Internal error in the plugin manager executing goal
'org.apache.maven.plugins:maven-jar-plugin:2.1:jar': Unable to find the
mojo 'org.apache.maven.plugins:maven-jar-plugin:2.1:jar' in the plugin
'org.apache.maven.plugins:maven-jar-plugin'

 

This makes no sense to me, and I don't see what the non-jar projects
(war and wsr) would have to do with this.  In fact, I believe the
sub-project that maven is trying to build at the time of this error is
the first module - which *is* a jar package.  Simply changing
directories to this sub-project and doing a "mvn install" there works
perfectly fine.  In fact, I can go to each of the modules listed in the
top-level pom and do a "mvn install" manually and they all work fine.
Currently, that is my work-around.  

 

Any suggestions on why the above might be happening?  (I'm using maven
2.0.4).  -- Eric

Reply via email to