OK so I can define a packaging & lifecycle if I edit maven-core/META-INF/componenets.xml directly, but clearly this is not the way to go.
It seems like a bootstrap issue in that the packing from the POM is reacted to before my PDE plugin is read, so there is no chance to have my custom lifecycle/components.xml registered before the build fails Of course when I edit maven-core/META-INF/componenets.xml directly, it can't find my plugin since it assumes that it is in the package org.apache.maven.plugin and tried to download it from ibilio Apologies for pestering you all, but I'd love to get this working or sort out what needs to be changed to enable it Thanks, Matthew > -----Original Message----- > From: Matthew Pryor [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 5 July 2005 9:29 AM > To: 'Maven Developers List' > Subject: RE: help with custom lifecycle > > OK well I have read all that and am sadly no closer to understanding how > to create a custom packaging. > > I want to support a packaging called 'eclipse-plugin'. I have all the code > working in terms of reading the addition to the classpath I want to make, > I just can't seem to be able to work out how to register my custom > lifecycle. > > AFAICT what I want to do is exactly the same as plexus:application, but so > far I don't seem to be able to convince m2 to pick up/read the content of > the components.xml in my plugin. > > I can see the following in maven-core/META-INF/components.xml > > <!-- TODO: move to the plexus plugin --> > <component> > <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role> > <role-hint>plexus-application</role-hint> > <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleM > apping</implementation> > <configuration> > <!-- START SNIPPET: plexus-application-lifecycle --> > <phases> > <generate-resources>plexus:app</generate-resources> > <package>plexus:bundle-application</package> > <install>install:install</install> > <deploy>deploy:deploy</deploy> > </phases> > <!-- END SNIPPET: plexus-application-lifecycle --> > </configuration> > </component> > > But I can't seem to get my own variant of this notices. I have placed it > into the META-INF/components.xml file in my plugin, but when I run m2 > aplha-3, I get the following error > > > [INFO] Deleting directory C:\proj\m2\workspace\m2-plugin-test\target > [ERROR] Nonexistent component: > org.apache.maven.lifecycle.mapping.LifecycleMappingeclipse-plugin > [ERROR] No lifecycle mapping for type 'eclipse-plugin': using defaults > > Am I even on the right track? > > Thanks, > Matthew > > > -----Original Message----- > > From: Emmanuel Venisse [mailto:[EMAIL PROTECTED] > > Sent: Monday, 4 July 2005 4:11 PM > > To: Maven Developers List > > Subject: Re: help with custom lifecycle > > > > You can see some design docs there : > > http://docs.codehaus.org/display/MAVEN/Lifecycle > > > > Emmanuel > > > > > > Matthew Pryor wrote: > > > I am trying to write/refine the mevenide Eclise PDE builder maven2 > > plugin. > > > > > > > > > > > > In essence what this plugin needs to do is to read an XML file > > (plugin.xml) > > > and add a bunch of jar files to the classpath prior to compilation or > > > testing. > > > > > > > > > > > > I have all the latest source for m2 and am not 100% sure about the > right > > > approach, but I think I will start with a custom lifecycle what will > > class a > > > slight modified compiler that add the 'private' Eclipse PDE > dependencies > > > > > > > > > > > > <side-note> > > > > > > I suppose I could go down the path of trying to treat the > > > Eclipse specific stuff as real dependencies and create artifacts for > > them > > > and write a custom artifact handler that could read them from the > > Eclipse > > > plugins folder, but I think that would be a lot of code and not be > that > > much > > > better than simply adding the jar files to the classpath before > calling > > the > > > AbstractCompilerMojo - private API issues aside > > > > > > </side-note> > > > > > > > > > > > > So my question is, after having read > > > http://maven.apache.org/maven2/lifecycle.html and attempting to follow > > it, I > > > get the following > > > > > > > > > > > > [INFO] Deleting directory C:\proj\m2\workspace\m2-plugin-test\target > > > > > > [ERROR] Nonexistent component: > > > org.apache.maven.lifecycle.mapping.LifecycleMappingeclipse-plugin > > > > > > [ERROR] No lifecycle mapping for type 'dude-application': using > defaults > > > > > > > > > > > > My META-INF/plexus.componenets.xml looks like this: > > > > > > > > > > > > <components> > > > > > > <component> > > > > > > <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role> > > > > > > <role-hint>eclipse-plugin</role-hint> > > > > > > > > > > > > <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping > > </ > > > implementation> > > > > > > <configuration> > > > > > > <phases> > > > > > > <process-resources>resources:resources</process-resources> > > > > > > <compile>pde:pde-compile</compile> > > > > > > > > > <process-test-resources>resources:testResources</process-test- > resources> > > > > > > <test-compile>compiler:testCompile</test-compile> > > > > > > <test>surefire:test</test> > > > > > > <package>pde:pde-package</package> > > > > > > <install>install:install</install> > > > > > > <deploy>deploy:deploy</deploy> > > > > > > </phases> > > > > > > </configuration> > > > > > > </component> > > > > > > </components> > > > > > > > > > > > > If anyone can point me to a complete plugin example that defines its > own > > > lifecycle I can probably work from there > > > > > > > > > > > > Thanks, > > > > > > Matthew > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > 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]