ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William I. Zumwalt" <wizumw...@yahoo.com>
Subject help calling import of prop file to set globals
Date Sun, 12 Sep 2004 03:18:39 GMT
Hey all,

How would I go about the following ... I have a
classpath I'm trying to set that uses a property from
a properties file as shown in my init-platform target,
but because it hasn't been set yet (i.e. havn't yet
called my init-platform target) ... it of course is
not found. I'd like to somehow call this target so
that I could then set my global properties (I'm
calling them global but, these would be the props I'm
setting that are not in a target).

Any ideas?

--- build.xml ---

<project name="Code Construct" default="main-build"
basedir=".">
   ...
   <path id="classpath.jboss.lib">

	<!-- my PROBLEM, jboss.lib not yet set from prop file
-->

        <fileset dir="${jboss.lib}">
            <include name="**/*.jar"/>
        </fileset>
        <pathelement
location="${jboss.server}/jboss-jdbc_ext.jar"/>
        <pathelement
location="${jboss.client}/jmx-rmi-connector-client.jar"/>
    </path>

    ...
    <target name="init-platform">
        <condition property="platform" value="linux">
            <equals arg1="${os.name}" arg2="Linux" />
        </condition>
            
        <condition property="platform" value="macosx">
            <equals arg1="${os.name}" arg2="Mac OS X"
/>
        </condition>
            
        <echo message="Using ${platform}.properties"
/>
        <property file="etc/${platform}.properties" />
    </target>

--- 
init-platform target would source in these properties
from my ~/etc/linux.properties file ---

jboss.server=/opt/jboss-3.2.4/server
jboss.lib=/opt/jboss-3.2.4/server/default/lib
jboss.client=/opt/jboss-3.2.4/client
jboss.deploy=/opt/jboss-3.2.4/server/default/deploy
~



		
_______________________________
Do you Yahoo!?
Shop for Back-to-School deals on Yahoo! Shopping.
http://shopping.yahoo.com/backtoschool

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


Mime
View raw message