KK99
KK99

Reputation: 1989

How to set Environment variables using Ant

It looks like this question has been asked many times. I searched but I could not get the answer

I am looking for techniques on how to set environment variables in Windows system using Ant

I have around 10 environment variables that needs to be set before I can start the compile using Ant

I am running on Windows system.

any help would be appreciated

Thank you,

Karthik

Upvotes: 0

Views: 1803

Answers (1)

Saurabh Gokhale
Saurabh Gokhale

Reputation: 46425

There is no way to set environment variables through Ant.

The property task can only be used for getting the value of an already set environment variable.
You would need to call Ant's exec task and pass the command line (for your operating system) to set the value of an environment variable.

Upvotes: 1

Related Questions