Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » External ant classpath
External ant classpath [message #74577] Mon, 06 June 2005 16:29 Go to next message
Eclipse UserFriend
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 18:33 Go to previous message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
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.
>
Previous Topic:fortran libraries
Next Topic:Disable "Build Automatically"
Goto Forum:
  


Current Time: Sun Jun 30 10:13:31 GMT 2024

Powered by FUDForum. Page generated in 0.07300 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top