It works perfectly here. Here is the full build.xml I wrote for the test : <project default="def" basedir="." > <target name="def"> <macrodef name="projectfiles"> <attribute name="dir"/> <sequential> <exec dir="@{dir}" executable="mvn.bat" os="Windows XP"> <arg line="--version"/> </exec> <exec dir="@{dir}" executable="mvn" os="Mac OS X"> <arg line="--version"/> </exec> <exec dir="@{dir}" executable="mvn" os="Linux"> <arg line="--version"/> </exec> </sequential> </macrodef>
<projectfiles dir="."/> </target> </project> As you can see, it is "mvn" and not "mvn.sh". Here is the result : Buildfile: build.xml def: [exec] Maven version: 2.0.4 BUILD SUCCESSFUL Total time: 0 seconds I don't know where your Ant buildfile fails, but the mistake is not in the way the macrodef is written. Hervé Le lundi 9 octobre 2006 06:15, mraible a écrit : > I've tried both and I get the same result. In the example below (mvn.sh), > I tried creating a symlink to mvn. > > Matt > > Alexandre Russel-2 wrote: > > On Monday 09 October 2006 04:56, mraible wrote: > >> I have the following macrodef in Ant to run "mvn" to create project > >> files. > >> It works fine on Windows XP and OS X, but on Linux it spits out "[exec] > >> Result: 1". Any ideas on how to make this work on Linux? > >> > >> <exec dir="@{dir}" executable="mvn.sh" os="Linux"> > > > > Are you sure the executable is mvn.sh and not mvn ? > > Alex --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]