custom ant build script: how to get the project's classpath ? [message #478694] |
Thu, 06 August 2009 08:39  |
Eclipse User |
|
|
|
Hello,
I searched the archives and just found this subject discussed about once or twice in 2005.
I want to run a custom ant build script after the java builder. This ant build script will have to call some targets that need the project's classpath ?
Back in 2005 it was considered an interesting idea, but not possible at that time.
Is there a possibility to do so now ?
Thanks in advance for your answers,
--
Laurent Petit
|
|
|
|
|
Re: custom ant build script: how to get the project's classpath ? [message #478840 is a reply to message #478767] |
Fri, 07 August 2009 04:22  |
Eclipse User |
|
|
|
My bad, I didn't verify the "provider" of this "eclipsetools.getclasspath".
It was provided by a commercial licensed product, so it's not at all the solution I was looking for.
Still searching ....
--
Laurent
Laurent Petit wrote:
> Hi,
>
> Replying to myself since I may well have found a solution (more by
> chance than by a rational approach to google / documentation browsing
> etc. :-).
>
> by making my ant script "run inside the same JVM as eclipse", I have
> access to a lot of interesting (though undocumented) task.
>
> Among them : eclipsetools.getclasspath
>
> Which I found can be used as :
>
> <eclipsetools.getclasspath javaproject="<my-eclipse-project-name>"
> property="build.ide.classpath" />
>
> and then use it to create a classpath:
>
> <path id="project.classpath">
> <pathelement path="${build.ide.classpath}" />
> ...
> </path>
>
> Of course, since I now have asked my script to execute from within eclipse,
>
> * I can no longer use it headless but I don't care because I already
> have an headless build with custom targets :-)
> * I must be careful using the fork="true" attribute when I call the
> java task.
>
> Regards,
>
|
|
|
Powered by
FUDForum. Page generated in 0.04303 seconds