Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Reference environment variables in Ant build
Reference environment variables in Ant build [message #175180] Tue, 22 August 2006 04:18 Go to next message
Eclipse UserFriend
Originally posted by: clogmeister.gmail.com

Hi,

After googling the internets and mining through this newsgroup and some CDT
docs I still haven't found what I'm looking for (hmm, great title for a
song...).

We have a build.xml file that fires a couple of makes for our project. Most
of these makes depend heavily on utilities outside the project tree. In the
build.xml file these utilities are referred to by environment variables like
${env.MyEnvVar}\myutil. Normally we start a .bat file to set these vars
before we (manually) build the project but if I start the build in CDT these
vars are obviously empty. I tried to set these vars in the Make
Project->Environment but that doesn't seem to work.
So how do I elegantly set environment variables that can be referenced in an
Ant build file in CDT?

I hope someone can clue me in on this one.
TIA

Rick de Koster
Re: Reference environment variables in Ant build [message #175219 is a reply to message #175180] Tue, 22 August 2006 10:39 Go to previous messageGo to next message
Eclipse UserFriend
This is not really specific to the CDT, but if you are running the
build.xml using the ant builder under external tools there are tabs on
the launch configuration (Run->External Tools->External Tools...) where
you can set normal Ant properties as well as setting environment
variables (if you are running it in a separate JRE).

-Andrew

Rick de Koster wrote:
> Hi,
>
> After googling the internets and mining through this newsgroup and some CDT
> docs I still haven't found what I'm looking for (hmm, great title for a
> song...).
>
> We have a build.xml file that fires a couple of makes for our project. Most
> of these makes depend heavily on utilities outside the project tree. In the
> build.xml file these utilities are referred to by environment variables like
> ${env.MyEnvVar}\myutil. Normally we start a .bat file to set these vars
> before we (manually) build the project but if I start the build in CDT these
> vars are obviously empty. I tried to set these vars in the Make
> Project->Environment but that doesn't seem to work.
> So how do I elegantly set environment variables that can be referenced in an
> Ant build file in CDT?
>
> I hope someone can clue me in on this one.
> TIA
>
> Rick de Koster
>
>
Re: Reference environment variables in Ant build [message #175250 is a reply to message #175219] Tue, 22 August 2006 11:15 Go to previous message
Eclipse UserFriend
Originally posted by: clogmeister.gmail.com

Thx, works like a charm!

Rick de Koster

"Andrew Niefer" <aniefer@ca.ibm.com> wrote in message
news:ecf4u2$c7v$1@utils.eclipse.org...
> This is not really specific to the CDT, but if you are running the
> build.xml using the ant builder under external tools there are tabs on the
> launch configuration (Run->External Tools->External Tools...) where you
> can set normal Ant properties as well as setting environment variables (if
> you are running it in a separate JRE).
>
> -Andrew
>
> Rick de Koster wrote:
>> Hi,
>>
>> After googling the internets and mining through this newsgroup and some
>> CDT docs I still haven't found what I'm looking for (hmm, great title for
>> a song...).
>>
>> We have a build.xml file that fires a couple of makes for our project.
>> Most of these makes depend heavily on utilities outside the project tree.
>> In the build.xml file these utilities are referred to by environment
>> variables like ${env.MyEnvVar}\myutil. Normally we start a .bat file to
>> set these vars before we (manually) build the project but if I start the
>> build in CDT these vars are obviously empty. I tried to set these vars in
>> the Make Project->Environment but that doesn't seem to work.
>> So how do I elegantly set environment variables that can be referenced in
>> an Ant build file in CDT?
>>
>> I hope someone can clue me in on this one.
>> TIA
>>
>> Rick de Koster
Previous Topic:Bug? "Error Creating Project: Out of Sync"
Next Topic:Java code formatter and C/C++
Goto Forum:
  


Current Time: Sun May 11 16:20:40 EDT 2025

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

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

Back to the top