You actually just need the lifecycle.xml as described in the build lifecycle document, not the custom packaging. That lifecycle "overlay", inc onjunction with the original packaging and the lifecycle-"exploded" attribute on @execute should do the trick.
- Brett On 10/31/05, Mark Hobson <[EMAIL PROTECTED]> wrote: > Okay, if I specify just @execute phase="package" and supply the > following components.xml: > > <component-set> > <components> > <component> > <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role> > <role-hint>war-exploded</role-hint> > > <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation> > <configuration> > <lifecycles> > <lifecycle> > <id>exploded</id> > <!-- START SNIPPET: war-exploded-lifecycle --> > <phases> > > <process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources> > > <compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile> > > <process-test-resources>org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources> > > <test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile> > <test>org.apache.maven.plugins:maven-surefire-plugin:test</test> > > <package>org.apache.maven.plugins:maven-war-plugin:exploded</package> > > <install>org.apache.maven.plugins:maven-install-plugin:install</install> > > <deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy> > </phases> > <!-- END SNIPPET: war-exploded-lifecycle --> > </lifecycle> > </lifecycles> > </configuration> > </component> > </components> > </component-set> > > Then it works - but only if I change my war project's packaging to > 'war-exploded'. I obviously want to keep war packaging on war > projects, so is it possible to override the default war lifecycle? If > I change the role-hint to 'war' then the default war lifecycle gets > executed instead of mine. > > Mark > > On 29/10/05, Mark Hobson <[EMAIL PROTECTED]> wrote: > > On 28/10/05, Brett Porter <[EMAIL PROTECTED]> wrote: > > > I believe all should execute phase="package". For the last two, create > > > a custom lifecycle that binds war:inplace to the package phase, for > > > example. See the core-it-plugin for an example. > > > > Thanks Brett, I've had a look but it's not clear whether I need just a > > lifecycle.xml or an additional components.xml. I'm guessing I need a > > components.xml like: > > > > <component-set> > > <components> > > <component> > > <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role> > > <role-hint>war</role-hint> > > > > <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation> > > <configuration> > > <lifecycles> > > <lifecycle> > > <id>exploded</id> > > <!-- START SNIPPET: war-exploded-lifecycle --> > > <phases> > > > > <process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources> > > > > <compile>org.apache.maven.plugins:maven-compiler-plugin:compile</compile> > > > > <process-test-resources>org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources> > > > > <test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile> > > > > <test>org.apache.maven.plugins:maven-surefire-plugin:test</test> > > > > <package>org.apache.maven.plugins:maven-war-plugin:exploded</package> > > > > <install>org.apache.maven.plugins:maven-install-plugin:install</install> > > > > <deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy> > > </phases> > > <!-- END SNIPPET: war-exploded-lifecycle --> > > </lifecycle> > > </lifecycles> > > </configuration> > > </component> > > </components> > > </component-set> > > > > And then specify this on my mojo: > > > > @execute phase = "package" lifecycle = "exploded" > > > > Not sure if that's right cause it's asking for an additional lifecycle.xml. > > > > Any pointers appreciated. > > > > Cheers, > > > > Mark > > > > --------------------------------------------------------------------- > 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]
