Nice catch - thanks. Fixed in svn. - Brett
On 8/17/05, Van Steenberghe Mario (GFDI) <[EMAIL PROTECTED]> wrote: > Ok, problem solved ! In fact, there must be a <component-set> tag > surrounding the <components> (which is missing in the docs) tag as > follows: > > <component-set> > <components> > <component> > <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role> > <role-hint>rcpApplication</role-hint> > > <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMappi > ng</implementation> > <configuration> > <phases> > <package>eclipsebuilder:rcpApplication</package> > <install>eclipsebuilder:installRcpApplication</install> > <deploy>eclipsebuilder:deployRcpApplication</deploy> > </phases> > </configuration> > </component> > </components> > </component-set> > > Regards, > Mario. > > -----Original Message----- > From: Van Steenberghe Mario (GFDI) [mailto:[EMAIL PROTECTED] > > Sent: woensdag 17 augustus 2005 15:12 > To: Maven Users List > Subject: RE: [m2] how to create a new lifecycle mapping ? > > I tried your suggestion, but it still doesn't seem to work... > > > > This is what I have: > > > > A plugin, named 'maven-eclipsebuilder-plugin'. Inside this plugin I have > some mojos, and the src/main/resources/META-INF/plexus/components.xml. > > > > After plugin installation, I get the following jar file in my local > repository: > > > > 0 Wed Aug 17 15:06:22 CEST 2005 META-INF/ > > 247 Wed Aug 17 15:06:20 CEST 2005 META-INF/MANIFEST.MF > > 0 Wed Aug 17 15:06:22 CEST 2005 META-INF/plexus/ > > 510 Wed Aug 17 14:41:50 CEST 2005 META-INF/plexus/components.xml > > 0 Wed Aug 17 15:06:22 CEST 2005 be/ > > 0 Wed Aug 17 15:06:22 CEST 2005 be/gfdi/ > > 0 Wed Aug 17 15:06:22 CEST 2005 be/gfdi/fwk/ > > 0 Wed Aug 17 15:06:22 CEST 2005 be/gfdi/fwk/maven2/ > > 0 Wed Aug 17 15:06:22 CEST 2005 be/gfdi/fwk/maven2/eclipse/ > > 3581 Wed Aug 17 15:06:18 CEST 2005 > be/gfdi/fwk/maven2/eclipse/PluginJarMojo.class > > 0 Wed Aug 17 15:06:22 CEST 2005 be/gfdi/fwk/maven2/eclipse/core/ > > 4034 Wed Aug 17 15:06:18 CEST 2005 > be/gfdi/fwk/maven2/eclipse/core/EclipsePluginUtils.class > > 0 Wed Aug 17 15:06:22 CEST 2005 META-INF/maven/ > > 0 Wed Aug 17 15:06:22 CEST 2005 > META-INF/maven/org.apache.maven.plugins/ > > 0 Wed Aug 17 15:06:22 CEST 2005 > META-INF/maven/org.apache.maven.plugins/maven-eclipsebuilder-plugin/ > > 6221 Wed Aug 17 15:06:22 CEST 2005 > META-INF/maven/org.apache.maven.plugins/maven-eclipsebuilder-plugin/pom. > xml > > 2397 Wed Aug 17 15:06:18 CEST 2005 > be/gfdi/fwk/maven2/eclipse/DeployPluginJarMojo.class > > 51835 Thu Aug 11 16:06:20 CEST 2005 tmp.txt > > 8211 Wed Aug 17 15:06:10 CEST 2005 META-INF/maven/plugin.xml > > 2138 Wed Aug 17 15:06:18 CEST 2005 > be/gfdi/fwk/maven2/eclipse/InstallPluginJarMojo.class > > 136 Wed Aug 17 15:06:22 CEST 2005 > META-INF/maven/org.apache.maven.plugins/maven-eclipsebuilder-plugin/pom. > properties > > > > > > Now, in my project POM I have the following: > > > > <project> > > > > <parent> > > <groupId>jade2</groupId> > > <artifactId>main</artifactId> > > <version>HEAD</version> > > </parent> > > > > <modelVersion>4.0.0</modelVersion> > > <groupId>jade2</groupId> > > <artifactId>application</artifactId> > > <version>HEAD</version> > > <packaging>rcpApplication</packaging> > > > > <build> > > <plugins> > > <plugin> > > <groupId>org.apache.maven.plugins</groupId> > > <artifactId>maven-eclipsebuilder-plugin</artifactId> > > <version>HEAD</version> > > <extensions>true</extensions> > > </plugin> > > </plugins> > > </build> > > > > </project> > > > > When I run m2 -e deploy, I get the following: > > > > + Error stacktraces are turned on. > > [INFO] > ------------------------------------------------------------------------ > ---- > > [INFO] Building jade2:application:rcpApplication:HEAD > > [INFO] task-segment: [deploy] > > [INFO] > ------------------------------------------------------------------------ > ---- > > [ERROR] Nonexistent component: > org.apache.maven.lifecycle.mapping.LifecycleMappingrcpApplication > > [ERROR] Nonexistent component: > org.apache.maven.lifecycle.mapping.LifecycleMappingrcpApplication > > FATAL ERROR: Error executing Maven for a project > > Error stacktrace: > > org.apache.maven.reactor.ReactorException: Error executing project > within the reactor > > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:241) > > at org.apache.maven.cli.MavenCli.main(MavenCli.java:292) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav > a:79) > > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor > Impl.java:41) > > at java.lang.reflect.Method.invoke(Method.java:386) > > at > org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > > at > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > > Caused by: org.apache.maven.lifecycle.LifecycleExecutionException: > Cannot find lifecycle mapping for packaging: 'rcpApplication'. > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.findMappingsForLifec > ycle(DefaultLifecycleExecutor.java:618) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindLifecycleForPack > aging(DefaultLifecycleExecutor.java:555) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMa > ppings(DefaultLifecycleExecutor.java:539) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL > ifecycleExecutor.java:430) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments( > DefaultLifecycleExecutor.java:268) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec > ycleExecutor.java:127) > > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186) > > ... 9 more > > Caused by: > org.codehaus.plexus.component.repository.exception.ComponentLookupExcept > ion: Component descriptor cannot be found in the component repository: > org.apache.ma > > ven.lifecycle.mapping.LifecycleMappingrcpApplication. > > at > org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer > .java:299) > > at > org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer > .java:416) > > at > org.apache.maven.execution.MavenSession.lookup(MavenSession.java:98) > > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.findMappingsForLifec > ycle(DefaultLifecycleExecutor.java:614) > > ... 15 more > > > > > > > > Thanks in advance for your help, > > Mario. > > > > -----Original Message----- > From: Brett Porter [mailto:[EMAIL PROTECTED] > Sent: woensdag 17 augustus 2005 14:52 > To: Maven Users List > Subject: Re: [m2] how to create a new lifecycle mapping ? > > > > The lifecycle doco may have been misleading - the components file you > > have must be in a plugin that has the goals you've created. > > > > You must then declare this plugin in your project with the > > <extensions>true</extensions> flag (this is new as of beta-1-SNAPSHOT, > > previously it did not work). > > > > Hope this helps. > > > > Cheers > > Brett > > > > On 8/17/05, Van Steenberghe Mario (GFDI) <[EMAIL PROTECTED]> > wrote: > > > Hello, > > > > > > > > > > > > I'm trying to create a new lifecyle mapping in maven2. For this I > create > > > a file named components.xml inside src/main/resources/META-INF/plexus > as > > > follows: > > > > > > > > > > > > <components> > > > > > > <component> > > > > > > <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role> > > > > > > <role-hint>rcpApplication</role-hint> > > > > > > > > > > <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMappi > > > ng</implementation> > > > > > > <configuration> > > > > > > <phases> > > > > > > <package>eclipsebuilder:rcpApplication</package> > > > > > > <install>eclipsebuilder:installRcpApplication</install> > > > > > > <deploy>eclipsebuilder:deployRcpApplication</deploy> > > > > > > </phases> > > > > > > </configuration> > > > > > > </component> > > > > > > </components> > > > > > > > > > > > > In my POM I refer to this lifecycle as follows: > > > > > > > > > > > > <project> > > > > > > > > > > > > <parent> > > > > > > <groupId>jade2</groupId> > > > > > > <artifactId>main</artifactId> > > > > > > <version>HEAD</version> > > > > > > </parent> > > > > > > > > > > > > <modelVersion>4.0.0</modelVersion> > > > > > > <groupId>jade2</groupId> > > > > > > <artifactId>application</artifactId> > > > > > > <version>HEAD</version> > > > > > > <packaging>rcpApplication</packaging> > > > > > > > > > > > > </project> > > > > > > > > > > > > Apparantly, maven2 doesn't seem to know where to find this lifecycle. > > > When I run m2 -e deploy, I get the following exception: > > > > > > > > > > > > [ERROR] Nonexistent component: > > > org.apache.maven.lifecycle.mapping.LifecycleMappingrcpApplication > > > > > > FATAL ERROR: Error executing Maven for a project > > > > > > Error stacktrace: > > > > > > org.apache.maven.reactor.ReactorException: Error executing project > > > within the reactor > > > > > > at > org.apache.maven.DefaultMaven.execute(DefaultMaven.java:241) > > > > > > at org.apache.maven.cli.MavenCli.main(MavenCli.java:292) > > > > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > > > > at > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav > > > a:79) > > > > > > at > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor > > > Impl.java:41) > > > > > > at java.lang.reflect.Method.invoke(Method.java:386) > > > > > > at > > > org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > > > > > > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > > > > > > at > > > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > > > > > > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > > > > > > Caused by: org.apache.maven.lifecycle.LifecycleExecutionException: > > > Cannot find lifecycle mapping for packaging: 'rcpApplication'. > > > > > > at > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.findMappingsForLifec > > > ycle(DefaultLifecycleExecutor.java:618) > > > > > > at > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindLifecycleForPack > > > aging(DefaultLifecycleExecutor.java:555) > > > > > > at > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMa > > > ppings(DefaultLifecycleExecutor.java:539) > > > > > > at > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL > > > ifecycleExecutor.java:430) > > > > > > at > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments( > > > DefaultLifecycleExecutor.java:268) > > > > > > at > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec > > > ycleExecutor.java:127) > > > > > > at > org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186) > > > > > > ... 9 more > > > > > > Caused by: > > > > org.codehaus.plexus.component.repository.exception.ComponentLookupExcept > > > ion: Component descriptor cannot be found in the component repository: > > > org.apache.ma > > > > > > ven.lifecycle.mapping.LifecycleMappingrcpApplication. > > > > > > at > > > > org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer > > > .java:299) > > > > > > at > > > > org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer > > > .java:416) > > > > > > at > > > org.apache.maven.execution.MavenSession.lookup(MavenSession.java:98) > > > > > > at > > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.findMappingsForLifec > > > ycle(DefaultLifecycleExecutor.java:614) > > > > > > ... 15 more > > > > > > > > > > > > > > > > > > Is there anyone out there experiencing the same problems, or perhaps > > > knows how the maven2 lifecycle binding works ? > > > > > > > > > > > > Thanks, > > > > > > Mario. > > > > > > > > > > > > > --------------------------------------------------------------------- > > 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]
