tags:

views:

27

answers:

3

Hi,

I have written an ANT script which deployes an application to my local development JEE enviroment. I need the same function to deploy it to the productive enviroment.

I often only want to deploy to the development server and rarely to the productive one. I'm using Eclipse IDE. Depending on the way ANT is used, it could happen, that I accidantally deploy to the productive server, with just one wrong click.

What is the best way, to build this functionality that way, that I could not deploy accedantally to the producte system?

  • Two separate ANT scripts?
  • Twoseparate ANT targets?
  • Is there any password protection for ANT tasks or targets?
  • Any other way?

Thanks in advance.

A: 

I'd vote for separate ant scripts.

Hank Gay
+1  A: 

Maybe first add for some extra input, so you have to click and press enter? Since ant 1.7, there is an input task

Fortega
A: 

Require a property to be set for the production deploy, and then only deploy to production from the command line (with -DreallyDeployToProduction=true or whatever).

Daniel Yankowsky