This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes maven calling an ant target Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply Bookmark "maven calling an ant target" Watch "maven calling an ant target" New topic
Author

maven calling an ant target

Charles Simms
Greenhorn

Joined: Oct 10, 2008
Posts: 7
I have tried to call an ant target from maven after the install part of the life cycle using eclipse but am having little success. Does anybody have any example they could send.

I have tried to follow the maven example but does not work.
http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html

Cheers
Charlie
Karl Heinz Marbaise
Greenhorn

Joined: Aug 12, 2007
Posts: 19
Hi,
what exactly would you like to reach? Call an Ant Target inside an configured POM ? Or did i misunderstand something ? May be you can give a little output ? Error messages etc. ?
Kind regards
Karl Heinz Marbaise


Software Configuration Management (Subversion, CVS, SVK etc.) http://www.skmwiki.de/
Subversion Repository Search Engine http://www.supose.org/
Charles Simms
Greenhorn

Joined: Oct 10, 2008
Posts: 7
Correct I just want maven to call the ant target “hello” after maven has called install in the life cycle.

I have created a simple plugin, trying to call my ant and mojos script, it is failiing to bind these to my POM and getting the error:

Maven cannot calculate your build plan, given the following information:
Tasks:

- install
Current project:
Group-Id: com.smart421.ppb
Artifact-Id: E-Commerce
Version: 1.0-SNAPSHOT
From file: C:\Projects\E-Commerce\pom.xml
Error message: Mojo: hello does not exist in plugin: org.apache.maven.plugins:maven-plugin-plugin:2.3.
Root error message: Mojo: hello does not exist in plugin: org.apache.maven.plugins:maven-plugin-plugin:2.3

Cheers
Charlie
Charles Simms
Greenhorn

Joined: Oct 10, 2008
Posts: 7
Here is part of my pom file:

<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>hello</id>
<phase>install</phase>
<goals>
</goals>
<configuration><tasks>hello</tasks></configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>

It is not calling my ant target. Where should I put my ant script?

 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: maven calling an ant target
 
Similar Threads
Maven Plugin
Seeing properties
Wanted: Tutorial on How to convert Ant to to Maven?
com.sun.tools.jxc.maven2:maven-jaxb-schemagen-plugin not found
How do I sign "jars" in the target directory using Maven?