mvn assembly:assembly fails if there is no target directory already present ---------------------------------------------------------------------------
Key: MNG-1578 URL: http://jira.codehaus.org/browse/MNG-1578 Project: Maven 2 Type: Bug Reporter: Matthew Pocock Priority: Minor I have a module that is of type pom. Its job is to agregate a set of dependencies. I want to build a distribution from these, so I tried the assembly plugin. I did get it to work. However, on the way I got this error: [INFO] [assembly:assembly] [INFO] ---------------------------------------------------------------------------- [ERROR] BUILD ERROR [INFO] ---------------------------------------------------------------------------- [INFO] Error creating assembly: /home/nmrp3/devel/derkholm/bjv2/trunk/clis/cli/target isn't a directory. A build for a pom project doesn't make a target directory. But, assembly:assembly requires one. I've made the directory manually and now the assembly builds just fine. The stack-trace is below. I've modified my assembly descriptor file to not mention target/** at all, and it now builds just fine without the target directory being present. The path of least suprise for the end-user would be to behave as if there were no files to find if target is absent and a search is done within target for files. [DEBUG] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Error creating assembly: /home/nmrp3/devel/derkholm/bjv2/trunk/clis/cli/target isn't a directory. at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:544) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:482) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:452) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:301) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:214) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:137) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) at org.apache.maven.cli.MavenCli.main(MavenCli.java:243) 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:585) 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: Error creating assembly: /home/nmrp3/devel/derkholm/bjv2/trunk/clis/cli/target isn't a directory. at org.apache.maven.plugin.assembly.AssemblyMojo.execute(AssemblyMojo.java:173) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:519) ... 16 more Caused by: org.codehaus.plexus.archiver.ArchiverException: /home/nmrp3/devel/derkholm/bjv2/trunk/clis/cli/target isn't a directory. at org.codehaus.plexus.archiver.AbstractArchiver.addDirectory(AbstractArchiver.java:125) at org.apache.maven.plugin.assembly.AssemblyMojo.addDirectory(AssemblyMojo.java:377) at org.apache.maven.plugin.assembly.AssemblyMojo.processFileSets(AssemblyMojo.java:459) at org.apache.maven.plugin.assembly.AssemblyMojo.createArchive(AssemblyMojo.java:209) at org.apache.maven.plugin.assembly.AssemblyMojo.execute(AssemblyMojo.java:165) ... 18 more [INFO] ---------------------------------------------------------------------------- [INFO] Total time: 8 seconds [INFO] Finished at: Tue Nov 15 16:03:51 GMT 2005 [INFO] Final Memory: 3M/6M [INFO] ---------------------------------------------------------------------------- -- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]