Hard to tell for sure without looking at actual build, but this kind of exception is possible under the following conditions
* Maven launch configuration has "Resolve Workspace artifacts" checked (it is unchecked by default) * Referenced dependency is not part of reactor build * Referenced dependency is part of m2e workspace Under these conditions referenced dependency will be resolved to m2e workspace project target/classes folder and assembly plugin will fail with the exception you observe. The solution is to disable "Resolve Workspace artifacts" in the launch configuration. If you believe these are not conditions that you have, please provide small standalone example project and exact steps to reproduce the problem using latest m2e 1.6 snapshot build and we'll have a look. -- Regards, Igor On 2014-11-06, 23:14, Carlos Alegria Galicia wrote:
Hi all, I have a project of type POM that I am using to concentrate several dependencies. From that project, I am inheriting a jar project that has an assembly descriptor attached to the package phase, via the assembly plugin. When I try to package this project, I am getting the following error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5:single (make-assembly) on project child-a: Failed to create assembly: Error adding file 'a.group.id:dep-a:jar:0.0.1-SNAPSHOT' to archive: C:\Users\alegriac\Documents\Projects\Intueri\sub_projects\clasp\workspace-test\dep-a\target\classes isn't a file. -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5:single (make-assembly) on project child-a: Failed to create assembly: Error adding file 'a.group.id:dep-a:jar:0.0.1-SNAPSHOT' to archive: C:\Users\alegriac\Documents\Projects\Intueri\sub_projects\clasp\workspace-test\dep-a\target\classes isn't a file. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213) at org.apache.maven.cli.MavenCli.main(MavenCli.java:157) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to create assembly: Error adding file 'a.group.id:dep-a:jar:0.0.1-SNAPSHOT' to archive: C:\Users\alegriac\Documents\Projects\Intueri\sub_projects\clasp\workspace-test\dep-a\target\classes isn't a file. at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:530) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 19 more Caused by: org.apache.maven.plugin.assembly.archive.ArchiveCreationException: Error adding file 'a.group.id:dep-a:jar:0.0.1-SNAPSHOT' to archive: C:\Users\alegriac\Documents\Projects\Intueri\sub_projects\clasp\workspace-test\dep-a\target\classes isn't a file. at org.apache.maven.plugin.assembly.archive.task.AddArtifactTask.execute(AddArtifactTask.java:216) at org.apache.maven.plugin.assembly.archive.task.AddDependencySetsTask.addNormalArtifact(AddDependencySetsTask.java:342) at org.apache.maven.plugin.assembly.archive.task.AddDependencySetsTask.addDependencySet(AddDependencySetsTask.java:180) at org.apache.maven.plugin.assembly.archive.task.AddDependencySetsTask.execute(AddDependencySetsTask.java:120) at org.apache.maven.plugin.assembly.archive.phase.DependencySetAssemblyPhase.execute(DependencySetAssemblyPhase.java:82) at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:189) at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:475) ... 21 more Caused by: org.codehaus.plexus.archiver.ArchiverException: C:\Users\alegriac\Documents\Projects\Intueri\sub_projects\clasp\workspace-test\dep-a\target\classes isn't a file. at org.codehaus.plexus.archiver.AbstractArchiver.addFile(AbstractArchiver.java:414) at org.codehaus.plexus.archiver.AbstractArchiver.addFile(AbstractArchiver.java:340) at org.apache.maven.plugin.assembly.archive.archiver.AssemblyProxyArchiver.addFile(AssemblyProxyArchiver.java:563) at org.apache.maven.plugin.assembly.archive.task.AddArtifactTask.execute(AddArtifactTask.java:211) ... 27 more [ERROR] [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException This seems to be related to the issue described here https://mail-archives.apache.org/mod_mbox/maven-issues/201009.mbox/%3c14493974.64214.1285253552573.javamail.haus-j...@codehaus01.managed.contegix.com%3E. So if I understood correctly, there is a problem while using a multimodule project with interdependencies in m2e. Does anyone have faced this issue?, is there a known workaround? Thanks a lot, Carlos Alegria _______________________________________________ m2e-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/m2e-users
_______________________________________________ m2e-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/m2e-users
