ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Chambery" <tchamb...@hotmail.com>
Subject dynamically assembled classpath
Date Thu, 17 Jan 2002 21:56:22 GMT
Hey all,

I'm trying to assemble a classpath based on whether or not a system is
capable of compiling for WebLogic or WebSphere:

 <target name  ="set.foo.classpath"
   description ="sets the foo classpath">
  <available file="${websphere.home}" type="dir"
property="websphere.home.present"/>
  <available file="${weblogic.home}" type="dir"
property="weblogic.home.present"/>
  <antcall target="set.foo.base.classpath"/>
  <antcall target="set.foo.weblogic.classpath"/>
  <antcall target="set.foo.websphere.classpath"/>
  <path id="ecore.classpath">
   <path refid="ecore.base.classpath"/>
   <path refid="ecore.was.classpath"/>
   <path refid="ecore.wl.classpath"/>
  </path>
 </target>
 <target name  ="set.foo.base.classpath"
   description ="set the foo base classpath">
  <path id="foo.base.classpath">
        <!-- some path stuff -->
  </path>
 </target>
 <target name  ="set.foo.websphere.classpath"
   if   ="websphere.home.present">
      <path id="foo.was.classpath">
        <!-- websphere classpath assembly -->
      </path>
 </target>
 <target name  ="set.foo.weblogic.classpath"
   if   ="weblogic.home.present">
  <path id="foo.wl.classpath">
        <!-- weblogic classpath assembly -->
  </path>
 </target>

but this don't work:

S:\FOO>ant init
Buildfile: build.xml
set.foo.classpath:
set.foo.base.classpath:
set.foo.weblogic.classpath:
set.foo.websphere.classpath:
BUILD FAILED
Reference foo.base.classpath not found.

Is there a way to make this work, or a better way I'm not thinking of?

Thanks,

Todd

--
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