Author: desruisseaux
Date: Fri Oct 9 10:15:16 2015
New Revision: 1707688
URL: http://svn.apache.org/viewvc?rev=1707688&view=rev
Log:
Replace javadoc annotations by Java annotations in Mojo (SIS-75).
Modified:
sis/branches/JDK8/core/sis-build-helper/pom.xml
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Assembler.java
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/BundleCreator.java
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Filenames.java
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/JarCollector.java
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/IndexedResourceCompiler.java
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerException.java
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java
sis/branches/JDK8/pom.xml
Modified: sis/branches/JDK8/core/sis-build-helper/pom.xml
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-build-helper/pom.xml?rev=1707688&r1=1707687&r2=1707688&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-build-helper/pom.xml (original)
+++ sis/branches/JDK8/core/sis-build-helper/pom.xml Fri Oct 9 10:15:16 2015
@@ -82,20 +82,46 @@ Define Maven Mojos and Javadoc taglets f
<!-- ===========================================================
+ Build configuration for annotation processing
+ =========================================================== -->
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <version>3.4</version>
+ <executions>
+ <execution>
+ <id>default-descriptor</id>
+ <phase>process-classes</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+
+ <!-- ===========================================================
Dependencies
=========================================================== -->
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
- <version>3.1.1</version>
+ <version>3.3.3</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
- <version>3.1.1</version>
+ <version>3.3.3</version>
</dependency>
- <dependency>
+ <dependency>
+ <groupId>org.apache.maven.plugin-tools</groupId>
+ <artifactId>maven-plugin-annotations</artifactId>
+ <version>3.4</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.sonatype.plexus</groupId>
<artifactId>plexus-build-api</artifactId>
<version>0.0.7</version>
Modified:
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Assembler.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Assembler.java?rev=1707688&r1=1707687&r2=1707688&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Assembler.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Assembler.java
[UTF-8] Fri Oct 9 10:15:16 2015
@@ -23,6 +23,9 @@ import java.io.FileInputStream;
import java.io.FilterOutputStream;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.project.MavenProject;
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
@@ -46,29 +49,22 @@ import static org.apache.sis.internal.ma
*
* @author Martin Desruisseaux (Geomatys)
* @since 0.4
- * @version 0.4
+ * @version 0.7
* @module
- *
- * @goal dist
- * @phase install
*/
+@Mojo(name = "dist", defaultPhase = LifecyclePhase.INSTALL)
public class Assembler extends AbstractMojo implements FilenameFilter {
/**
* Project information (name, version, URL).
- *
- * @parameter property="project"
- * @required
- * @readonly
*/
+ @Parameter(property="project", required=true, readonly=true)
private MavenProject project;
/**
* The root directory (without the "<code>target/binaries</code>"
sub-directory) where JARs
* are to be copied. It should be the directory of the root
<code>pom.xml</code>.
- *
- * @parameter property="session.executionRootDirectory"
- * @required
*/
+ @Parameter(property="session.executionRootDirectory", required=true)
private String rootDirectory;
/**
Modified:
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/BundleCreator.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/BundleCreator.java?rev=1707688&r1=1707687&r2=1707688&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/BundleCreator.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/BundleCreator.java
[UTF-8] Fri Oct 9 10:15:16 2015
@@ -20,6 +20,9 @@ import java.io.File;
import java.io.IOException;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.project.MavenProject;
import static org.apache.sis.internal.maven.Filenames.*;
@@ -40,29 +43,22 @@ import static org.apache.sis.internal.ma
*
* @author Martin Desruisseaux (Geomatys)
* @since 0.3
- * @version 0.4
+ * @version 0.7
* @module
- *
- * @goal pack
- * @phase install
*/
+@Mojo(name = "pack", defaultPhase = LifecyclePhase.INSTALL)
public class BundleCreator extends AbstractMojo {
/**
* Project information (name, version, URL).
- *
- * @parameter property="project"
- * @required
- * @readonly
*/
+ @Parameter(property="project", required=true, readonly=true)
private MavenProject project;
/**
* The root directory (without the "<code>target/binaries</code>"
sub-directory) where JARs
* are to be copied. It should be the directory of the root
<code>pom.xml</code>.
- *
- * @parameter property="session.executionRootDirectory"
- * @required
*/
+ @Parameter(property="session.executionRootDirectory", required=true)
private String rootDirectory;
/**
Modified:
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Filenames.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Filenames.java?rev=1707688&r1=1707687&r2=1707688&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Filenames.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/Filenames.java
[UTF-8] Fri Oct 9 10:15:16 2015
@@ -35,7 +35,7 @@ import java.io.IOException;
final class Filenames {
/**
* The target directory. This directory name is hard-coded instead than
using a property annotated
- * by {@code @parameter default-value="${project.build.directory}"} - or
alternatively by invoking
+ * by {@code @Parameter(defaultValue="${project.build.directory}")} - or
alternatively by invoking
* {@code MavenProject.getModel().getBuild().getDirectory()}, because we
need the target directory
* of the project root rather than the directory of the module being built.
*/
Modified:
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/JarCollector.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/JarCollector.java?rev=1707688&r1=1707687&r2=1707688&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/JarCollector.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/maven/JarCollector.java
[UTF-8] Fri Oct 9 10:15:16 2015
@@ -27,6 +27,10 @@ import java.util.Set;
import java.util.LinkedHashSet;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.project.MavenProject;
import org.apache.maven.artifact.Artifact;
@@ -46,30 +50,24 @@ import java.nio.file.FileSystemException
*
* @author Martin Desruisseaux (Geomatys)
* @since 0.3
- * @version 0.3
+ * @version 0.7
* @module
- *
- * @goal collect-jars
- * @phase package
- * @requiresDependencyResolution runtime
*/
+@Mojo(name = "collect-jars",
+ defaultPhase = LifecyclePhase.PACKAGE,
+ requiresDependencyResolution = ResolutionScope.RUNTIME)
public final class JarCollector extends AbstractMojo implements FileFilter {
/**
* The Maven project running this plugin.
- *
- * @parameter property="project"
- * @required
- * @readonly
*/
+ @Parameter(property="project", required=true, readonly=true)
private MavenProject project;
/**
* The root directory (without the "<code>target/binaries</code>"
sub-directory) where JARs
* are to be copied. It should be the directory of the root
<code>pom.xml</code>.
- *
- * @parameter property="session.executionRootDirectory"
- * @required
*/
+ @Parameter(property="session.executionRootDirectory", required=true)
private String rootDirectory;
/**
Modified:
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/IndexedResourceCompiler.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/IndexedResourceCompiler.java?rev=1707688&r1=1707687&r2=1707688&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/IndexedResourceCompiler.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/IndexedResourceCompiler.java
[UTF-8] Fri Oct 9 10:15:16 2015
@@ -31,7 +31,7 @@ import java.util.regex.Pattern;
* For now we keep it package-private, but we could consider to enable
execution from
* the command-line in a future version if this happen to be useful.</p>
*
- * @author Martin Desruisseaux (IRD, Geomatys)
+ * @author Martin Desruisseaux (IRD, Geomatys)
* @since 0.3
* @version 0.3
* @module
Modified:
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerException.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerException.java?rev=1707688&r1=1707687&r2=1707688&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerException.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerException.java
[UTF-8] Fri Oct 9 10:15:16 2015
@@ -22,7 +22,7 @@ import org.apache.maven.plugin.MojoExecu
/**
* Thrown when the {@link ResourceCompilerMojo} exit abnormally.
*
- * @author Martin Desruisseaux (Geomatys)
+ * @author Martin Desruisseaux (Geomatys)
* @since 0.3
* @version 0.3
* @module
Modified:
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java?rev=1707688&r1=1707687&r2=1707688&view=diff
==============================================================================
---
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java
[UTF-8] (original)
+++
sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/util/resources/ResourceCompilerMojo.java
[UTF-8] Fri Oct 9 10:15:16 2015
@@ -24,6 +24,10 @@ import java.util.List;
import org.apache.maven.model.Resource;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.util.Scanner;
import org.sonatype.plexus.build.incremental.BuildContext;
@@ -39,12 +43,10 @@ import static org.apache.sis.util.resour
* @author Martin Desruisseaux (Geomatys)
* @author Olivier Nouguier (Geomatys)
* @since 0.3
- * @version 0.5
+ * @version 0.7
* @module
- *
- * @goal compile-resources
- * @phase generate-resources
*/
+@Mojo(name = "compile-resources", defaultPhase =
LifecyclePhase.GENERATE_RESOURCES)
public class ResourceCompilerMojo extends AbstractMojo implements
FilenameFilter {
/**
* Pattern to filter properties files that were modified.
@@ -53,11 +55,8 @@ public class ResourceCompilerMojo extend
/**
* Project information (name, version, URL).
- *
- * @parameter property="project"
- * @required
- * @readonly
*/
+ @Parameter(property="project", required=true, readonly=true)
private MavenProject project;
/**
@@ -65,18 +64,14 @@ public class ResourceCompilerMojo extend
* When Maven is run from the command line, this object does nothing.
*
* @see <a href="http://wiki.eclipse.org/M2E_compatible_maven_plugins">M2E
compatible maven plugins</a>
- *
- * @component
*/
+ @Component
private BuildContext buildContext;
/**
* The source directories containing the sources to be compiled.
- *
- * @parameter property="project.compileSourceRoots"
- * @required
- * @readonly
*/
+ @Parameter(property="project.compileSourceRoots", required=true,
readonly=true)
private List<String> compileSourceRoots;
/**
@@ -88,10 +83,8 @@ public class ResourceCompilerMojo extend
* (for resources), such separation seems of limited use since the
resources are copied verbatim in the JAR
* file, so preventing clash in the <code>generated-resources</code>
directory would not prevent clash in
* the JAR file anyway.</p>
- *
- * @parameter
default-value="${project.build.directory}/generated-resources"
- * @required
*/
+ @Parameter(defaultValue="${project.build.directory}/generated-resources",
required=true)
private File outputDirectory;
/**
Modified: sis/branches/JDK8/pom.xml
URL:
http://svn.apache.org/viewvc/sis/branches/JDK8/pom.xml?rev=1707688&r1=1707687&r2=1707688&view=diff
==============================================================================
--- sis/branches/JDK8/pom.xml (original)
+++ sis/branches/JDK8/pom.xml Fri Oct 9 10:15:16 2015
@@ -24,6 +24,9 @@
xsi:schemaLocation = "http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
+ <prerequisites>
+ <maven>3.2.2</maven>
+ </prerequisites>
<parent>
<groupId>org.apache</groupId>