External ant classpath [message #74577] |
Mon, 06 June 2005 12:29  |
Eclipse User |
|
|
|
Originally posted by: cbrown.sensis.com
I need help setting the classpath for an external ant build file in a
manner that will work for a team of developers working on differnt
machines - i.e., when external packages aren't always installed in the
same place.
I have a build.xml file like;
<project default="mine">
<target name="mine" >
<java dir="." fork="true" classname="myPackage.myClass">
<arg value="myDoc.xml" />
</java>
</target>
</project>
I have tried;
- placing a link to myPackage.jar in ~/.ant/lib
- adding an environment variable 'export MY_HOME=myPath', and adding an
entry for ${env_var:MY_HOME}/myPackage.jar to the ant Runtime preferences
- using
<classpath>
<pathelement location="${env.MY_HOME}/myPackage.jar"/>
</classpath>
- using
<classpath>
<pathelement path="${java.class.path}"/>
</classpath>
- a couple of other variations I can't recall.
Also, is there a mechanism that works for both IDE builds and external
builders? I.e., a way to define the classpath once and have it work
throughout?
Thank you for your help.
|
|
|
Re: External ant classpath [message #74632 is a reply to message #74577] |
Mon, 06 June 2005 14:33  |
Eclipse User |
|
|
|
We have a bug currently with not supporting ${user.home}/.ant/lib
https://bugs.eclipse.org/bugs/show_bug.cgi?id=98412
I will be working to fix this up today
Darins
"cbrown" <cbrown@sensis.com> wrote in message
news:870b96ca303f5c4ed95896f0aaaa1836$1@www.eclipse.org...
>
> I need help setting the classpath for an external ant build file in a
> manner that will work for a team of developers working on differnt
> machines - i.e., when external packages aren't always installed in the
> same place.
>
> I have a build.xml file like;
>
> <project default="mine">
> <target name="mine" >
> <java dir="." fork="true" classname="myPackage.myClass">
> <arg value="myDoc.xml" />
> </java>
> </target>
> </project>
>
> I have tried;
>
> - placing a link to myPackage.jar in ~/.ant/lib
> - adding an environment variable 'export MY_HOME=myPath', and adding an
> entry for ${env_var:MY_HOME}/myPackage.jar to the ant Runtime preferences
> - using
> <classpath>
> <pathelement location="${env.MY_HOME}/myPackage.jar"/>
> </classpath>
> - using
> <classpath>
> <pathelement path="${java.class.path}"/>
> </classpath>
> - a couple of other variations I can't recall.
>
> Also, is there a mechanism that works for both IDE builds and external
> builders? I.e., a way to define the classpath once and have it work
> throughout?
>
> Thank you for your help.
>
|
|
|
Powered by
FUDForum. Page generated in 0.07481 seconds