[ 
https://jira.codehaus.org/browse/MASSEMBLY-489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=342762#comment-342762
 ] 

Karl Heinz Marbaise commented on MASSEMBLY-489:
-----------------------------------------------

First your example project does not work via {{mvn clean package}} it simply 
fails with the following:
{code}
[INFO] Aggregator Project ................................ SUCCESS [  0.141 s]
[INFO] Problematic Module ................................ FAILURE [  1.697 s]
[INFO] Descriptor Project ................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.228 s
[INFO] Finished at: 2014-03-11T19:51:14+01:00
[INFO] Final Memory: 16M/981M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-dependency-plugin:2.8:unpack 
(unpack-shared-resources) on project problematic-module: Unable to find 
artifact. Could not find artifact 
org.example:descriptor-module:jar:0.0.2-SNAPSHOT in nexus 
(http://localhost:8081/nexus/content/groups/public)
[ERROR] 
[ERROR] Try downloading the file manually from the project website.
[ERROR] 
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=org.example 
-DartifactId=descriptor-module -Dversion=0.0.2-SNAPSHOT -Dpackaging=jar 
-Dfile=/path/to/file
[ERROR] 
[ERROR] Alternatively, if you host your own repository you can deploy the file 
there:
[ERROR] mvn deploy:deploy-file -DgroupId=org.example 
-DartifactId=descriptor-module -Dversion=0.0.2-SNAPSHOT -Dpackaging=jar 
-Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
{code}
This gives me the impressions that this multi-module build is simply broken. 
The most important thing is that the descriptor module is build after the 
problematic module which means there is no dependency given between the modules 
which is absolutly necessary.
A multi-module build must be workgin out of the box with an empty local 
repository just simply {{mvn clean package}}.

First question. Are you aware of the [documentation about sharing 
descriptors|https://maven.apache.org/plugins/maven-assembly-plugin/examples/sharing-descriptors.html]
 ? 

After checking your example project [i have fixed several issues and got a 
working 
example|https://github.com/khmarbaise/massembly/tree/master/massembly-489] 
without any problems.

This means i will close the issue. if you have any objections please don't 
hesitate to reopen the bug and may be you can send pull-request to change the 
example project in the way you like.

> Failure to locate component descriptors in another project
> ----------------------------------------------------------
>
>                 Key: MASSEMBLY-489
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-489
>             Project: Maven Assembly Plugin
>          Issue Type: Bug
>          Components: component descriptor
>    Affects Versions: 2.2-beta-5
>         Environment: Apache Maven 3.0-beta-1 (r935667; 2010-04-19 
> 19:00:39+0200)
> Java version: 1.6.0_20
> Java home: /usr/lib/jvm/java-6-sun-1.6.0.20/jre
> Default locale: en_CA, platform encoding: UTF-8
> OS name: "linux" version: "2.6.31-22-generic" arch: "i386" Family: "unix"
>            Reporter: Andreas Sewe
>         Attachments: aggregator.tar.gz, aggregator.tar.gz
>
>
> The {{maven-assembly-plugin}} seems to search for component descriptors in 
> the current project instead of in the one containing the assembly descriptors 
> which do the referring. This behavior is probably a bug and makes it quite 
> impossible to use such a modularized assembly descriptor from a different 
> project.
> The attached multi-module project exemplifies this; just run "mvn install" 
> from the aggregator project and you will get the following stack trace:
> {quote}
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
> goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:single 
> (default) on project problematic-module: Error reading assemblies: Failed to 
> locate component descriptor: src/main/resources/assemblies/component.xml
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:141)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:77)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:69)
>       at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:82)
>       at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:54)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.singleThreadedBuild(DefaultLifecycleExecutor.java:218)
>       at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:190)
>       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:246)
>       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:95)
>       at org.apache.maven.cli.MavenCli.execute(MavenCli.java:430)
>       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:160)
>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:124)
>       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:597)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error reading 
> assemblies: Failed to locate component descriptor: 
> src/main/resources/assemblies/component.xml
>       at 
> org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:356)
>       at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:133)
>       ... 19 more
> Caused by: org.apache.maven.plugin.assembly.io.AssemblyReadException: Failed 
> to locate component descriptor: src/main/resources/assemblies/component.xml
>       at 
> org.apache.maven.plugin.assembly.io.DefaultAssemblyReader.mergeComponentsWithMainAssembly(DefaultAssemblyReader.java:452)
>       at 
> org.apache.maven.plugin.assembly.io.DefaultAssemblyReader.readAssembly(DefaultAssemblyReader.java:366)
>       at 
> org.apache.maven.plugin.assembly.io.DefaultAssemblyReader.addAssemblyForDescriptorReference(DefaultAssemblyReader.java:257)
>       at 
> org.apache.maven.plugin.assembly.io.DefaultAssemblyReader.readAssemblies(DefaultAssemblyReader.java:149)
>       at 
> org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:352)
>       ... 21 more
> [ERROR] 
> {quote}



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to