| Author |
build.properties - to have or not to have
|
Marilyn de Queiroz
Sheriff
Joined: Jul 22, 2000
Posts: 9001
|
|
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?
|
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
|
 |
Gregg Bolinger
Sheriff
Joined: Jul 11, 2001
Posts: 15040
|
|
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??
|
My Blog | DZone Articles
|
 |
Rob Ross
Bartender
Joined: Jan 07, 2002
Posts: 2205
|
|
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 ]
|
Rob
SCJP 1.4
|
 |
Marilyn de Queiroz
Sheriff
Joined: Jul 22, 2000
Posts: 9001
|
|
|
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
Joined: Jul 22, 2000
Posts: 9001
|
|
|
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?
|
 |
bas duijzings
Ranch Hand
Joined: Apr 07, 2004
Posts: 83
|
|
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
|
have a nice one
|
 |
 |
|
|
subject: build.properties - to have or not to have
|
|
|