Put the mysql-connector-java-3.0.11-stable-bin.jar in a directory that is relative to
the build file. Your directory structure might look like this...
build.xml
lib/
mysql-connector-java-3.0.11-stable-bin.jar
src/
com/
.../
Then you could set the property like this...
<property name="mysql" location="lib/mysql-connector-java-3.0.11-stable-bin.jar"/>
Or another way to do it is to set an environment variable like SHARED_JARS. Set this
in the windows and linux environment...
Win:
SHARED_JARS=c:/jarbox/
Linux:
SHARED_JARS=/usr/share/jdbc-mysql/lib
Then use the following in your build file.
<property environment="env"/>
<property name="mysql"
value="${env.SHARED_JARS}/mysql-connector-java-3.0.11-stable-bin.jar"/>
-Rob Anderson
> -----Original Message-----
> From: Bernd Juergens [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 10, 2004 6:56 AM
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]