How to reference "Eclipse (user) libraries" from Ant script? [message #266047] |
Tue, 04 November 2008 11:47  |
Eclipse User |
|
|
|
Originally posted by: cpet_magnus.hotmail.com
When I go in my current Eclipse project to properties->Java Build path->Libraries
then a couple of Libraries with *.jars files (e.g. for Hibernate) inside are listed.
When I compile the project with the Eclipse "Run as.." everything is fine.
Now I want to do the same with an Ant script in the projects base dir.
The problem is that this build.xml currently expects all the *.jars in the
\lib filder (which is not the case).
...
<property name="lib.dir" value="lib" />
<path id="project.classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
<include name="**/*.zip" />
</fileset>
</path>
How can I refer from an Ant script to a "property" of the Eclipse project
and use the (user) library *.jars somewhere on my hard disc?
Do I really have to list all the jar files individually like
...
<property name="lib.dir" value="lib" />
<path id="project.classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
<include name="**/*.zip" />
<include name="D:\test\proj23\Hibernate\aaaa.jar" />
....
</fileset>
</path>
I could imagine that there is a reference link possible like:
...
<property name="lib.dir" value="lib" />
<path id="project.classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
<include name="**/*.zip" />
<include name="$(Eclipse)->$(UserLibraries)/Hibernate/*.jar" />
....
</fileset>
</path>
Camille
|
|
|
|
Powered by
FUDForum. Page generated in 0.11509 seconds