• 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

build.properties - to have or not to have

 
Sheriff
Posts: 9103
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Some people put all their properties into a build.properties file. Others declare all their properties in the build.xml file.

I'm wondering what are some of the pros and cons for using a properties file?
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The only thing I can think of is if you have multiple people working on a project there might be common properties in the build.xml but then each developer might have his own set of properties for specific tasks for testing and what not.
Other than that, to remove clutter from the main build.xml maybe??
 
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've developed several detailed build.xml scripts, one for stand-alone projects, and one for web apps. When I start a new project, all I have to do is customize a few parameters in the build.properities file for that new project, and I never have to edit my build.xml file. That makes it easy to maintain a small group of build.xml scripts and just customize a single file with a few properties for each new project.
[ April 25, 2004: Message edited by: Rob Ross ]
 
Marilyn de Queiroz
Sheriff
Posts: 9103
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rob, Could you give me an idea of which properties you keep in the properties file and which you keep in the build.xml file?
 
Marilyn de Queiroz
Sheriff
Posts: 9103
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you ever been in a situation where you were unable to modify your development environment i.e. unable to set JBOSS_HOME for example?
 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
think about the following scenario. When you build an ear files for an environment called systemtest you may want to set different properties then when you build an ear for an environment like production. Think about variables for jdbc/oracle connections for instance that are different.
Then when starting the build you can specify which properties file you want to use.
regards,
baz
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic