maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ronald Sigmund (JIRA)" <j...@codehaus.org>
Subject [jira] (MASSEMBLY-489) Failure to locate component descriptors in another project
Date Wed, 12 Feb 2014 08:45:57 GMT

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

Ronald Sigmund updated MASSEMBLY-489:
-------------------------------------

    Attachment: aggregator.tar.gz

My solution:
unpack the assembly-descriptors and the use 
{code:xml}
<descriptors>
  <descriptor>${project.build.directory}/generated-resources/assemblies/assembly.xml</descriptor>
</descriptors>
{code}
in place of 
{code:xml}
<descriptorRefs>
  <descriptorRef>assembly</descriptorRef>
</descriptorRefs>
{code}.
(!) In the file {{assembly.xml}} you don't use path references.
{code:xml}
	<componentDescriptors>
		<componentDescriptor>component.xml</componentDescriptor>
	</componentDescriptors>
{code}


> 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)

Mime
View raw message