ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: Linux/Windows portability
Date Tue, 11 May 2004 06:05:19 GMT
I think I should make a FAQ entry :-)

Create a property file for your platform specific configurations and use
    <property file="${os.name}.properties"/>
    <property file="default.properties"/>

But be careful. I remember a discussion that on some win32 systems (nt/2k/xp
- 
one of these) the value of os.name is not "windows" :-)


Jan



> -----Original Message-----
> From: Bernd Juergens [mailto:juergens@promedico.com]
> Sent: Monday, May 10, 2004 3:56 PM
> To: 'Ant Users List'
> Subject: Linux/Windows portability
> 
> 
> Hi,
> 
> I need a build.xml for both Windows and Linux. Currently, I 
> uses something 
> like this:
> 
> 
> <property name="mysqlwin" 
> location="c:/jarbox/mysql-connector-java-3.0.11-stable-bin.jar"/>
> <property name="mysqllin" 
> location="/usr/share/jdbc-mysql/lib/mysql-connector-java-3.0.1
> 1-stable-bin.jar"/>
> 
> <property name="mysql" location="${mysqlwin}:${mysqllin}"/>
> 
> <target name="compileHeather" description="compile heather" >
>  <javac srcdir="${src}:${generated}" destdir="${classes}" 
> includes="heather/**" classpath="${mysql}" failonerror="on"/>
> </target>
> 
> So, in ${mysql} are both Windows and Linux pathes - though only
> one would be needed.
> 
> Any better way of doing this? 
> 
> The problem is that I have a lot of dependencies on external 
> jar files and I 
> want a simple way to put all those jars in a directory.
> 
> Thanks a lot,
> Bernd
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message