简体   繁体   English

无法执行目标org.apache.maven.plugins:maven-antrun-plugin

[英]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。

Success Build message 成功构建消息 在此输入图像描述

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.

相关问题 无法执行目标org.apache.maven.plugins:maven - Failed to execute goal org.apache.maven.plugins:maven Maven:无法执行目标 org.apache.maven.plugins:maven-resources-plugin:2.7:resources - Maven:Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.7:resources Maven 3:无法执行目标org.apache.maven.plugins:maven-archetype-plugin:2.2:generate - Maven 3: Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate Maven 构建错误 - 无法执行目标 org.apache.maven.plugins:maven-assembly-plugin:2.5.5 - Maven build error - Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5.5 Maven:未能执行目标 org.apache.maven.plugins:maven-compiler-plugin:3.10.1compile: - Maven: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile Maven - 未能执行目标 org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean - Maven - Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean 无法执行目标 org.apache.maven.plugins:maven-archetype-plugin:2.4:generate - Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate 无法执行目标 org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test on project XYZ - Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test on project XYZ 错误:无法执行目标org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy 405, - ERROR: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy 405, 无法执行目标 org.apache.maven.plugins:maven-release-plugin:2.5.3 - Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM