You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ben Stover <bx...@yahoo.co.uk> on 2008/10/27 23:27:08 UTC
How to access the basedir of ANOTHER project in Eclipse?
Assume I use a build.xml in Project AAA.
As part of a property definition I want to define a folder from
ANOTHER project BBB within the same Eclipse installation.
However the actual path should NOT be entered directly (=absolute) but
relative to the current workspace. It should go similar like:
<property name="seconddir" value="${basedirofcurrentworkspace}/projectBBB/src" />
How can I refer this external dir with Ant?
Ben
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
AW: How to access the basedir of ANOTHER project in Eclipse?
Posted by "Knuplesch, Juergen" <Ju...@icongmbh.de>.
What do you want to do with that?
Maybe it is easier to help, if we understand whar you want to achieve.
I use ant4eclipse which is a big help for me.
--
Jürgen
-----Ursprüngliche Nachricht-----
Von: Ben Stover [mailto:bxstover@yahoo.co.uk]
Gesendet: Montag, 27. Oktober 2008 23:27
An: user@ant.apache.org
Betreff: How to access the basedir of ANOTHER project in Eclipse?
Assume I use a build.xml in Project AAA.
As part of a property definition I want to define a folder from ANOTHER project BBB within the same Eclipse installation.
However the actual path should NOT be entered directly (=absolute) but relative to the current workspace. It should go similar like:
<property name="seconddir" value="${basedirofcurrentworkspace}/projectBBB/src" />
How can I refer this external dir with Ant?
Ben
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
AW: How to access the basedir of ANOTHER project in Eclipse?
Posted by Ja...@rzf.fin-nrw.de.
Ok, I thought you want to Ant to search the other project, which isnt possible.
But Eclipse knows that and could provide that information (like Carlos and Matt said).
But in that case a CI tool must provide that information too.
Jan
>-----Ursprüngliche Nachricht-----
>Von: Matt Benson [mailto:gudnabrsam@yahoo.com]
>Gesendet: Dienstag, 28. Oktober 2008 19:27
>An: Ant Users List
>Betreff: Re: How to access the basedir of ANOTHER project in Eclipse?
>
>If you just have your projects all checked out
>directly into the workspace, there's no real trick to
>using:
>
><property name="workspaceRoot" location=".." />
>
>Alternatively you could possibly add such a property
>to your base Ant config in Eclipse, but since I'm not
>using that there may be some reason I don't presently
>recall. ;)
>
>HTH,
>Matt
>
>--- Carlos Ortiz <ch...@gmail.com> wrote:
>
>> Actually it is posible but you must run the
>> build.xml as a external
>> tool in eclipse then send as a argument
>>
>> -D<property>=<value>
>>
>> Yet there is a small trick since ${workspace_loc}
>> variable won't work
>> you have to create a new variable with the same
>> value of
>> ${workspace_loc}
>>
>> for example
>> MyVar=/home/myuser/myworkspace/
>>
>> Then you can do
>>
>> -DMyproperty=${MyVar}/projectBBB/src
>>
>> That should to the trick
>>
>>
>> 2008/10/28 <Ja...@rzf.fin-nrw.de>
>> >
>> > AFAIK you cant:
>> > - Ant doesnt know anything about Eclipse.
>> > - An Eclipse workspace knows its projects but a
>> project does not know its workspace.
>> > Therefore parsing the .classpath and .project
>> files wouldnt help.
>> >
>> > Jan
>> >
>> > >-----Ursprüngliche Nachricht-----
>> > >Von: Ben Stover [mailto:bxstover@yahoo.co.uk]
>> > >Gesendet: Montag, 27. Oktober 2008 23:27
>> > >An: user@ant.apache.org
>> > >Betreff: How to access the basedir of ANOTHER
>> project in Eclipse?
>> > >
>> > >Assume I use a build.xml in Project AAA.
>> > >As part of a property definition I want to define
>> a folder from
>> > >ANOTHER project BBB within the same Eclipse
>> installation.
>> > >
>> > >However the actual path should NOT be entered
>> directly (=absolute) but
>> > >relative to the current workspace. It should go
>> similar like:
>> > >
>> > ><property name="seconddir"
>> >
>> >value="${basedirofcurrentworkspace}/projectBBB/src"
>> />
>> > >
>> > >How can I refer this external dir with Ant?
>> > >
>> > >
>> > >Ben
>> > >
>> > >
>> > >
>> > >
>> >
>>
>>---------------------------------------------------------------------
>> > >To unsubscribe, e-mail:
>> user-unsubscribe@ant.apache.org
>> > >For additional commands, e-mail:
>> user-help@ant.apache.org
>> > >
>> > >
>> >
>> >
>>
>---------------------------------------------------------------------
>> > To unsubscribe, e-mail:
>> user-unsubscribe@ant.apache.org
>> > For additional commands, e-mail:
>> user-help@ant.apache.org
>> >
>>
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: How to access the basedir of ANOTHER project in Eclipse?
Posted by Matt Benson <gu...@yahoo.com>.
If you just have your projects all checked out
directly into the workspace, there's no real trick to
using:
<property name="workspaceRoot" location=".." />
Alternatively you could possibly add such a property
to your base Ant config in Eclipse, but since I'm not
using that there may be some reason I don't presently
recall. ;)
HTH,
Matt
--- Carlos Ortiz <ch...@gmail.com> wrote:
> Actually it is posible but you must run the
> build.xml as a external
> tool in eclipse then send as a argument
>
> -D<property>=<value>
>
> Yet there is a small trick since ${workspace_loc}
> variable won't work
> you have to create a new variable with the same
> value of
> ${workspace_loc}
>
> for example
> MyVar=/home/myuser/myworkspace/
>
> Then you can do
>
> -DMyproperty=${MyVar}/projectBBB/src
>
> That should to the trick
>
>
> 2008/10/28 <Ja...@rzf.fin-nrw.de>
> >
> > AFAIK you cant:
> > - Ant doesnt know anything about Eclipse.
> > - An Eclipse workspace knows its projects but a
> project does not know its workspace.
> > Therefore parsing the .classpath and .project
> files wouldnt help.
> >
> > Jan
> >
> > >-----Ursprüngliche Nachricht-----
> > >Von: Ben Stover [mailto:bxstover@yahoo.co.uk]
> > >Gesendet: Montag, 27. Oktober 2008 23:27
> > >An: user@ant.apache.org
> > >Betreff: How to access the basedir of ANOTHER
> project in Eclipse?
> > >
> > >Assume I use a build.xml in Project AAA.
> > >As part of a property definition I want to define
> a folder from
> > >ANOTHER project BBB within the same Eclipse
> installation.
> > >
> > >However the actual path should NOT be entered
> directly (=absolute) but
> > >relative to the current workspace. It should go
> similar like:
> > >
> > ><property name="seconddir"
> >
> >value="${basedirofcurrentworkspace}/projectBBB/src"
> />
> > >
> > >How can I refer this external dir with Ant?
> > >
> > >
> > >Ben
> > >
> > >
> > >
> > >
> >
>
>---------------------------------------------------------------------
> > >To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> > >For additional commands, e-mail:
> user-help@ant.apache.org
> > >
> > >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> user-help@ant.apache.org
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: How to access the basedir of ANOTHER project in Eclipse?
Posted by Carlos Ortiz <ch...@gmail.com>.
Actually it is posible but you must run the build.xml as a external
tool in eclipse then send as a argument
-D<property>=<value>
Yet there is a small trick since ${workspace_loc} variable won't work
you have to create a new variable with the same value of
${workspace_loc}
for example
MyVar=/home/myuser/myworkspace/
Then you can do
-DMyproperty=${MyVar}/projectBBB/src
That should to the trick
2008/10/28 <Ja...@rzf.fin-nrw.de>
>
> AFAIK you cant:
> - Ant doesnt know anything about Eclipse.
> - An Eclipse workspace knows its projects but a project does not know its workspace.
> Therefore parsing the .classpath and .project files wouldnt help.
>
> Jan
>
> >-----Ursprüngliche Nachricht-----
> >Von: Ben Stover [mailto:bxstover@yahoo.co.uk]
> >Gesendet: Montag, 27. Oktober 2008 23:27
> >An: user@ant.apache.org
> >Betreff: How to access the basedir of ANOTHER project in Eclipse?
> >
> >Assume I use a build.xml in Project AAA.
> >As part of a property definition I want to define a folder from
> >ANOTHER project BBB within the same Eclipse installation.
> >
> >However the actual path should NOT be entered directly (=absolute) but
> >relative to the current workspace. It should go similar like:
> >
> ><property name="seconddir"
> >value="${basedirofcurrentworkspace}/projectBBB/src" />
> >
> >How can I refer this external dir with Ant?
> >
> >
> >Ben
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >For additional commands, e-mail: user-help@ant.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
AW: How to access the basedir of ANOTHER project in Eclipse?
Posted by Ja...@rzf.fin-nrw.de.
AFAIK you cant:
- Ant doesnt know anything about Eclipse.
- An Eclipse workspace knows its projects but a project does not know its workspace.
Therefore parsing the .classpath and .project files wouldnt help.
Jan
>-----Ursprüngliche Nachricht-----
>Von: Ben Stover [mailto:bxstover@yahoo.co.uk]
>Gesendet: Montag, 27. Oktober 2008 23:27
>An: user@ant.apache.org
>Betreff: How to access the basedir of ANOTHER project in Eclipse?
>
>Assume I use a build.xml in Project AAA.
>As part of a property definition I want to define a folder from
>ANOTHER project BBB within the same Eclipse installation.
>
>However the actual path should NOT be entered directly (=absolute) but
>relative to the current workspace. It should go similar like:
>
><property name="seconddir"
>value="${basedirofcurrentworkspace}/projectBBB/src" />
>
>How can I refer this external dir with Ant?
>
>
>Ben
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org