ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Kee" <ke...@netsco.com>
Subject Multiple app server vendors in one build.xml?
Date Thu, 03 May 2001 14:42:24 GMT
Hi:
  Being new in the ant thing, I would appreciate if you can comment on the
best approach to support multiple app server vendors using ant.
  I like to make the build.xml file as such it can determine which variable
to use based on the vendor. For instance, I have set up a classpath which
our applications use called dev.build.path in this manner:
   <path id="dev.build.cpath">
      <pathelement location="/devtools/jakarta-log4j-1.0.4/log4j.jar"/>
      <pathelement location="/devtools/junit/junit3.5/junit.jar"/>
      <pathelement location="/devtools/jaxp/jaxp-1.1/jaxp.jar"/>
      <pathelement location="/devtools/jaxp/jaxp-1.1/crimson.jar"/>
      <pathelement location="/devtools/jaxp/jaxp-1.1/xalan.jar"/>
  </path>
  Then I have another path defined, which is application server vendor
specific:
 <!-- Iplanet classpath -->
    <path id="ias.build.cpath">
      <pathelement location="${ias.home}/classes/java/jdbc20.jar" />
      <pathelement location="${ias.home}/classes/java/servlet.jar" />
      <pathelement location="${ias.home}/classes/java/ldapjdk.jar" />
      <pathelement location="${ias.home}/classes/java/javax.jar" />
      <pathelement location="${ias.home}/classes/java/kfcjdk11.jar" />
      <pathelement location="${ias.home}/classes/java/jndi/cosnaming.jar" />
      <pathelement location="${ias.home}/classes/java/jndi/providerutil.jar"
/>
      <pathelement location="${ias.home}/classes/java/activation.jar" />
      <pathelement location="${ias.home}/classes/java/jms.jar" />
      <pathelement location="${ias.home}/classes/java/mail.jar" />
      <pathelement location="${ias.home}/classes/java" />
  </path>

  and
    <!-- Weblogic classpath -->
  <path id="weblogic.build.cpath">
      <pathelement location="${wl.home}/lib/weblogic_sp.jar" />
      <pathelement location="${wl.home}/lib/weblogic.jar" />
  </path>

  My goal is to have a path called as.build.path which will combined
dev.build.cpath and ias.build.cpath or dev.build.cpath and
weblogic.build.cpath based on a property called asvendor. This way, I can
have a target to build that source files.

  How can do such a conditional variable?

TIA,
keith


Mime
View raw message