RE: Classifier now required by assembly plugin
Casey is correct maven-assembly-plugin assembly package single src/main/assembly/bin.xml true http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd";> bin zip true Martin __ please do not alter or disrupt this transmission. thank you > Date: Mon, 25 Oct 2010 17:24:01 -0400 > From: jdca...@commonjava.org > To: users@maven.apache.org > Subject: Re: Classifier now required by assembly plugin > > Just to be clear, it's been a long-standing bug that the assembly id was > NOT required. It's always been the intention to require that element. > > That's why we provided the configuration element, to > give the user control over whether that id is used to form the > coordinate for the resulting artifact. > > This snippet from AbstractAssemblyMojo.java seems to indicate the flag > is used correctly. If not, then THAT's the bug, IMO. > > http://pastebin.com/YqEju8EM > > if ( attach && destFile.isFile() ) > { > if ( isAssemblyIdAppended() ) > { > projectHelper.attachArtifact( project, > format, assembly.getId(), destFile ); > } > else if ( classifier != null ) > { > projectHelper.attachArtifact( project, > format, classifier, destFile ); > } > else if ( !"pom".equals( type ) && > format.equals( type ) ) > { > if ( !warnedAboutMainProjectArtifact ) > { > final StringBuffer message = new > StringBuffer(); > > message.append( "Configuration options: > 'appendAssemblyId' is set to false, and 'classifier' is missing." ); > message.append( "\nInstead of attaching > the assembly file: " ) > .append( destFile ) > .append( ", it will become the > file for main project artifact." ); > message.append( "\nNOTE: If multiple > descriptors or descriptor-formats are provided for this project, the > value of this file will be non-deterministic!" ); > > getLog().warn( message ); > warnedAboutMainProjectArtifact = true; > } > > final File existingFile = project.getArtifact() > .getFile(); > if ( ( existingFile != null ) && > existingFile.exists() ) > { > getLog().warn( "Replacing pre-existing > project main-artifact file: " + existingFile > + > "\nwith assembly file: " + destFile ); > } > > project.getArtifact() > .setFile( destFile ); > } > else > { > projectHelper.attachArtifact( project, > format, null, destFile ); > } > > > On 10/25/10 1:07 PM, Haszlakiewicz, Eric wrote: > >> -Original Message- > >> From: Wendy Smoak [mailto:wsm...@gmail.com] > >> > >> On Thu, Oct 21, 2010 at 1:40 PM, Phillip Hellewell > >> wrote: > >>> I just found out the hard way that the latest version of the assembly > >>> plugin requires an tag in the descriptor file, which is used as > >>> the classifier appended to the zip. > >>> > >>> I don't want to specify an id here because then means I have to > >>> specify a classifier in the dependency section of my ot
Re: Classifier now required by assembly plugin
Just to be clear, it's been a long-standing bug that the assembly id was NOT required. It's always been the intention to require that element. That's why we provided the configuration element, to give the user control over whether that id is used to form the coordinate for the resulting artifact. This snippet from AbstractAssemblyMojo.java seems to indicate the flag is used correctly. If not, then THAT's the bug, IMO. http://pastebin.com/YqEju8EM if ( attach && destFile.isFile() ) { if ( isAssemblyIdAppended() ) { projectHelper.attachArtifact( project, format, assembly.getId(), destFile ); } else if ( classifier != null ) { projectHelper.attachArtifact( project, format, classifier, destFile ); } else if ( !"pom".equals( type ) && format.equals( type ) ) { if ( !warnedAboutMainProjectArtifact ) { final StringBuffer message = new StringBuffer(); message.append( "Configuration options: 'appendAssemblyId' is set to false, and 'classifier' is missing." ); message.append( "\nInstead of attaching the assembly file: " ) .append( destFile ) .append( ", it will become the file for main project artifact." ); message.append( "\nNOTE: If multiple descriptors or descriptor-formats are provided for this project, the value of this file will be non-deterministic!" ); getLog().warn( message ); warnedAboutMainProjectArtifact = true; } final File existingFile = project.getArtifact() .getFile(); if ( ( existingFile != null ) && existingFile.exists() ) { getLog().warn( "Replacing pre-existing project main-artifact file: " + existingFile + "\nwith assembly file: " + destFile ); } project.getArtifact() .setFile( destFile ); } else { projectHelper.attachArtifact( project, format, null, destFile ); } On 10/25/10 1:07 PM, Haszlakiewicz, Eric wrote: -Original Message- From: Wendy Smoak [mailto:wsm...@gmail.com] On Thu, Oct 21, 2010 at 1:40 PM, Phillip Hellewell wrote: I just found out the hard way that the latest version of the assembly plugin requires an tag in the descriptor file, which is used as the classifier appended to the zip. I don't want to specify an id here because then means I have to specify a classifier in the dependency section of my other poms. Have you tried setting appendAssemblyId to false? No, that doesn't help, but thanks for the suggestion. In my opinion, and probably according to what most people would think is reasonable for *minimal* release between a beta version and a final version, a huge behaviour change like this shouldn't happen. I was finally able to test this with the 2.2 release version, and it fails for me too, so I created a issue in Jira: MASSEMBLY-517. eric - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- John Casey Developer, PMC Member - Apache Maven (http://maven.apache.org) Blog: http://www.johnofalltrades.name/ - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Classifier now required by assembly plugin
A simple scan of the release notes reveals this was introduced intentionally by MASSEMBLY-464 On Mon, Oct 25, 2010 at 4:58 PM, Wendy Smoak wrote: > On Mon, Oct 25, 2010 at 1:07 PM, Haszlakiewicz, Eric > wrote: >>>-Original Message- >>>From: Wendy Smoak [mailto:wsm...@gmail.com] > >>>Have you tried setting appendAssemblyId to false? >> >> No, that doesn't help, but thanks for the suggestion. > > How so? If is required (and this is a good thing) then > appendAssemblyId should keep it out of the filename. > > -- > Wendy > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Classifier now required by assembly plugin
On Mon, Oct 25, 2010 at 1:07 PM, Haszlakiewicz, Eric wrote: >>-Original Message- >>From: Wendy Smoak [mailto:wsm...@gmail.com] >>Have you tried setting appendAssemblyId to false? > > No, that doesn't help, but thanks for the suggestion. How so? If is required (and this is a good thing) then appendAssemblyId should keep it out of the filename. -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Classifier now required by assembly plugin
I'll add comments but I don't think this is a bug. On Mon, Oct 25, 2010 at 4:23 PM, Phillip Hellewell wrote: > On Mon, Oct 25, 2010 at 11:07 AM, Haszlakiewicz, Eric > wrote: >> >> I was finally able to test this with the 2.2 release version, and it >> fails for me too, so I created a issue in Jira: MASSEMBLY-517. > > Thanks Eric. Now I don't have to create it :) > > Phillip > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Classifier now required by assembly plugin
On Mon, Oct 25, 2010 at 11:07 AM, Haszlakiewicz, Eric wrote: > > I was finally able to test this with the 2.2 release version, and it > fails for me too, so I created a issue in Jira: MASSEMBLY-517. Thanks Eric. Now I don't have to create it :) Phillip - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Classifier now required by assembly plugin
>-Original Message- >From: Wendy Smoak [mailto:wsm...@gmail.com] > >On Thu, Oct 21, 2010 at 1:40 PM, Phillip Hellewell >wrote: >> I just found out the hard way that the latest version of the assembly >> plugin requires an tag in the descriptor file, which is used as >> the classifier appended to the zip. >> >> I don't want to specify an id here because then means I have to >> specify a classifier in the dependency section of my other poms. > >Have you tried setting appendAssemblyId to false? No, that doesn't help, but thanks for the suggestion. In my opinion, and probably according to what most people would think is reasonable for *minimal* release between a beta version and a final version, a huge behaviour change like this shouldn't happen. I was finally able to test this with the 2.2 release version, and it fails for me too, so I created a issue in Jira: MASSEMBLY-517. eric - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Classifier now required by assembly plugin
On Thu, Oct 21, 2010 at 1:40 PM, Phillip Hellewell wrote: > I just found out the hard way that the latest version of the assembly > plugin requires an tag in the descriptor file, which is used as > the classifier appended to the zip. > > I don't want to specify an id here because then means I have to > specify a classifier in the dependency section of my other poms. Have you tried setting appendAssemblyId to false? -- Wendy - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Classifier now required by assembly plugin
>-Original Message- >From: Phillip Hellewell [mailto:ssh...@gmail.com] > >On Thu, Oct 21, 2010 at 3:17 PM, Haszlakiewicz, Eric > wrote: >> >> uh, oh. We depend on being able to specify that as empty too. I hope >this gets fixed before it starts affecting my builds. >> However, are you sure this is really an issue? I just tried one of my >builds which needs an empty element. I tried using the default >version of the plugin (2.2-beta-2), and forcing it to the most recent >version (which appears to be 2.2-beta-5), and it works fine for me. >> What version are you using? > >2.2, which was released a couple weeks ago apparently: > >http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-assembly- >plugin/2.2/ hmm.. weird, the index my Nexus instance isn't picking up this version, so I can't try this out. Well, if you're sure you're seeing the problem, can you please create a Jira issue for this? I'll bet we're not the only two people that will be affected by it. eric - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Classifier now required by assembly plugin
On Thu, Oct 21, 2010 at 3:17 PM, Haszlakiewicz, Eric wrote: > > uh, oh. We depend on being able to specify that as empty too. I hope this > gets fixed before it starts affecting my builds. > However, are you sure this is really an issue? I just tried one of my builds > which needs an empty element. I tried using the default version of the > plugin (2.2-beta-2), and forcing it to the most recent version (which appears > to be 2.2-beta-5), and it works fine for me. > What version are you using? 2.2, which was released a couple weeks ago apparently: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-assembly-plugin/2.2/ Phillip - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Classifier now required by assembly plugin
>-Original Message- >From: Phillip Hellewell [mailto:ssh...@gmail.com] > >On Thu, Oct 21, 2010 at 11:40 AM, Phillip Hellewell >wrote: >> I just found out the hard way that the latest version of the assembly >> plugin requires an tag in the descriptor file, which is used as >> the classifier appended to the zip. >> >> I don't want to specify an id here because then means I have to >> specify a classifier in the dependency section of my other poms. If >> my project only produces a single zip, why should I have to worry >> about specifying a classifier in all my other poms that depend on this >> project? > >This is the error it gives now if I don't have an in my descriptor >file: > >Assembly is incorrectly configured: null >Assembly: null is not configured correctly: Assembly ID must be >present and non-empty. > >Phillip uh, oh. We depend on being able to specify that as empty too. I hope this gets fixed before it starts affecting my builds. However, are you sure this is really an issue? I just tried one of my builds which needs an empty element. I tried using the default version of the plugin (2.2-beta-2), and forcing it to the most recent version (which appears to be 2.2-beta-5), and it works fine for me. What version are you using? eric - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Classifier now required by assembly plugin
On Thu, Oct 21, 2010 at 11:40 AM, Phillip Hellewell wrote: > I just found out the hard way that the latest version of the assembly > plugin requires an tag in the descriptor file, which is used as > the classifier appended to the zip. > > I don't want to specify an id here because then means I have to > specify a classifier in the dependency section of my other poms. If > my project only produces a single zip, why should I have to worry > about specifying a classifier in all my other poms that depend on this > project? This is the error it gives now if I don't have an in my descriptor file: Assembly is incorrectly configured: null Assembly: null is not configured correctly: Assembly ID must be present and non-empty. Phillip - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org