ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Seeger" <rsee...@nortelnetworks.com>
Subject Best way to handle an "if" type situation?
Date Thu, 25 Oct 2001 17:55:32 GMT
Hiya folks.

I'm trying to figure out the best way to handle the following situation...

I want to create a path. If another path element has been defined, I want
it included in the path. If it isn't defined, I don't want it included. The
solution I've come up with so far is show below. Does anyone have any input
on whether this is a good way to handle this? Is there a better way?

Thanks in advance,
Rob Seeger

<target name="c.e.c.w" if="cpath.local">
  <path id="cpath.external">
    <pathelement location="${TOOLSHOME}/java/acme/lib.jar"/>
	<pathelement location="${TOOLSHOME}/java/jsdk/lib/jsdk.jar"/>
	<pathelement location="${TOOLSHOME}/java/jdbc/classes"/>
	<pathelement location="${TOOLSHOME}/java/swing/swingall.jar"/>
	<pathelement location="${TOOLSHOME}/java/pfj/pfjfull.jar"/>
	<pathelement path="${cpath.local}"/>
  </path>
</target>

<target name="c.e.c.wo" unless="cpath.local">
  <path id="cpath.external">
    <pathelement location="${TOOLSHOME}/java/acme/lib.jar"/>
	<pathelement location="${TOOLSHOME}/java/jsdk/lib/jsdk.jar"/>
	<pathelement location="${TOOLSHOME}/java/jdbc/classes"/>
	<pathelement location="${TOOLSHOME}/java/swing/swingall.jar"/>
	<pathelement location="${TOOLSHOME}/java/pfj/pfjfull.jar"/>
  </path>
</target>

<target name="cpath.external.create" depends="c.e.c.w, c.e.c.wo">
</target>



========================================
Robert Seeger
Network Engineer
Nortel Networks

Telephone:	(518)237-2087
Pager:		(800)SKY-8888  Pin#1264792
Fax:		(518)237-4190
Email:		rseeger@nortelnetworks.com
Address:	224 5th Ave, Apt#2
		Lansingburgh, NY 12182
========================================

Mime
View raw message