Yep, that is it. I have the same problem with a servicemix plugin as well. It must be a bug with some dependency that is used by maven because not everyone is experiencing this behavior. I have a colleague at a former company that has tried both plugins in his environment with maven-2.0.9 and it works properly for him.
These are rather nasty bugs to deal with in maven because they are so difficult to pinpoint what is going on. Also, bugs that happen with the reactor, but do not happen when the individual project is built are quite common in maven, from my experience over the last 3 years or so. These bugs eat up many man hours trying to debug. We have found that the only way we can be sure that something works in maven is to test not only on an individual project, but a project with at least 3 levels of inheritance. Also, we need to blow away the local repo and try downloading fresh artifacts to see if downloading new artifacts causes strange behavior. We have found that if we don't test all 3 scenarios, we can end up with major maven issues that can cost developers many lost days. Sadly, it makes many people dislike maven and want to go back to ant. We have taken many precautions, such as locking down plugin versions and using depedencyManagement to control versions of jars, but we still encounter these issues. Sometimes, I wonder if it is worth it as I spend more time solving maven issues that developing code for my company...sigh Jason -----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]
