You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "John Casey (JIRA)" <ji...@codehaus.org> on 2010/09/23 01:48:33 UTC

[jira] Closed: (MASSEMBLY-471) [Multi-projects] Define maven-assembly-plugin in root pom.xml causes plugin's dependencies of child modules failed.

     [ http://jira.codehaus.org/browse/MASSEMBLY-471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Casey closed MASSEMBLY-471.
--------------------------------

       Resolution: Won't Fix
    Fix Version/s: 2.2-beta-6
         Assignee: John Casey

in Maven 2.x, plugin-level dependencies will only be picked up from maven's first encounter with the plugin. 

It's critical to list all plugin-level dependencies in a pluginManagement section of the parent POM to ensure they are included. This is a Maven design issue, not a problem with the assembly plugin.

> [Multi-projects] Define maven-assembly-plugin in root pom.xml causes plugin's dependencies of child modules failed.
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: MASSEMBLY-471
>                 URL: http://jira.codehaus.org/browse/MASSEMBLY-471
>             Project: Maven 2.x Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.2-beta-5
>         Environment: Windows XP, Maven 2.2.1
>            Reporter: Jérémy Soula
>            Assignee: John Casey
>            Priority: Minor
>             Fix For: 2.2-beta-6
>
>         Attachments: bug-maven-assembly.zip
>
>
> I have a multi-module project (see attachment):
>  * pom.xml: Define the version of the plugin maven-assembly-plugin
>  * assembly: Jar project, contains an assembly descriptor
>  * livraison: Project for building assembly artifact. Use the previous assembly descriptor via dependencies. Attach assembly on the install phase.
>  
>  In the root directory, launch {{mvn clean install}} cause build failed:
>  
>  {code} 
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Unnamed - fr.jsoula:livraison:pom:1.0-SNAPSHOT
> [INFO]    task-segment: [clean, install]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
> [INFO] [install:install {execution: default-install}]
> [INFO] Installing D:\perso\MyProjets\bug-maven-assembly\livraison\pom.xml to D:\Documents\jsoula\.m2\repository\fr\jsoula\livraiso
> n\1.0-SNAPSHOT\livraison-1.0-SNAPSHOT.pom
> [INFO] [assembly:directory-single {execution: make-assembly}]
> [INFO] Reading assembly descriptor: assembly-test.xml
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error reading assembly descriptors: Error locating assembly descriptor: assembly-test.xml
> [1] [INFO] Searching for file location: D:\perso\MyProjets\bug-maven-assembly\livraison\assembly-test.xml
> [2] [INFO] File: D:\perso\MyProjets\bug-maven-assembly\livraison\assembly-test.xml does not exist.
> [3] [INFO] Invalid artifact specification: 'assembly-test.xml'. Must contain at least three fields, separated by ':'.
> [4] [INFO] Failed to resolve classpath resource: assemblies/assembly-test.xml from classloader: org.codehaus.classworlds.RealmClas
> sLoader@b7c0b7c
> [5] [INFO] Failed to resolve classpath resource: assembly-test.xml from classloader: org.codehaus.classworlds.RealmClassLoader@b7c
> 0b7c
> [6] [INFO] File: D:\perso\MyProjets\bug-maven-assembly\assembly-test.xml does not exist.
> [7] [INFO] Building URL from location: assembly-test.xml
> Error:
> java.net.MalformedURLException: no protocol: assembly-test.xml
>         at java.net.URL.<init>(URL.java:567)
>         at java.net.URL.<init>(URL.java:464)
>         at java.net.URL.<init>(URL.java:413)
>         at org.apache.maven.shared.io.location.URLLocatorStrategy.resolve(URLLocatorStrategy.java:54)
>         at org.apache.maven.shared.io.location.Locator.resolve(Locator.java:81)
>         at org.apache.maven.plugin.assembly.io.DefaultAssemblyReader.addAssemblyFromDescriptor(DefaultAssemblyReader.java:309)
>         at org.apache.maven.plugin.assembly.io.DefaultAssemblyReader.readAssemblies(DefaultAssemblyReader.java:140)
>         at org.apache.maven.plugin.assembly.mojos.AbstractDirectoryMojo.execute(AbstractDirectoryMojo.java:49)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>         at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>         at java.lang.reflect.Method.invoke(Method.java:599)
>         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)
> {code} 
> But if i launch {{mvn -f livraison/pom.xml clean install}}, the build works.
> Seems to be a plugin classpath problem but don't know if it causes by Maven or by the plugin. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira