Re: configuration management application
gmannelli@gmail.com wrote:
Question number 1, can ant [sic] manage file different from source file, can
it copy (for instance) differente image file for each target?
Question number 2, can ant create something like a patch or it make a
whole new jar each time?
The usual mode is to create a new JAR for a new build. That is not an Ant
issue, that's a Java issue. You could make Ant do some kind of patch-like
build using custom code, if it's something you feel you really, really,
absolutely must do, but it's likely easier not to, and likely much more
satisfying for deployers and users alike. Again, this isn't an Ant issue but
a JAR issue. My best advice is not to do that, but use JARs the ordinary way.
Qustion number 3, you should change the build.xml file each time you
add or remove a file to your application?
Not usually. The canonical build.xml for a standard project source layout
would need no changes whatsoever. It is possible to construct your build file
so that it is required to change it with changes to your application, should
you so desire.
Question number 4, can ant manage different key value in same
properties file for different targets? In other word somethinglike put
the suitable connection string in the conf.properties file for each
env?
Ant /could/ be set up to modify the properties file, but it isn't really set
up to be an editor. Much easier is to use Ant to /select/ the appropriate
configuration for a build. However, it is also rather unusual to create a
different build for different environments. That is usually a deployment
issue, not a build issue.
One of Java's strengths is that you can deploy the same artifact without
modification to multiple targets. You could defeat that by creating separate
builds, but should you?
Did you take any time at all to view the Ant documentation?
<http://ant.apache.org/>
<http://en.wikibooks.org/wiki/Programming:Apache_Ant>
--
Lew