Repository: activemq-artemis Updated Branches: refs/heads/master ff01b2ea8 -> 6738e81f4
Changing Maven plugin to use annotations API. This was needed now otherwise we wouldn't be able to process javadoc properly without -Xdoclint on JDK 1.8 Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/fd93a7c2 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/fd93a7c2 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/fd93a7c2 Branch: refs/heads/master Commit: fd93a7c268d91b2a2b699507c9ef85327da4534f Parents: ff01b2e Author: Clebert Suconic <[email protected]> Authored: Tue Jun 9 21:09:11 2015 -0400 Committer: Clebert Suconic <[email protected]> Committed: Tue Jun 9 21:22:11 2015 -0400 ---------------------------------------------------------------------- artemis-maven-plugin/pom.xml | 73 ++++++++++++-------- .../artemis/maven/ActiveMQClientPlugin.java | 8 +-- .../artemis/maven/ActiveMQStartPlugin.java | 7 +- .../artemis/maven/ActiveMQStopPlugin.java | 13 ++-- .../artemis/server/SpawnedVMSupport.java | 6 +- 5 files changed, 60 insertions(+), 47 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fd93a7c2/artemis-maven-plugin/pom.xml ---------------------------------------------------------------------- diff --git a/artemis-maven-plugin/pom.xml b/artemis-maven-plugin/pom.xml index 40deaa5..9d086ad 100644 --- a/artemis-maven-plugin/pom.xml +++ b/artemis-maven-plugin/pom.xml @@ -35,7 +35,7 @@ <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> - <version>2.0</version> + <version>3.3.3</version> </dependency> <dependency> <groupId>org.apache.maven.plugins</groupId> @@ -56,37 +56,54 @@ <groupId>io.netty</groupId> <artifactId>netty-all</artifactId> </dependency> + <dependency> + <groupId>org.apache.maven.plugin-tools</groupId> + <artifactId>maven-plugin-annotations</artifactId> + <version>3.4</version> + <scope>provided</scope> + </dependency> </dependencies> <build> <pluginManagement> <plugins> - <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.--> - <plugin> - <groupId>org.eclipse.m2e</groupId> - <artifactId>lifecycle-mapping</artifactId> - <version>1.0.0</version> - <configuration> - <lifecycleMappingMetadata> - <pluginExecutions> - <pluginExecution> - <pluginExecutionFilter> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-plugin-plugin</artifactId> - <versionRange>[3.3,)</versionRange> - <goals> - <goal>descriptor</goal> - </goals> - </pluginExecutionFilter> - <action> - <ignore></ignore> - </action> - </pluginExecution> - </pluginExecutions> - </lifecycleMappingMetadata> - </configuration> - </plugin> - </plugins> - </pluginManagement> + <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> + <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.--> + <plugin> + <groupId>org.eclipse.m2e</groupId> + <artifactId>lifecycle-mapping</artifactId> + <version>1.0.0</version> + <configuration> + <lifecycleMappingMetadata> + <pluginExecutions> + <pluginExecution> + <pluginExecutionFilter> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-plugin-plugin</artifactId> + <versionRange>[3.3,)</versionRange> + <goals> + <goal>descriptor</goal> + </goals> + </pluginExecutionFilter> + <action> + <ignore></ignore> + </action> + </pluginExecution> + </pluginExecutions> + </lifecycleMappingMetadata> + </configuration> + </plugin> + </plugins> + </pluginManagement> </build> </project> http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fd93a7c2/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ActiveMQClientPlugin.java ---------------------------------------------------------------------- diff --git a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ActiveMQClientPlugin.java b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ActiveMQClientPlugin.java index 9f07ad8..90a6112 100644 --- a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ActiveMQClientPlugin.java +++ b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ActiveMQClientPlugin.java @@ -22,15 +22,13 @@ import java.util.Properties; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; /** * Allows a Java Client to be run which must hve a static main(String[] args) method */ - -/** - * @phase verify - * @goal runClient - */ +@Mojo(name = "runClient", defaultPhase = LifecyclePhase.VERIFY) public class ActiveMQClientPlugin extends AbstractMojo { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fd93a7c2/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ActiveMQStartPlugin.java ---------------------------------------------------------------------- diff --git a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ActiveMQStartPlugin.java b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ActiveMQStartPlugin.java index f831c40..6a7ca64 100644 --- a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ActiveMQStartPlugin.java +++ b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ActiveMQStartPlugin.java @@ -31,13 +31,12 @@ import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugin.descriptor.PluginDescriptor; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; import org.codehaus.classworlds.ClassRealm; import org.codehaus.classworlds.ClassWorld; -/** - * @phase verify - * @goal start - */ +@Mojo(name = "start", defaultPhase = LifecyclePhase.VERIFY) public class ActiveMQStartPlugin extends AbstractMojo { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fd93a7c2/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ActiveMQStopPlugin.java ---------------------------------------------------------------------- diff --git a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ActiveMQStopPlugin.java b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ActiveMQStopPlugin.java index b7c26cc..98f7b24 100644 --- a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ActiveMQStopPlugin.java +++ b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ActiveMQStopPlugin.java @@ -16,17 +16,16 @@ */ package org.apache.activemq.artemis.maven; +import java.io.File; +import java.io.IOException; + import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.LifecyclePhase; +import org.apache.maven.plugins.annotations.Mojo; -import java.io.File; -import java.io.IOException; - -/** - * @phase verify - * @goal stop - */ +@Mojo(name = "stop", defaultPhase = LifecyclePhase.VERIFY) public class ActiveMQStopPlugin extends AbstractMojo { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fd93a7c2/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/SpawnedVMSupport.java ---------------------------------------------------------------------- diff --git a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/SpawnedVMSupport.java b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/SpawnedVMSupport.java index 52cc688..f67fa35 100644 --- a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/SpawnedVMSupport.java +++ b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/SpawnedVMSupport.java @@ -27,11 +27,11 @@ import java.util.Properties; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.apache.maven.artifact.DefaultArtifact; +import org.apache.maven.artifact.Artifact; public class SpawnedVMSupport { - public static Process spawnVM(List<DefaultArtifact> arts, + public static Process spawnVM(List<Artifact> arts, final String logName, final String className, final Properties properties, @@ -71,7 +71,7 @@ public class SpawnedVMSupport .append(" "); String pathSeparater = System.getProperty("path.separator"); StringBuilder classpath = new StringBuilder(); - for (DefaultArtifact artifact : arts) + for (Artifact artifact : arts) { classpath.append(artifact.getFile() .getAbsolutePath())
