I'm losing track of this in all the bits and pieces as to what you really have.

I'd suggest looking at the Plexus plugin and comparing the
components.xml to your own:
http://svn.plexus.codehaus.org/trunk/plexus-maven-plugin/

HTH,
Brett

On 11/24/05, Nigel Magnay <[EMAIL PROTECTED]> wrote:
> Ah - I have found out why I'm having trouble - my configuration looks like
>
> <configuration>
>         <extension>war</extension>
>         <type>uberwar</type>
>       </configuration>
>
> This works correctly when I build the project that uses the plugin.
> However, if the project that uses the plugin is built as a part of a
> multiproject build, it fails, using the (incorrect) extension of
> uberwar again. Also in the trace I get
> [ERROR] Nonexistent component:
> org.apache.maven.lifecycle.mapping.LifecycleMappinguberwar
>
> Which seems to not be correct, because it must have read this mapping
> in order to execute the plugin (which it does, because I can see this
> in the output that it is calling my plugin correctly.
>
> Is this a bug, or is there something else I need to set ?
>
>
> On 11/18/05, Brett Porter <[EMAIL PROTECTED]> wrote:
> > As I said, your <type> should be uberwar - not war (it needs to match
> > the role-hint, as
> > stated in the docs).
> >
> > On 11/18/05, Nigel Magnay <[EMAIL PROTECTED]> wrote:
> > > I have an 'uberwar' mojo; it's components.xml has a lifecyclemapping
> > > and an artifacthandler definition, both with the role-hint of uberwar.
> > >
> > > My project that uses this mojo has a pom.xml with
> > > <packaging>uberwar</packaging>
> > >
> > > The lifecycle is working correctly, my mojo is being called in the
> > > packaging step. It does a getArtifact().setFile() correctly - the
> > > package should be have an extension of .war.
> > >
> > > The components.xml for the mojo has the configuration that states
> > > <extension>war</extension>. However, when the install plugin runs, it
> > > copies <artifact>.war into the repository as <artifact>.uberwar
> > >
> > > Attaching a debugger seems to show that when the installer determines
> > > the name for the artifact in the repository, it's asking the
> > > defaultArtifactHandler.getExtension() - the value of its member
> > > variable is null, so it defaults to the type (which is uberwar).
> > >
> > > So it sounds like I'm configuring the DefaultArtifactHandle wrongly if
> > > its not getting the config I am passing..
> > >
> > > On 11/17/05, John Casey <[EMAIL PROTECTED]> wrote:
> > > > -----BEGIN PGP SIGNED MESSAGE-----
> > > > Hash: SHA1
> > > >
> > > > Yes, the private member vars are injected with values from the
> > > > configuration. That's how plexus works by default (plexus is the
> > > > underlying container Maven uses).
> > > >
> > > > So, you have a POM with <packaging>uberwar</packaging>, and it's setting
> > > > the extension to 'uberwar'?
> > > >
> > > > Or, is it that you have a dependency in another POM with
> > > > <type>uberwar</type>, and it's looking for a dependency artifact with an
> > > > extension of 'uberwar' rather than 'war'?
> > > >
> > > > Sorry, I'm a little confused.
> > > >
> > > > - -j
> > > >
> > > > Nigel Magnay wrote:
> > > > | Yep - I'm pretty sure it's reading it as there is also a
> > > > | LifecycleMapping which is being used correctly.
> > > > |
> > > > | Are the private member variables supposed to get read set by some
> > > > | persistence mechanism from the configuration node ?
> > > > |
> > > > |
> > > > | On 11/17/05, John Casey <[EMAIL PROTECTED]> wrote:
> > > > |
> > > > | You're defining this components.xml in a plugin, right? Do you have
> > > > | <extensions>true</extensions> defined in the plugin reference within
> > > > | your plugin-user POM? If not, it will use a default artifact handler
> > > > | that has the same type as your packaging, and the same extension as 
> > > > your
> > > > | packaging...
> > > > |
> > > > | -j
> > > > |
> > > > | Nigel Magnay wrote:
> > > > | | Hello - I have been trying to follow the configuration for
> > > > | | ArtifactHandlers - I have  in my components.xml
> > > > | |
> > > > | | <component>
> > > > | |       <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
> > > > | |       <role-hint>uberwar</role-hint>
> > > > | |
> > > > |
> > > > <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
> > > > | |       <configuration>
> > > > | |         <extension>war</extension>
> > > > | |         <type>war</type>
> > > > | |         <packaging>war</packaging>
> > > > | |         <language>java</language>
> > > > | |         <addedToClasspath>false</addedToClasspath>
> > > > | |       </configuration>
> > > > | |     </component>
> > > > | |
> > > > | | But, looking at DefaultArtifactHandler, the configuration never 
> > > > seems
> > > > | | to be used as there are only private member variables, and extension
> > > > | | defaults to be the same as the type, which will always be 'uberwar' 
> > > > (I
> > > > | | want it to be war).
> > > > | |
> > > > | | Am I missing something? Or is the intention to create your own 
> > > > subtype
> > > > | | of ArtifactHandler rather than using the Default (is the 
> > > > configuration
> > > > | | not implemented?)
> > > > | |
> > > > | | 
> > > > ---------------------------------------------------------------------
> > > > | | 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]
> > > >
> > > >
> > > >
> > > >
> > > > | ---------------------------------------------------------------------
> > > > | To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > | For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > > > -----BEGIN PGP SIGNATURE-----
> > > > Version: GnuPG v1.2.6 (GNU/Linux)
> > > >
> > > > iD8DBQFDfNYtK3h2CZwO/4URAhD7AJ9PjeGqrhU2vfst6l6SkFqMsmFH5gCfbFCo
> > > > 4J7BJTXgfCiuvXn0WmYpK18=
> > > > =kvEp
> > > > -----END PGP SIGNATURE-----
> > > >
> > > > ---------------------------------------------------------------------
> > > > 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]
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > 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]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to