[英]Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin
While setting the development environment for Adhar(UIDAI) which is documented here 在为Adhar(UIDAI)设置开发环境时, 此处将对此进行说明
I am getting following error 我收到了以下错误
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:
run (generate-sources) on project uidai-auth-proto-model: An Ant BuildException
As per the documentation after the navigating to the source code downloaded from here here we need to run mvn eclipse:eclipse
in command line. 按照上述导航从这里下载源代码后的文件在这里 ,我们需要运行
mvn eclipse:eclipse
命令行。 After successful build we can import those projects into eclipse. 成功构建后,我们可以将这些项目导入eclipse。
But I was unable to build due to some reason 但由于某种原因,我无法建立
My maven,ant and java config 我的maven,ant和java配置
UID Protobuf Model files UID Protobuf模型文件
Git Repository of UID-Protobuf is here UID-Protobuf的Git存储库就在这里
The problem is maven-antrun-plugin is not getting build(executed). 问题是maven-antrun-plugin没有得到构建(执行)。 In uidai-auth-proto-model/pom.xml include plugins between pluginManagement tag as follows:
在uidai-auth-proto-model / pom.xml中包含pluginManagement标记之间的插件,如下所示:
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<exec executable="protoc">
<arg value="--java_out=src/main/java" />
<arg value="--proto_path=src/main/proto/auth/" />
<arg value="src/main/proto/auth/auth.proto" />
</exec>
<exec executable="protoc">
<arg value="--java_out=src/main/java" />
<arg value="--proto_path=src/main/proto/bfd/" />
<arg value="src/main/proto/bfd/bfd.proto" />
</exec>
</tasks>
<sourceRoot>src/main/java</sourceRoot>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
<includes>
<include>packaged/**/*</include>
<include>in/**/*</include>
</includes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
You need to have protoc
(Protobuf compiler) in the PATH
or in the project root dir. 你需要在
PATH
或项目根目录中有protoc
(Protobuf编译器)。 Make sure you use the same protoc
version as the protobuf-java
artifact declared in POM. 确保使用与POM中声明的
protobuf-java
工件相同的protoc
版本。
Also, do same in uidai-auth-xsd-model/pom.xml as follow: 另外,在uidai-auth-xsd-model / pom.xml中也一样,如下所示:
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<outputDirectory>C:\Users\kumar.rahul@fin1.com\Downloads\uidai-auth-client-1.6-src\uidai-auth-xsd-model/src/main/java</outputDirectory>
<extension>true</extension>
</configuration>
</execution>
</executions>
<configuration>
<outputDirectory>C:\Users\kumar.rahul@fin1.com\Downloads\uidai-auth-client-1.6-src\uidai-auth-xsd-model/src/main/java</outputDirectory>
<extension>true</extension>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.