ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Kramer <Markus.Kra...@mpi.nl>
Subject OS-specific execution of any element requested
Date Fri, 20 Sep 2002 10:53:27 GMT
I don't see a way to constrain elements of a java target to the
operating system.
This leads to "Copy and Paste" java targets, one for each OS, which is a
bad thing.
The following does not work, but it would be nice to have, I think.
I propose that *each* element can have a os attribute.
Below, there are three offending os="windows" attributes at the jvmarg
and the pathelement elements.
The meaning of a jvmarg element with an os="windows" attributes would be
that its only regarded when on Win32.

  <java classname="foo.bar.Main"
        fork="yes" >
 <arg value="${eaffile}"/>
 <jvmarg value="-Djava.ext.dirs=${src}/java.ext.dir" />
 <jvmarg value="-Djava.library.path=${src}/jmf__Vwin2.1.1a" /
os="windows">
    <jvmarg value="${jvmarg}"/>
    <classpath refid="extpacFooBar"/>
    <classpath>
      <pathelement location="${build}"/>
      <pathelement location="${src}/mpi/lib/jmf__Vwin2.1.1a/jmf.jar"/
os="windows">
      <pathelement location="${src}/mpi/lib/jmf__Vwin2.1.1a/sound.jar"/
os="windows">
    </classpath>
  </java>

The same is true for OS-specific build pargets.
Does Ant provide a workaround?

best
-Markus




--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message