maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raphaël Piéroni" <raphaelpier...@gmail.com>
Subject Re: Call Ant Tasks from Maven2
Date Tue, 03 Apr 2007 15:48:06 GMT
Hi,

Here what i have (And it works fine using maven 2.0.5)

Raphaël


<project>
...
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>ant</groupId>
                        <artifactId>ant-antlr</artifactId>
                        <version>1.6.5</version>
                    </dependency>
                </dependencies>

                <executions>
                    <execution>
                        <id>archetype-test</id>
                        <phase>process-test-resources</phase>
                        <configuration>
                            <tasks>
                                <mkdir dir="${basedir}/somedir/"></mkdir>

                                <jar
destfile="${basedir}/somedir/some.jar"
basedir="${basedir}/src/test/somedir/"></jar>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

2007/4/3, Nagesh, Srinivas (IS Consultant) <SNagesh@consultantemail.com>:
> Hey,
>
> I am using Maven2 to call an ant task but somehow I don't see the task
> doing its job here. I am a newbie to these build tools.
>
> <artifactId>maven-antrun-plugin</artifactId>
>         <executions>
>           <execution>
>             <phase>install</phase>
>             <configuration>
>               <tasks>
>                  <echo>Hello World</echo>
>              </tasks>
>             </configuration>
>             <goals>
>               <goal>run</goal>
>             </goals>
>           </execution>
>         </executions>
>       </plugin>
>
> I don't see "Hello World" being printed on the console when I run "mvn
> -e antrun:run". Secondly this plug-in doesn't get executed as part of
> the default goal "install" that I have specified in the POM.
>
> Any thoughts?
>
> Thanks
>
> Sri
>
Mime
View raw message