More data points on this problem: The build failure I reported is caused when I have <goal>attached</goal> in my pom. However if I don't have this but have <goal>directory-inline</goal> instead it does not fail but then it does not make the final jar specified by the <finalName>custom-name</finalName> pom entry.
Oh how, it times like these, I just wish that maven was simpler. There is no useful information on the maven-assembly-plugin web site that explains when these entries are valid or not. All I want to do is specify the name of my jar with dependencies artifact when I run mvn clean install. Any ideas how to get this work? -Dave -----Original Message----- From: Dave Hoffer [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 09, 2007 4:37 PM To: Maven Users List Subject: RE: How can I specify the output name using maven-assembly-plugin? When I include <appendAssemblyId>false</appendAssemblyId> I get the following build error, any ideas? Here is my pom's plugin config: <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>directory-inline</goal> <goal>attached</goal> </goals> </execution> </executions> [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] An invalid artifact was detected. This artifact might be in your project's POM, or it might have been included tra nsitively during the resolution process. Here is the information we do have for this artifact: o GroupID: com.xrite.tcd o ArtifactID: matchstik-tcd o Version: 1.1-SNAPSHOT o Type: jar [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.artifact.InvalidArtifactRTException: For artifact {com.xrite.tc d:matchstik-tcd:1.1-SNAPSHOT:jar}: An attached artifact must have a different ID than its corresponding main artifact. at org.apache.maven.project.artifact.AttachedArtifact.<init>(AttachedArt ifact.java:51) at org.apache.maven.project.DefaultMavenProjectHelper.attachArtifact(Def aultMavenProjectHelper.java:53) at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(A bstractAssemblyMojo.java:295) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:443) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi fecycle(DefaultLifecycleExecutor.java:480) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:459) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:143) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) at org.apache.maven.cli.MavenCli.main(MavenCli.java:280) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.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) [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 minute 40 seconds [INFO] Finished at: Tue Oct 09 16:34:04 EDT 2007 [INFO] Final Memory: 13M/28M [INFO] ------------------------------------------------------------------------ C:\svn\toolcrib\ToolCrib\matchstik-tcd\trunk> -Dave -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rodolphe Beck Sent: Tuesday, October 09, 2007 11:26 AM To: Maven Users List Subject: Re: How can I specify the output name using maven-assembly-plugin? Hi, <configuration> <finalName>custom-name</finalName> <appendAssemblyId>false</appendAssemblyId> </configuration> http://maven.apache.org/plugins/maven-assembly-plugin/assembly-mojo.html 2007/10/9, Dave Hoffer <[EMAIL PROTECTED]>: > > How can I specify the output name of the generated jar-with-dependencies > artifact using maven-assembly-plugin? I want the final jar to be called > something like somename.xyz. > > > > > > > > > > -- Cordialement, Rodolphe Beck [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
