My apologies. This seems to have been resolved in maven-antrun-plugin
version 1.2 

 

________________________________

From: Michael Delaney [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 16, 2008 10:07 AM
To: Maven Users List
Subject: possible bug in maven antrun plugin

 

While trying to update our builds to run on Solaris, I was put some
logic in our ant scripts to enable cross platform execution (*.bat
versus *.sh ... etc). My initial idea was to rely on the ant property
"os.name" (which should be set by default). I wrote my ant script and
got it working perfectly, outside of Maven. Once I attempted to execute
the same ant script in Maven, I noticed that the property os.name was
not getting expanded at all.

 

I have included a small pom.xml and build.xml to show the behavior. Just
untar the archive, run 'mvn install' and then ant (no additional
parameters are required for either process). You will notice that the
property 'os.name' doesn't get expanded when called via Maven but does
when getting called via Ant.

 

I have a feeling this is a bug but I figured I could see if anything has
any additional input, or hacks, on this issue.

 

[ Maven AntRun output ]

init:

     [echo] The following line should contain our OS name

     [echo] ${os.name} == ${os.name}

 

[ Ant output ]

init:

     [echo] The following line should contain our OS name

     [echo] ${os.name} == Windows XP

Reply via email to