[ http://jira.codehaus.org/browse/MASSEMBLY-396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Casey closed MASSEMBLY-396. -------------------------------- Resolution: Won't Fix Assignee: John Casey the assembly plugin expects dependencies to be single files, not directories. In the case of a multimodule build with interdependencies, this means the assembly plugin needs to run at or after the 'package' phase, IF that assembly contains dependencySet's that reference other modules. This is not a bug in the assembly plugin, it's a limitation of the overall build system. There is no way to know that <project-dir>/target/classes is complete before the package phase is run, so it's not safe to allow adding this as a dependency to the assembly. In the case of m2eclipse workspace resolution, the project artifacts effectively point to the result of the 'process-classes' phase in most cases, IIRC, which is why the project artifact is a directory not a file. > Assembly plugin cannot work with m2eclipse 0.9.7 > ------------------------------------------------ > > Key: MASSEMBLY-396 > URL: http://jira.codehaus.org/browse/MASSEMBLY-396 > Project: Maven 2.x Assembly Plugin > Issue Type: Improvement > Affects Versions: 2.2-beta-2 > Environment: Eclipse 3.4.1, m2eclipse 0.9.7, maven-assembly-plugin > 2.2-beta-2 > Reporter: Christoph Kutzinski > Assignee: John Casey > > After upgrading to m2eclipse 0.9.7 my assembly goal stopped working: > [DEBUG] Adding 68 dependency artifacts. > [DEBUG] Adding artifact: > net.tipp24.argo.procurement:procurement-common:jar:0.1.0-SNAPSHOT with file: > /home/ckutz/procurement/eclipse_ws/argo-procurement/procurement-common/target/classes > to assembly location: libs/procurement-common-0.1.0-SNAPSHOT.jar. > [DEBUG] Adding file: > /home/ckutz/procurement/eclipse_ws/argo-procurement/procurement-common/target/classes > to archive location: > procurement-server-0.1.0-SNAPSHOT/libs/procurement-common-0.1.0-SNAPSHOT.jar > [INFO] > ------------------------------------------------------------------------ > [ERROR] BUILD ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] Failed to create assembly: Error adding file > 'net.tipp24.argo.procurement:procurement-common:jar:0.1.0-SNAPSHOT' to > archive: > /home/ckutz/procurement/eclipse_ws/argo-procurement/procurement-common/target/classes > isn't a file. > [INFO] > ------------------------------------------------------------------------ > [DEBUG] Trace > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to create > assembly: Error adding file > 'net.tipp24.argo.procurement:procurement-common:jar:0.1.0-SNAPSHOT' to > archive: > /home/ckutz/procurement/eclipse_ws/argo-procurement/procurement-common/target/classes > isn't a file. > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) > 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.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 adding file > 'net.tipp24.argo.procurement:procurement-common:jar:0.1.0-SNAPSHOT' to > archive: > /home/ckutz/procurement/eclipse_ws/argo-procurement/procurement-common/target/classes > isn't a file. > at > org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:368) > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558) > ... 16 more > Caused by: org.apache.maven.plugin.assembly.archive.ArchiveCreationException: > Error adding file > 'net.tipp24.argo.procurement:procurement-common:jar:0.1.0-SNAPSHOT' to > archive: > /home/ckutz/procurement/eclipse_ws/argo-procurement/procurement-common/target/classes > isn't a file. > at > org.apache.maven.plugin.assembly.archive.task.AddArtifactTask.execute(AddArtifactTask.java:193) > at > org.apache.maven.plugin.assembly.archive.task.AddDependencySetsTask.addDependencySet(AddDependencySetsTask.java:177) > at > org.apache.maven.plugin.assembly.archive.task.AddDependencySetsTask.execute(AddDependencySetsTask.java:116) > at > org.apache.maven.plugin.assembly.archive.phase.DependencySetAssemblyPhase.execute(DependencySetAssemblyPhase.java:74) > at > org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:129) > at > org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:322) > ... 18 more > Caused by: org.codehaus.plexus.archiver.ArchiverException: > /home/ckutz/procurement/eclipse_ws/argo-procurement/procurement-common/target/classes > isn't a file. > at > org.codehaus.plexus.archiver.AbstractArchiver.addFile(AbstractArchiver.java:308) > at > org.codehaus.plexus.archiver.AbstractArchiver.addFile(AbstractArchiver.java:262) > at > org.apache.maven.plugin.assembly.archive.archiver.AssemblyProxyArchiver.addFile(AssemblyProxyArchiver.java:474) > at > org.apache.maven.plugin.assembly.archive.task.AddArtifactTask.execute(AddArtifactTask.java:188) > ... 23 more > From the command line and witjh m2eclipse 0.9.6 it still works fine. -- 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