Maven 2.x Assembly Plugin

Not a v4.0.0 POM

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0.1
  • Fix Version/s: 2.2-beta-2
  • Component/s: None
  • Labels:
    None
  • Environment:
    Linux Unbuntu, 1.5_07 jdk
  • Number of attachments :
    0

Description

I have a maven 1 project that builds a jar file called pps-3.0.2.jar.
The jar (and it's pom) are moved into my legacy style repository.

I have a maven 2 project that depends on pps-3.0.2. It compiles and
tests the code fine. During the assembly it is suppose to creates a
directory of dependent jar files and it blows up with the message:
----------------------------------------------------------------------
Error building POM (may not be this project's POM).

Project ID: ebs:pps
POM Location: /home/chelck/.m2/repository/ebs/pps/3.0.2/pps-3.0.2.pom

Reason: Not a v4.0.0 POM.
-------------------------------------------------------------------------
In a sense the error is correct: pps-3.0.2.pom is not v4.0.0 – it's
legacy. So why is mvn trying to build it's POM and why doesn't it
realize it's a legacy pom?

I see this with maven 2.0.4,2.0.6, and 2.0.7.

Here is a (2.0.4) stack trace:

[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to create assembly: Error retrieving POM of module-dependency: ebs:pps:jar:3.0.2; Reason: Not a v4.0.0 POM.
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to create assembly: Error retrieving POM of module-dependency: ebs:pps:jar:3.0.2; Reason: Not a v4.0.0 POM.
at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:302)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
... 16 more
Caused by: org.apache.maven.plugin.assembly.archive.ArchiveCreationException: Error retrieving POM of module-dependency: ebs:pps:jar:3.0.2; Reason: Not a v4.0.0 POM.
at org.apache.maven.plugin.assembly.archive.task.AddDependencySetsTask.addDependencySet(AddDependencySetsTask.java:114)
at org.apache.maven.plugin.assembly.archive.task.AddDependencySetsTask.execute(AddDependencySetsTask.java:90)
at org.apache.maven.plugin.assembly.archive.phase.DependencySetAssemblyPhase.execute(DependencySetAssemblyPhase.java:54)
at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:98)
at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:278)
... 18 more
Caused by: org.apache.maven.project.InvalidProjectModelException: Not a v4.0.0 POM.
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1299)
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1270)
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:471)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:225)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:235)
at org.apache.maven.plugin.assembly.archive.task.AddDependencySetsTask.addDependencySet(AddDependencySetsTask.java:109)
... 22 more

Issue Links

Activity

Hide
Michael King added a comment -

Is there a work around for this issue? I saw a thread somewhere that John Casey found the problem but mentioned it won't be release for a little while. Anything available to get around this little issue?

Thanks,

Mike

Show
Michael King added a comment - Is there a work around for this issue? I saw a thread somewhere that John Casey found the problem but mentioned it won't be release for a little while. Anything available to get around this little issue? Thanks, Mike
Hide
John Casey added a comment -

the assembly plugins should allow the use of stub POMs when these sorts of POMs are encountered...in other words, they will be ignored as subtrees for the transitive dependency calculation.

Show
John Casey added a comment - the assembly plugins should allow the use of stub POMs when these sorts of POMs are encountered...in other words, they will be ignored as subtrees for the transitive dependency calculation.

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: