You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2015/10/07 09:58:02 UTC
svn commit: r1707198 - in /sling/trunk/tooling/maven/maven-jcrocm-plugin:
pom.xml src/main/java/org/apache/sling/maven/jcrocm/JcrOcmMojo.java
Author: rombert
Date: Wed Oct 7 07:58:02 2015
New Revision: 1707198
URL: http://svn.apache.org/viewvc?rev=1707198&view=rev
Log:
SLING-5107 - Switch to Java annotations for Maven plugins
Switch to Java annotations for the maven-jcrocm-plugin
Modified:
sling/trunk/tooling/maven/maven-jcrocm-plugin/pom.xml
sling/trunk/tooling/maven/maven-jcrocm-plugin/src/main/java/org/apache/sling/maven/jcrocm/JcrOcmMojo.java
Modified: sling/trunk/tooling/maven/maven-jcrocm-plugin/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/maven/maven-jcrocm-plugin/pom.xml?rev=1707198&r1=1707197&r2=1707198&view=diff
==============================================================================
--- sling/trunk/tooling/maven/maven-jcrocm-plugin/pom.xml (original)
+++ sling/trunk/tooling/maven/maven-jcrocm-plugin/pom.xml Wed Oct 7 07:58:02 2015
@@ -46,13 +46,29 @@
<url>http://svn.apache.org/viewvc/sling/trunk/tooling/maven/maven-jcrocm-plugin</url>
</scm>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-descriptor</id>
+ <phase>process-classes</phase>
+ </execution>
+ <execution>
+ <id>help-goal</id>
+ <goals>
+ <goal>helpmojo</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
<reporting>
<plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-plugin-plugin</artifactId>
- <version>2.5.1</version>
- </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
@@ -88,5 +104,12 @@
<artifactId>qdox</artifactId>
<version>1.9.1</version>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.maven.plugin-tools</groupId>
+ <artifactId>maven-plugin-annotations</artifactId>
+ <version>3.4</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
</project>
Modified: sling/trunk/tooling/maven/maven-jcrocm-plugin/src/main/java/org/apache/sling/maven/jcrocm/JcrOcmMojo.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/maven/maven-jcrocm-plugin/src/main/java/org/apache/sling/maven/jcrocm/JcrOcmMojo.java?rev=1707198&r1=1707197&r2=1707198&view=diff
==============================================================================
--- sling/trunk/tooling/maven/maven-jcrocm-plugin/src/main/java/org/apache/sling/maven/jcrocm/JcrOcmMojo.java (original)
+++ sling/trunk/tooling/maven/maven-jcrocm-plugin/src/main/java/org/apache/sling/maven/jcrocm/JcrOcmMojo.java Wed Oct 7 07:58:02 2015
@@ -29,6 +29,10 @@ import org.apache.maven.artifact.Artifac
import org.apache.maven.model.Resource;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.StringUtils;
@@ -45,35 +49,20 @@ import com.thoughtworks.qdox.model.JavaS
* <em>maven-jcrocm-plugin</em>. It is by default run in the
* <code>generate-resources</code> phase and requires the compile scoped
* dependencies to be resolved.
- *
- * @goal ocm
- * @phase generate-resources
- * @description Build Jackrabbit OCM Descriptors from Java Source
- * @requiresDependencyResolution compile
*/
+@Mojo(name = "ocm", defaultPhase = LifecyclePhase.GENERATE_RESOURCES, requiresDependencyResolution = ResolutionScope.COMPILE)
public class JcrOcmMojo extends AbstractMojo {
- /**
- * @parameter expression="${project.build.directory}/sling-generated"
- * @required
- * @readonly
- */
+ @Parameter ( defaultValue = "${project.build.directory}/sling-generated", readonly = true)
private File outputDirectory;
- /**
- * The Maven project.
- *
- * @parameter expression="${project}"
- * @required
- * @readonly
- */
+ @Parameter( defaultValue = "${project}", readonly = true )
private MavenProject project;
/**
* Name and path of the generated descriptor.
- *
- * @parameter expression="${jcrocm.descriptor.name}" default-value="mappings.xml"
*/
+ @Parameter( property = "jcrocm.descriptor.name", defaultValue = "mappings.xml")
private String finalName;
public void execute() throws MojoFailureException {