HADOOP-11419 improve hadoop-maven-plugins. (Hervé Boutemy via stevel)
This commit is contained in:
parent
370396509d
commit
35f64962fc
@ -497,6 +497,8 @@ Release 2.7.0 - UNRELEASED
|
|||||||
HADOOP-11489 Dropping dependency on io.netty from hadoop-nfs' pom.xml
|
HADOOP-11489 Dropping dependency on io.netty from hadoop-nfs' pom.xml
|
||||||
(Ted Yu via ozawa)
|
(Ted Yu via ozawa)
|
||||||
|
|
||||||
|
HADOOP-11419 Improve hadoop-maven-plugins. (Herve Boutemy via stevel)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HADOOP-11323. WritableComparator#compare keeps reference to byte array.
|
HADOOP-11323. WritableComparator#compare keeps reference to byte array.
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
<name>Apache Hadoop Maven Plugins</name>
|
<name>Apache Hadoop Maven Plugins</name>
|
||||||
<properties>
|
<properties>
|
||||||
<maven.dependency.version>3.0</maven.dependency.version>
|
<maven.dependency.version>3.0</maven.dependency.version>
|
||||||
|
<maven.plugin-tools.version>3.4</maven.plugin-tools.version>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -43,30 +44,20 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven.plugin-tools</groupId>
|
<groupId>org.apache.maven.plugin-tools</groupId>
|
||||||
<artifactId>maven-plugin-annotations</artifactId>
|
<artifactId>maven-plugin-annotations</artifactId>
|
||||||
<version>${maven.dependency.version}</version>
|
<version>${maven.plugin-tools.version}</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-plugin-plugin</artifactId>
|
<artifactId>maven-plugin-plugin</artifactId>
|
||||||
<version>${maven.dependency.version}</version>
|
<version>${maven.plugin-tools.version}</version>
|
||||||
<configuration>
|
|
||||||
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
|
|
||||||
</configuration>
|
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>mojo-descriptor</id>
|
<id>default-descriptor</id>
|
||||||
<goals>
|
<phase>process-classes</phase>
|
||||||
<goal>descriptor</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
@Mojo(name="protoc", defaultPhase = LifecyclePhase.GENERATE_SOURCES)
|
@Mojo(name="protoc", defaultPhase = LifecyclePhase.GENERATE_SOURCES)
|
||||||
public class ProtocMojo extends AbstractMojo {
|
public class ProtocMojo extends AbstractMojo {
|
||||||
|
|
||||||
@Parameter(defaultValue="${project}")
|
@Parameter(defaultValue="${project}", readonly=true)
|
||||||
private MavenProject project;
|
private MavenProject project;
|
||||||
|
|
||||||
@Parameter
|
@Parameter
|
||||||
@ -43,7 +43,7 @@ public class ProtocMojo extends AbstractMojo {
|
|||||||
@Parameter(required=true)
|
@Parameter(required=true)
|
||||||
private FileSet source;
|
private FileSet source;
|
||||||
|
|
||||||
@Parameter
|
@Parameter(defaultValue="protoc")
|
||||||
private String protocCommand;
|
private String protocCommand;
|
||||||
|
|
||||||
@Parameter(required=true)
|
@Parameter(required=true)
|
||||||
@ -51,9 +51,6 @@ public class ProtocMojo extends AbstractMojo {
|
|||||||
|
|
||||||
public void execute() throws MojoExecutionException {
|
public void execute() throws MojoExecutionException {
|
||||||
try {
|
try {
|
||||||
if (protocCommand == null || protocCommand.trim().isEmpty()) {
|
|
||||||
protocCommand = "protoc";
|
|
||||||
}
|
|
||||||
List<String> command = new ArrayList<String>();
|
List<String> command = new ArrayList<String>();
|
||||||
command.add(protocCommand);
|
command.add(protocCommand);
|
||||||
command.add("--version");
|
command.add("--version");
|
||||||
|
@ -33,7 +33,7 @@ public class FileSetUtils {
|
|||||||
* @param list List of all elements
|
* @param list List of all elements
|
||||||
* @return String containing every element, comma-separated
|
* @return String containing every element, comma-separated
|
||||||
*/
|
*/
|
||||||
private static String getCommaSeparatedList(List list) {
|
private static String getCommaSeparatedList(List<String> list) {
|
||||||
StringBuilder buffer = new StringBuilder();
|
StringBuilder buffer = new StringBuilder();
|
||||||
String separator = "";
|
String separator = "";
|
||||||
for (Object e : list) {
|
for (Object e : list) {
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
import org.apache.maven.model.FileSet;
|
import org.apache.maven.model.FileSet;
|
||||||
import org.apache.maven.plugin.AbstractMojo;
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
import org.apache.maven.plugin.MojoExecutionException;
|
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.Mojo;
|
||||||
import org.apache.maven.plugins.annotations.Parameter;
|
import org.apache.maven.plugins.annotations.Parameter;
|
||||||
import org.apache.maven.project.MavenProject;
|
import org.apache.maven.project.MavenProject;
|
||||||
@ -47,7 +46,7 @@
|
|||||||
@Mojo(name="version-info")
|
@Mojo(name="version-info")
|
||||||
public class VersionInfoMojo extends AbstractMojo {
|
public class VersionInfoMojo extends AbstractMojo {
|
||||||
|
|
||||||
@Parameter(defaultValue="${project}")
|
@Parameter(defaultValue="${project}", readonly=true)
|
||||||
private MavenProject project;
|
private MavenProject project;
|
||||||
|
|
||||||
@Parameter(required=true)
|
@Parameter(required=true)
|
||||||
|
Loading…
Reference in New Issue
Block a user