• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Encrypting ANT build.xml file

 
Ranch Hand
Posts: 220
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would like to encrypt build.properties file and use the password stored inside for my build.xml file.?

I would like to enter the database password inside build.properties file and use it by decrypting it using ANT ?

Thanks


Tuna TÖRE
 
Saloon Keeper
Posts: 27707
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For ant to be able to read and execute an encrypted build.xml you'd either need to store build.xml in an encypted filesystem or modify Ant so that it could decrypt build.xml.

Realistically, it's better just to hide the password someplace where it can't be seen by casual viewers and pass it in as an externally-supplied property. You could also make the Ant script prompt for a password, but as a rule, Ant scripts should avoid being interactive.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why not write an ant task that will decrypt an encrypted password?

I just googled and found this task: http://massdosage.co.za/tech/java/ant/index.html
 
Tuna Töre
Ranch Hand
Posts: 220
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:For ant to be able to read and execute an encrypted build.xml you'd either need to store build.xml in an encypted filesystem or modify Ant so that it could decrypt build.xml.

Realistically, it's better just to hide the password someplace where it can't be seen by casual viewers and pass it in as an externally-supplied property. You could also make the Ant script prompt for a password, but as a rule, Ant scripts should avoid being interactive.



Thanks I think you are right. it would be better to get it with an enternally-supplied property or I can use prompts.

Tuna TÖRE
 
Montana has cold dark nights. Perfect for the heat from incandescent light. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic