You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Prasad Kashyap <go...@gmail.com> on 2006/10/27 20:22:23 UTC
HELP: Running site goal on a cutom packaging
I need some help with running the site goal on a custom packaging.
This is how the packaging is defined..
http://rifers.org/paste/show/2093
On running 'mvn site' on a pom with this packaging, I get
[DEBUG] Error looking up lifecycle mapping to retrieve optional mojos.
Lifecycle ID: site. Error: Component descriptor cannot be found in the
component repository:
org.apache.maven.lifecycle.mapping.LifecycleMappingintegration-test.
org.codehaus.plexus.component.repository.exception.ComponentLookupException:
Component descriptor cannot be found in the component repository:
org.apache.maven.lifecycle.mapping.LifecycleMappingintegration-test.
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:323)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:440)
In the above components.xml, I tried merging both the <lifecycle>
elements under the same <lifecycles> for the same <role-hint>. The
default execution of the pom failed. I had to separate the <lifecycle>
into separate <component> elements.
Can someone please guide me into the correct path here ?
Thanx
Prasad.
Re: HELP: Running site goal on a cutom packaging
Posted by Prasad Kashyap <go...@gmail.com>.
Hi John,
Thanx for your reply. Your build extensions solution fixed the problem
for me. I don't know why the plugin extension that I had didn't work.
Anyways, I got rid of the error but it still fails to generate the
surefire-report.html.
mvn -e -X site command.
(checkout the first few lines in the logs bvelow)
pom packaging set to "jar" - does generate surefire-report.html
http://people.apache.org/~prasad/site_with_surefire_report.log
custom pom packaging set to "integration-test" - does NOT generate
surefire-report.html
http://people.apache.org/~prasad/site_without_surefire_report.log
components.xml with "integration-test" role-hint
http://people.apache.org/~prasad/components.xml
Cheers
Prasad
On 10/30/06, John Casey <ca...@gmail.com> wrote:
> If you want to provide a custom packaging type, there are a few things you
> may need to do:
>
> 1. Think about your artifact handling for this packaging...if it needs to be
> on the classpath, if it is subject to transitive dependency resolution, etc.
>
> 2. Define your lifecycle mapping in a components.xml within the plugin or
> build extension you intend to use to share it. This file goes in the
> plugin/build extension project under:
>
> src/main/resources/META-INF/plexus/components.xml
>
> 3a. If your custom packaging takes advantage of behavior in a custom plugin,
> you may want to include it via the plugin:
>
> <build>
> <plugins>
> <plugin>
> [...]
> <extensions>true</extensions>
> [...]
>
> The extensions flag tells Maven to look here for custom packaging, artifact
> handlers, etc.
>
> 3b. If your custom packaging DOESN'T use a custom plugin, as in the case
> where you just want to remap phase bindings from another lifecycle mapping,
> you should consider using a build extension. Build extensions are
> plain-vanilla jars that contain the component descriptor as outlined in (2)
> above; it doesn't have to have any associated code with it, just that
> descriptor. Then, include this in the POM of your project with the custom
> packaging, as:
>
> <project>
> [...]
> <packaging>your-custom</packaging>
> [...]
>
> <build>
> <extensions>
> <extension>
> <groupId>...</groupId>
> <artifactId>...</artifactId>
> <version>...</version>
> </extension>
> </extensions>
> </build>
> </project>
>
> HTH,
>
> John
>
> On 10/30/06, Prasad Kashyap <go...@gmail.com> wrote:
> >
> > I need some help with running the site goal on a custom packaging.
> >
> > This is how the packaging is defined..
> > http://rifers.org/paste/show/2093
> >
> > On running 'mvn site' on a pom with this packaging, I get
> >
> > [DEBUG] Error looking up lifecycle mapping to retrieve optional mojos.
> > Lifecycle ID: site. Error: Component descriptor cannot be found in the
> > component repository:
> > org.apache.maven.lifecycle.mapping.LifecycleMappingintegration-test.
> >
> > org.codehaus.plexus.component.repository.exception.ComponentLookupException
> > :
> > Component descriptor cannot be found in the component repository:
> > org.apache.maven.lifecycle.mapping.LifecycleMappingintegration-test.
> > at org.codehaus.plexus.DefaultPlexusContainer.lookup(
> > DefaultPlexusContainer.java:323)
> > at org.codehaus.plexus.DefaultPlexusContainer.lookup(
> > DefaultPlexusContainer.java:440)
> >
> >
> >
> > In the above components.xml, I tried merging both the <lifecycle>
> > elements under the same <lifecycles> for the same <role-hint>. The
> > default execution of the pom failed. I had to separate the <lifecycle>
> > into separate <component> elements.
> >
> > Can someone please guide me into the correct path here ?
> >
> > Thanx
> > Prasad.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: HELP: Running site goal on a cutom packaging
Posted by John Casey <ca...@gmail.com>.
If you want to provide a custom packaging type, there are a few things you
may need to do:
1. Think about your artifact handling for this packaging...if it needs to be
on the classpath, if it is subject to transitive dependency resolution, etc.
2. Define your lifecycle mapping in a components.xml within the plugin or
build extension you intend to use to share it. This file goes in the
plugin/build extension project under:
src/main/resources/META-INF/plexus/components.xml
3a. If your custom packaging takes advantage of behavior in a custom plugin,
you may want to include it via the plugin:
<build>
<plugins>
<plugin>
[...]
<extensions>true</extensions>
[...]
The extensions flag tells Maven to look here for custom packaging, artifact
handlers, etc.
3b. If your custom packaging DOESN'T use a custom plugin, as in the case
where you just want to remap phase bindings from another lifecycle mapping,
you should consider using a build extension. Build extensions are
plain-vanilla jars that contain the component descriptor as outlined in (2)
above; it doesn't have to have any associated code with it, just that
descriptor. Then, include this in the POM of your project with the custom
packaging, as:
<project>
[...]
<packaging>your-custom</packaging>
[...]
<build>
<extensions>
<extension>
<groupId>...</groupId>
<artifactId>...</artifactId>
<version>...</version>
</extension>
</extensions>
</build>
</project>
HTH,
John
On 10/30/06, Prasad Kashyap <go...@gmail.com> wrote:
>
> I need some help with running the site goal on a custom packaging.
>
> This is how the packaging is defined..
> http://rifers.org/paste/show/2093
>
> On running 'mvn site' on a pom with this packaging, I get
>
> [DEBUG] Error looking up lifecycle mapping to retrieve optional mojos.
> Lifecycle ID: site. Error: Component descriptor cannot be found in the
> component repository:
> org.apache.maven.lifecycle.mapping.LifecycleMappingintegration-test.
>
> org.codehaus.plexus.component.repository.exception.ComponentLookupException
> :
> Component descriptor cannot be found in the component repository:
> org.apache.maven.lifecycle.mapping.LifecycleMappingintegration-test.
> at org.codehaus.plexus.DefaultPlexusContainer.lookup(
> DefaultPlexusContainer.java:323)
> at org.codehaus.plexus.DefaultPlexusContainer.lookup(
> DefaultPlexusContainer.java:440)
>
>
>
> In the above components.xml, I tried merging both the <lifecycle>
> elements under the same <lifecycles> for the same <role-hint>. The
> default execution of the pom failed. I had to separate the <lifecycle>
> into separate <component> elements.
>
> Can someone please guide me into the correct path here ?
>
> Thanx
> Prasad.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
HELP: Running site goal on a cutom packaging
Posted by Prasad Kashyap <go...@gmail.com>.
I need some help with running the site goal on a custom packaging.
This is how the packaging is defined..
http://rifers.org/paste/show/2093
On running 'mvn site' on a pom with this packaging, I get
[DEBUG] Error looking up lifecycle mapping to retrieve optional mojos.
Lifecycle ID: site. Error: Component descriptor cannot be found in the
component repository:
org.apache.maven.lifecycle.mapping.LifecycleMappingintegration-test.
org.codehaus.plexus.component.repository.exception.ComponentLookupException:
Component descriptor cannot be found in the component repository:
org.apache.maven.lifecycle.mapping.LifecycleMappingintegration-test.
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:323)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:440)
In the above components.xml, I tried merging both the <lifecycle>
elements under the same <lifecycles> for the same <role-hint>. The
default execution of the pom failed. I had to separate the <lifecycle>
into separate <component> elements.
Can someone please guide me into the correct path here ?
Thanx
Prasad.