Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

maven calling an ant target

 
Charles Simms
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Charles Simms
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic