HADOOP-11419 improve hadoop-maven-plugins. (Hervé Boutemy via stevel)
This commit is contained in:
parent
24f0d56afb
commit
d46738ca5c
|
@ -136,6 +136,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.
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue