You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Shawn Castrianni <Sh...@halliburton.com> on 2008/04/09 05:31:57 UTC

exec task

Oh yeah, and it would be nice if one exec task could continue a previous exec task environment.  So if one exec task calls a batch file that sets some env variables or something, the next exec task could have an option to continue the environment setup by the previous exec task and execute something else with the batch file already having been run.

---
Shawn Castrianni

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient.  Any review, use, distribution, or disclosure by others is strictly prohibited.  If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.

RE: exec task

Posted by Shawn Castrianni <Sh...@halliburton.com>.
All platforms means:

Win32
Win64
Linux32
Linux64
Solaris64


Windows does not have bash that I am aware of, unless I install MKS Tools or some 3rd party software.

---
Shawn Castrianni


-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Wednesday, April 09, 2008 10:22 AM
To: Ant Users List
Subject: Re: exec task

you can under bash..

Buona fortuna
Martin-

----- Original Message -----
From: "Shawn Castrianni" <Sh...@halliburton.com>
To: "'Ant Users List'" <us...@ant.apache.org>
Sent: Wednesday, April 09, 2008 11:00 AM
Subject: RE: exec task


Will the semicolon trick of executing more than one command with one exec
task work on all platforms??

---
Shawn Castrianni


-----Original Message-----
From: Vallon, Justin [mailto:jvallon@bear.com]
Sent: Wednesday, April 09, 2008 9:54 AM
To: Ant Users List
Subject: RE: exec task

Shawn,

'exec' runs a process.  Side-effects (environment variables, etc) that
happen in the process are lost when the process exits.  If you want this
behavior, then you could generate a script on the fly that does the
equivalent ("set-some-vars\nrun-the-command\n").

If you want one task to choose the vars, and another to run the command,
then you could create a temporary file that contains config info that is
built up as the tasks execute:

init-config: create empty "config" file
setup (depends on init-config): append "set-some-vars" to config
setup2 (depends on init-config): append "set-other-vars" to config
run (depends on setup and setup2): exec "config ; run-command"

-Justin
office 8-383-6725, 212-272-6725; cell 917-861-6042

-----Original Message-----
From: Shawn Castrianni [mailto:Shawn.Castrianni@halliburton.com]
Sent: Tuesday, April 08, 2008 11:32 PM
To: 'user@ant.apache.org'
Subject: exec task

Oh yeah, and it would be nice if one exec task could continue a previous
exec task environment.  So if one exec task calls a batch file that sets
some env variables or something, the next exec task could have an option
to continue the environment setup by the previous exec task and execute
something else with the batch file already having been run.

---
Shawn Castrianni

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and
privileged information for the sole use of the intended recipient.  Any
review, use, distribution, or disclosure by others is strictly
prohibited.  If you are not the intended recipient (or authorized to
receive information for the intended recipient), please contact the
sender by reply e-mail and delete all copies of this message.



***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
***********************************************************************

---------------------------------------------------------------------
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: exec task

Posted by Martin Gainty <mg...@hotmail.com>.
you can under bash..

Buona fortuna
Martin-

----- Original Message -----
From: "Shawn Castrianni" <Sh...@halliburton.com>
To: "'Ant Users List'" <us...@ant.apache.org>
Sent: Wednesday, April 09, 2008 11:00 AM
Subject: RE: exec task


Will the semicolon trick of executing more than one command with one exec
task work on all platforms??

---
Shawn Castrianni


-----Original Message-----
From: Vallon, Justin [mailto:jvallon@bear.com]
Sent: Wednesday, April 09, 2008 9:54 AM
To: Ant Users List
Subject: RE: exec task

Shawn,

'exec' runs a process.  Side-effects (environment variables, etc) that
happen in the process are lost when the process exits.  If you want this
behavior, then you could generate a script on the fly that does the
equivalent ("set-some-vars\nrun-the-command\n").

If you want one task to choose the vars, and another to run the command,
then you could create a temporary file that contains config info that is
built up as the tasks execute:

init-config: create empty "config" file
setup (depends on init-config): append "set-some-vars" to config
setup2 (depends on init-config): append "set-other-vars" to config
run (depends on setup and setup2): exec "config ; run-command"

-Justin
office 8-383-6725, 212-272-6725; cell 917-861-6042

-----Original Message-----
From: Shawn Castrianni [mailto:Shawn.Castrianni@halliburton.com]
Sent: Tuesday, April 08, 2008 11:32 PM
To: 'user@ant.apache.org'
Subject: exec task

Oh yeah, and it would be nice if one exec task could continue a previous
exec task environment.  So if one exec task calls a batch file that sets
some env variables or something, the next exec task could have an option
to continue the environment setup by the previous exec task and execute
something else with the batch file already having been run.

---
Shawn Castrianni

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and
privileged information for the sole use of the intended recipient.  Any
review, use, distribution, or disclosure by others is strictly
prohibited.  If you are not the intended recipient (or authorized to
receive information for the intended recipient), please contact the
sender by reply e-mail and delete all copies of this message.



***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
***********************************************************************

---------------------------------------------------------------------
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: exec task

Posted by Shawn Castrianni <Sh...@halliburton.com>.
Will the semicolon trick of executing more than one command with one exec task work on all platforms??

---
Shawn Castrianni


-----Original Message-----
From: Vallon, Justin [mailto:jvallon@bear.com]
Sent: Wednesday, April 09, 2008 9:54 AM
To: Ant Users List
Subject: RE: exec task

Shawn,

'exec' runs a process.  Side-effects (environment variables, etc) that
happen in the process are lost when the process exits.  If you want this
behavior, then you could generate a script on the fly that does the
equivalent ("set-some-vars\nrun-the-command\n").

If you want one task to choose the vars, and another to run the command,
then you could create a temporary file that contains config info that is
built up as the tasks execute:

init-config: create empty "config" file
setup (depends on init-config): append "set-some-vars" to config
setup2 (depends on init-config): append "set-other-vars" to config
run (depends on setup and setup2): exec "config ; run-command"

-Justin
office 8-383-6725, 212-272-6725; cell 917-861-6042

-----Original Message-----
From: Shawn Castrianni [mailto:Shawn.Castrianni@halliburton.com]
Sent: Tuesday, April 08, 2008 11:32 PM
To: 'user@ant.apache.org'
Subject: exec task

Oh yeah, and it would be nice if one exec task could continue a previous
exec task environment.  So if one exec task calls a batch file that sets
some env variables or something, the next exec task could have an option
to continue the environment setup by the previous exec task and execute
something else with the batch file already having been run.

---
Shawn Castrianni

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and
privileged information for the sole use of the intended recipient.  Any
review, use, distribution, or disclosure by others is strictly
prohibited.  If you are not the intended recipient (or authorized to
receive information for the intended recipient), please contact the
sender by reply e-mail and delete all copies of this message.



***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
***********************************************************************

---------------------------------------------------------------------
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: exec task

Posted by "Vallon, Justin" <jv...@bear.com>.
Shawn,

'exec' runs a process.  Side-effects (environment variables, etc) that
happen in the process are lost when the process exits.  If you want this
behavior, then you could generate a script on the fly that does the
equivalent ("set-some-vars\nrun-the-command\n").

If you want one task to choose the vars, and another to run the command,
then you could create a temporary file that contains config info that is
built up as the tasks execute:

init-config: create empty "config" file
setup (depends on init-config): append "set-some-vars" to config
setup2 (depends on init-config): append "set-other-vars" to config
run (depends on setup and setup2): exec "config ; run-command"

-Justin
office 8-383-6725, 212-272-6725; cell 917-861-6042

-----Original Message-----
From: Shawn Castrianni [mailto:Shawn.Castrianni@halliburton.com] 
Sent: Tuesday, April 08, 2008 11:32 PM
To: 'user@ant.apache.org'
Subject: exec task

Oh yeah, and it would be nice if one exec task could continue a previous
exec task environment.  So if one exec task calls a batch file that sets
some env variables or something, the next exec task could have an option
to continue the environment setup by the previous exec task and execute
something else with the batch file already having been run.

---
Shawn Castrianni

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and
privileged information for the sole use of the intended recipient.  Any
review, use, distribution, or disclosure by others is strictly
prohibited.  If you are not the intended recipient (or authorized to
receive information for the intended recipient), please contact the
sender by reply e-mail and delete all copies of this message.



***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation, 
offer or agreement or any information about any transaction, customer 
account or account activity contained in this communication.
***********************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org