I'm trying to call Maven via Ant's "exec" task but can't get the <condition> task to work correctly inside of Maven. Here's the code and debugging output from maven.xml:
maven.xml:
<goal name="os-init">
<echo message="Adapting the maven task for a ${os.name} box."/>
<condition property="maven.cmd" value="maven.bat">
<os family="windows"/>
<j:set var="maven.cmd" value="maven.bat"/>
</condition>
<condition property="maven.cmd" value="maven">
<os family="unix"/>
<j:set var="maven.cmd" value="maven"/>
</condition>
<echo message="command: ${maven.cmd}"/>
</goal>
This is what I get when running it. Notice that os.name is coming back as "Windows XP".
C:\dev\projects>maven -X os-init __ __ | \/ |__ _Apache__ ___ | |\/| / _` \ V / -_) ' \ ~ intelligent projects ~ |_| |_\__,_|\_/\___|_||_| v. 1.0-rc1-SNAPSHOT
[DEBUG] Adding reference: maven.dependency.classpath -> [DEBUG] Adding reference: maven-classpath -> os-init: [echo] Adapting the maven task for a Windows XP box. [condition] [DEBUG] Condition false; not setting maven.cmd [condition] [DEBUG] Condition false; not setting maven.cmd [echo] command: maven BUILD SUCCESSFUL Total time: 1 seconds Finished at: Wed Oct 29 11:29:41 MST 2003
Any ideas why the "condition" or <os> test would not be working in maven? It works fine in Ant.
-- Brent Hale Fishbowl Inventory www.fishbowlinventory.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
