You need to give your goal a unique name...

-----Original Message-----
From: laredotornado [mailto:[email protected]] 
Sent: Wednesday, October 14, 2009 2:58 PM
To: [email protected]
Subject: RE: Anyone know a shortcut? (Maven 1.1)


Regarding your first idea, how would I do this without executing an infinite
loop (keeping in mind I would like "war:install" to execute both
"war:install" and "jar:install").  Below is my maven.xml file, but it causes
an infinite loop when I type in "war:install" ...

<project xmlns:j="jelly:core" xmlns:ant="jelly:ant" xmlns:u="jelly:util">
  <goal name="war:install">
    <j:set var="goals" value="war:install,jar:install" />
    <ant:mkdir dir="${maven.build.dir}" />
    <u:tokenize var="goals" delim=",">${goals}</u:tokenize>
    <j:forEach items="${goals}" var="goal" indexVar="goalNumber">
      Now attaining goal number ${goalNumber}, which is ${goal}
      <attainGoal name="${goal}" />
    </j:forEach>
  </goal>
</project>





Jeff Jensen wrote:
> 
> You could add a custom goal in maven.xml that does both of those installs.
> 
> I actually suggest moving the Java code into its own Java project...
> 
> 
> -----Original Message-----
> From: laredotornado [mailto:[email protected]] 
> Sent: Wednesday, October 14, 2009 1:54 PM
> To: [email protected]
> Subject: Anyone know a shortcut? (Maven 1.1)
> 
> 
> Hi,
> 
> I'm using Maven 1.1.  Right now, in my webapp project, I'm running
> 
> maven war:install
> maven jar:install
> 
> to generate my deployable WAR file and then to generate a JAR with the
> included classes so that my unit tests have something to look at.  Does
> anyone know a way that I can run "maven war:install" and it will execute
> both "maven war:install" and "maven jar:install"?
> 
> Thanks for your help, - Dave
> 
> -- 
> View this message in context:
>
http://www.nabble.com/Anyone-know-a-shortcut--%28Maven-1.1%29-tp25896882p258
> 96882.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/Anyone-know-a-shortcut--%28Maven-1.1%29-tp25896882p258
97933.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to