[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.newcomer] External ant classpath
|
- From: cbrown@xxxxxxxxxx (cbrown)
- Date: Mon, 6 Jun 2005 16:29:16 +0000 (UTC)
- Newsgroups: eclipse.newcomer
- Organization: not organized
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
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.