2

I have this code:

<build>
    <plugins>
        <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>1.8</version>
            <executions>
                <execution>
                    <id>ant-execute</id>
                    <configuration> 
                        <target name="compile">
                            <mkdir dir="${xbpm}\lib.dir" />
                        </target>
                    </configuration>
                    <goals>
                        <goal>run</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

When I execute the command: mvn antrun:run@ant-execute, the build fails with the following error:

Could not find goal 'run@ant-excecute' in plugin org.apache.maven.plugins:maven-antrun-plugin:1.8 among available goals help, run -> [Help 1]

Chad Nouis
  • 6,861
  • 1
  • 27
  • 28
  • What is your Maven version? – Tunaki Dec 31 '15 at 11:20
  • 2
    Possible duplicate of [How to execute maven plugin execution directly from command line?](http://stackoverflow.com/questions/3166538/how-to-execute-maven-plugin-execution-directly-from-command-line) – Tunaki Dec 31 '15 at 11:24
  • 2
    This this is a duplicate of the linked post. You need to use Maven 3.3.1. – Tunaki Dec 31 '15 at 11:25
  • Why do you need to create a folder in your project? – khmarbaise Dec 31 '15 at 11:51
  • I have an ant build.xml with some target which create some folder which store some information about third party. It is not like a source directory or target directory which maven by default created. I want to called the ant task from maven through maven-ant-plugin to create those folder.. – Rabindra Chhanchan Jan 04 '16 at 05:14

0 Answers0