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]

Reply via email to