2009/2/4 Jason Chaffee <[email protected]>

> I found a workaround that works, but it really bothers me because there is
> an underlying issue here that is unresolved and could cause any number of
> plugins to not work properly.
>

yep, same here - I really hope it gets fixed sooner rather than later...


> Here is the workaround:
>
> Instead of making a primary artifact, I attach the artifact.
>
>        projectHelper.attachArtifact(project, "exe", null, file);
>        //project.getArtifact().setFile(file);
>
>
> -----Original Message-----
> From: Jason Chaffee [mailto:[email protected]]
> Sent: Tuesday, February 03, 2009 12:35 PM
> To: Maven Developers List
> Subject: RE: Issue with ArtifactHandler in reactor builds
>
> FYI, I looked into the workaround that was suggested...resetting the
> extension in the ArtifactHandler.  However, I found that the extension is
> set correctly in both the reactor build and individual project build.  It is
> almost as if there is some code that isn't even using extension, but rather
> using packaging.
>
> -----Original Message-----
> From: Stuart McCulloch [mailto:[email protected]]
> Sent: Monday, February 02, 2009 10:46 PM
> To: [email protected]
> Subject: Re: Issue with ArtifactHandler in reactor builds
>
> 2009/2/3 Jason Chaffee <[email protected]>
>
> > I am having an issue on 2.0.9.  Basicallly, I have a custom plugin that
> has
> > it's own packaging type and creates a file of it's own extension type.
>  This
> > only happens if I run a reactor build.  If run maven in that project, it
> > works correctly. For example,
> >
> > <packaging>my-bundle</packaging>
> >
> > will create artifactId-version.exe
> >
> > However, with maven-2.0.9 it creates the file correcting in the target
> > directory but it installs it and deploys it as
> artifactId-version.my-bundle.
> > Here is an example output:
> >
> > [INFO] Installing
> >
> C:\workspace\server\manager\project\bundle\target\project-1.0.0-SNAPSHOT.exe
> > to C:\Documents and
> >
> Settings\jason.chaffee\.m2\repository\com\foo\project\project\1.0.0-SNAPSHOT\project-1.0.0-SNAPSHOT.my-bundle
> >
> > I wrote a similar plugin with a previous company and it worked fine.
>  That
> > was on maven-2.0.7 though.
> >
> > Here is my component.xml snippet?
> > <component-set>
> >  <components>
> >     ...
> >    <component>
> >      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
> >      <role-hint>my-bundle</role-hint>
> >
> >
>  
> <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
> >      <configuration>
> >        <extension>exe</extension>
> >        <type>my-bundle</type>
> >        <packaging>my-bundle</packaging>
> >        <language>java</language>
> >        <addedToClasspath>true</addedToClasspath>
> >      </configuration>
> >    </component>
> >  </components>
> > </component-set>
> >
> > Does anyone have any ideas what could be happening here or have a good
> way
> > to debug this?
> >
>
> hmm, sounds like http://jira.codehaus.org/browse/MNG-2426 (see also
> MNG-1682)
>
> as a workaround you could try to reset the handler extension in your code
> before
> installing the artifact, but this might require messing around with Maven
> internals
>
> --
> Cheers, Stuart
>
> ---------------------------------------------------------------------
> 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]
>
>


-- 
Cheers, Stuart

Reply via email to