ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@cortexebusiness.com.au>
Subject RE: Platform independend classpath in build.xml?
Date Tue, 30 May 2000 23:58:30 GMT
Ken,

This should not be necessary. Besides making it difficult to read your
classpaths, the code in the Javac task for setting the classpath is

    /**
     * Set the classpath to be used for this compilation.
     */
    public void setClasspath(String classpath) {
        compileClasspath = project.translatePath(classpath);
    }

which means the classpath is translated from either Windows or Unix style
classpaths to a platform specific classpath. All of my classpaths use : and
/ but my build.xml file works under both Windows and Unix without change.

If its not working for you (or Lars), then it is a bug which we should
investigate. I can't reproduce it since my version of translatePath is
currently out of sync with CVS.

Cheers
Conor

--
Conor MacNeill
conor@cortexebusiness.com.au
Cortex eBusiness

> -----Original Message-----
> From: Ken Wood [mailto:kwood@i2.com]
> Sent: Saturday, 27 May 2000 2:45
> To: ant-dev@jakarta.apache.org
> Subject: Re: Platform independend classpath in build.xml?
>
>
> path.separator is a pre-defined property that has
> ";" or ":" depending on what OS you're running.
>
> Here is what I did:
>
>  <property name="S" value="${path.separator}" />
>  <property name="classpath"
> value="${JCORELIB}${S}${classes}${S}${LIBROOT}/appframe.jar${S}${L
> IBROOT}/font.jar"
> />
>
> I used "S" becuase I didn't want path.separator over and over and
> over...
>
> Lars Martin wrote:
> >
> > Hi all,
> >
> > how do I set a platform independend classpath in build.xml?
> >
> > Something like
> >
> >   <property name="classpath" value="${build.dir};${jar.dir}/..."/>
> >
> >   <javac srcdir="${src.dir}"
> >        destdir="${build.dir}"
> >        classpath="${classpath}"/>
> >
> > works under Windows but not under Unix. Changing ";" to ":" in
> the classpath
> > property works under Unix but not under Windows? What did I
> wrong? Did i miss
> > something?
> >
> > Lars
> > --
> > ________________________________________________________________
> > Lars Martin                         mailto:lars@softwarebuero.de
> > softwarebuero m&b (SMB)              http://www.softwarebuero.de
>
> --
>


Mime
View raw message