maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "shinjan sen" <>
Subject Maven and Ant | Executing Ant script before downloading dependencies | Need Help
Date Mon, 25 Jun 2007 07:20:10 GMT
I have a maven project which has a dependency on an ant project. To achieve
this I have added a execution of the maven ant-run-plugin in my pom.xml as

     <echo>Download dependent jars</echo>
     <ant antfile="build.xml" dir="." inheritAll="true" inheritRefs="true">

This ant script "build.xml" compiles the associated ant project and installs
the same in the maven local repository.

<project basedir="." default="buildJar" >
 <condition property="mvn.exec" value="mvn.bat" else="mvn">
   <os family="windows"/>
 <target name="buildJar" description="Builds ant project and copies jar to
local repository">
  <ant antfile="build.xml" dir="ant_common" target="compile" />
  <exec executable="${mvn.exec}">
   <arg line="-D mvn install:install-file -Dfile=ant_common.jar
-DgroupId=mytest -DartifactId=ant_common -Dversion=1.0 -Dpackaging=jar"/>

My question is how do I add this ant project as a dependency in my pom.xml?
if I add it as
my pom will try to download the same before executing the
maven-antrun-plugin execution and will throw an error.

I want to achieve the effect of installing the ant project and then
referencing it as a dependency in one execution.

Please advise.

Thanks in advance.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message