HADOOP-11419 improve hadoop-maven-plugins. (Hervé Boutemy via stevel)

This commit is contained in:
Steve Loughran 2015-01-25 16:12:58 +00:00
parent 370396509d
commit 35f64962fc
5 changed files with 11 additions and 22 deletions

View File

@ -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.

View File

@ -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>

View File

@ -31,7 +31,7 @@
@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");

View File

@ -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) {

View File

@ -18,7 +18,6 @@
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 @@
@Mojo(name="version-info")
public class VersionInfoMojo extends AbstractMojo {
@Parameter(defaultValue="${project}")
@Parameter(defaultValue="${project}", readonly=true)
private MavenProject project;
@Parameter(required=true)