File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Maven with Ant task

 
Nakataa Kokuyo
Ranch Hand
Posts: 189
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good day,

I would like to perform some ant task after the war file being generated.

with following script, if i change the phase to different value like "Install" , it will not prompt error, but i want the ant script run once the war file being generated



When i try to save it with value "compile", it prompt me error "Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-antrun-plugin:1.7:run (execution: default, phase: compile)" in eclipse Juno.

appreciated if anyone can shed some light for this and thanks for your time.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the package phase - that is that phase that builds the war file. The antrun:run goal will be run after the war is created.

When you specify in your POM that a goal is to be run in the same phase as a predefined goal, then you goal runs after the predefined goal. If your POM defined multiple goals to be run during a given phase, they will be run in the order in which they appear in the POM, with goal in the parent POM having precedence over your.

Also, there are several phases between "package" and "install", you could always use one of those. (You do have a list of the phases hanging up in your office right next to the monitor, right? Or at least a bookmark to pull up the phases quickly.)
 
Nakataa Kokuyo
Ranch Hand
Posts: 189
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks ! package is working fine for this case, appreciated your time and sharing Peter!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic