Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin

While setting the development environment for Adhar(UIDAI) which is documented here

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. After successful build we can import those projects into eclipse.

Success Build message enter image description here

But I was unable to build due to some reason enter image description here

My maven,ant and java config enter image description here

UID Protobuf Model files

Git Repository of UID-Protobuf is here

like image 730
user3616287 Avatar asked Oct 06 '15 07:10

user3616287


1 Answers

The problem is maven-antrun-plugin is not getting build(executed). In uidai-auth-proto-model/pom.xml include plugins between pluginManagement tag as follows:

<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>
like image 93
kumarrahul9292 Avatar answered Sep 18 '22 12:09

kumarrahul9292