hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjs...@apache.org
Subject [37/50] [abbrv] hadoop git commit: HADOOP-11419 improve hadoop-maven-plugins. (Hervé Boutemy via stevel)
Date Tue, 27 Jan 2015 18:40:55 GMT
HADOOP-11419 improve hadoop-maven-plugins.  (Hervé Boutemy via stevel)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/35f64962
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/35f64962
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/35f64962

Branch: refs/heads/YARN-2928
Commit: 35f64962fccc472f5fbd172f3f824fdd72a43143
Parents: 3703965
Author: Steve Loughran <stevel@apache.org>
Authored: Sun Jan 25 16:12:58 2015 +0000
Committer: Steve Loughran <stevel@apache.org>
Committed: Sun Jan 25 16:13:16 2015 +0000

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt  |  2 ++
 hadoop-maven-plugins/pom.xml                     | 19 +++++--------------
 .../hadoop/maven/plugin/protoc/ProtocMojo.java   |  7 ++-----
 .../hadoop/maven/plugin/util/FileSetUtils.java   |  2 +-
 .../plugin/versioninfo/VersionInfoMojo.java      |  3 +--
 5 files changed, 11 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/35f64962/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index c0617e8..8618e38 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -497,6 +497,8 @@ Release 2.7.0 - UNRELEASED
     HADOOP-11489 Dropping dependency on io.netty from hadoop-nfs' pom.xml
     (Ted Yu via ozawa)
 
+    HADOOP-11419 Improve hadoop-maven-plugins. (Herve Boutemy via stevel)
+
   OPTIMIZATIONS
 
     HADOOP-11323. WritableComparator#compare keeps reference to byte array.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/35f64962/hadoop-maven-plugins/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-maven-plugins/pom.xml b/hadoop-maven-plugins/pom.xml
index 4beaf7c..b48b9ac 100644
--- a/hadoop-maven-plugins/pom.xml
+++ b/hadoop-maven-plugins/pom.xml
@@ -28,6 +28,7 @@
   <name>Apache Hadoop Maven Plugins</name>
   <properties>
     <maven.dependency.version>3.0</maven.dependency.version>
+    <maven.plugin-tools.version>3.4</maven.plugin-tools.version>
   </properties>
   <dependencies>
     <dependency>
@@ -43,30 +44,20 @@
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-annotations</artifactId>
-      <version>${maven.dependency.version}</version>
+      <version>${maven.plugin-tools.version}</version>
       <scope>provided</scope>
     </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
   </dependencies>
   <build>
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-plugin-plugin</artifactId>
-        <version>${maven.dependency.version}</version>
-        <configuration>
-          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
-        </configuration>
+        <version>${maven.plugin-tools.version}</version>
         <executions>
           <execution>
-            <id>mojo-descriptor</id>
-            <goals>
-              <goal>descriptor</goal>
-            </goals>
+            <id>default-descriptor</id>
+            <phase>process-classes</phase>
           </execution>
         </executions>
       </plugin>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/35f64962/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/protoc/ProtocMojo.java
----------------------------------------------------------------------
diff --git a/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/protoc/ProtocMojo.java
b/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/protoc/ProtocMojo.java
index 86ba7bf..465b713 100644
--- a/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/protoc/ProtocMojo.java
+++ b/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/protoc/ProtocMojo.java
@@ -31,7 +31,7 @@ import java.util.List;
 @Mojo(name="protoc", defaultPhase = LifecyclePhase.GENERATE_SOURCES)
 public class ProtocMojo extends AbstractMojo {
 
-  @Parameter(defaultValue="${project}")
+  @Parameter(defaultValue="${project}", readonly=true)
   private MavenProject project;
 
   @Parameter
@@ -43,7 +43,7 @@ public class ProtocMojo extends AbstractMojo {
   @Parameter(required=true)
   private FileSet source;
 
-  @Parameter
+  @Parameter(defaultValue="protoc")
   private String protocCommand;
 
   @Parameter(required=true)
@@ -51,9 +51,6 @@ public class ProtocMojo extends AbstractMojo {
 
   public void execute() throws MojoExecutionException {
     try {
-      if (protocCommand == null || protocCommand.trim().isEmpty()) {
-        protocCommand = "protoc";
-      }
       List<String> command = new ArrayList<String>();
       command.add(protocCommand);
       command.add("--version");

http://git-wip-us.apache.org/repos/asf/hadoop/blob/35f64962/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/util/FileSetUtils.java
----------------------------------------------------------------------
diff --git a/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/util/FileSetUtils.java
b/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/util/FileSetUtils.java
index 8bd66cc..2f2d2fb 100644
--- a/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/util/FileSetUtils.java
+++ b/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/util/FileSetUtils.java
@@ -33,7 +33,7 @@ public class FileSetUtils {
    * @param list List of all elements
    * @return String containing every element, comma-separated
    */
-  private static String getCommaSeparatedList(List list) {
+  private static String getCommaSeparatedList(List<String> list) {
     StringBuilder buffer = new StringBuilder();
     String separator = "";
     for (Object e : list) {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/35f64962/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/versioninfo/VersionInfoMojo.java
----------------------------------------------------------------------
diff --git a/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/versioninfo/VersionInfoMojo.java
b/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/versioninfo/VersionInfoMojo.java
index 563bd59..f342463 100644
--- a/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/versioninfo/VersionInfoMojo.java
+++ b/hadoop-maven-plugins/src/main/java/org/apache/hadoop/maven/plugin/versioninfo/VersionInfoMojo.java
@@ -18,7 +18,6 @@ import org.apache.hadoop.maven.plugin.util.FileSetUtils;
 import org.apache.maven.model.FileSet;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
-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.project.MavenProject;
@@ -47,7 +46,7 @@ import java.util.TimeZone;
 @Mojo(name="version-info")
 public class VersionInfoMojo extends AbstractMojo {
 
-  @Parameter(defaultValue="${project}")
+  @Parameter(defaultValue="${project}", readonly=true)
   private MavenProject project;
 
   @Parameter(required=true)


Mime
View raw message