Re: Plugin phase awareness...

2013-12-23 Thread Lennart Jörelid
True, The lifecyclePhase property/getter is not present in the 2.0.X (at least not until 2.0.8). You will need to use a Maven dependency of at least 3.0.X for this to work. 2013/12/24 Igor Fedorenko > This works for me just fine, at least from m2e. Tried Maven 3.0.5 and > 3.1.1. > > @Mojo

Re: Plugin phase awareness...

2013-12-23 Thread Igor Fedorenko
This works for me just fine, at least from m2e. Tried Maven 3.0.5 and 3.1.1. @Mojo(name = "test2", defaultPhase = LifecyclePhase.COMPILE) public class Test2Mojo extends AbstractMojo { @Parameter(defaultValue = "${mojoExecution.lifecyclePhase}") private String phase; pu

Re: svn commit: r1553003 - in /maven/skins/trunk/maven-fluido-skin: ./ src/it/mskins-21/src/site/ src/it/mskins-22/src/site/ src/it/mskins-22_default/src/site/ src/it/mskins-22_topbar/src/site/ src/it

2013-12-23 Thread Michael-O
Am 2013-12-22 18:40, schrieb Robert Scholte: Michael, you're already a team-member, so no need to add yourself as a contributor. Thanks, I will change the POMs accordingly. Op Sun, 22 Dec 2013 17:54:40 +0100 schreef : Author: michaelo Date: Sun Dec 22 16:54:40 2013 New Revision: 1553003 U

Re: Plugin phase awareness...

2013-12-23 Thread Lennart Jörelid
Try just injecting the mojoExecution object. Then invoke the getLifecyclePhase() method in it. 2013/12/24 Martin Gainty > Igor/Tamas > a quick test > > package org.apache.maven.plugin; > public class CompilerMojo extends AbstractCompilerMojo > { > @Parameter(defaultValue = "${mojoExecution.

RE: Plugin phase awareness...

2013-12-23 Thread Martin Gainty
Igor/Tamas a quick test package org.apache.maven.plugin; public class CompilerMojo extends AbstractCompilerMojo { @Parameter(defaultValue = "${mojoExecution.lifecyclePhase}") private String executionPhase; public String getExecutionPhase() { return executionPhase; } public void

Re: Plugin phase awareness...

2013-12-23 Thread Tamás Cservenák
Here is an example, same as proposed by Igor https://github.com/sonatype/nexus-maven-plugins/blob/master/staging/maven-plugin/src/main/java/org/sonatype/nexus/maven/staging/AbstractStagingMojo.java#L72 Still, you need to be careful if you want maven 2.x, maven 3.0.x and maven 3.1.x compatibility,