Re: configuration management application



On 20 Dic, 15:02, Lew <l...@xxxxxxxxxxxxx> wrote:
gmanne...@xxxxxxxxx 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?

First of all thanks for your replay. I agree with you but you are
talking about "developing best practces" after all. My original
question was different, there is an application that take help you
manteinig different installation of a general java application (not
necessary too much well designed) ?


Did you take any time at all to view the Ant documentation?
<http://ant.apache.org/>
<http://en.wikibooks.org/wiki/Programming:Apache_Ant>

I'll do I promise... as soon as possibile
.



Relevant Pages

  • Re: configuration management application
    ... The usual mode is to create a new JAR for a new build. ... That is not an Ant 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. ... One of Java's strengths is that you can deploy the same artifact without modification to multiple targets. ...
    (comp.lang.java.programmer)
  • Re: configuration management application
    ... manage the development of java applications for different evnironment? ... The simplest would be to just use jar and ant to build targets. ...
    (comp.lang.java.programmer)
  • Re: Giving an application a window icon in a sensible way
    ... (revenue-generating, no doubt) ... From those who recommended getting Ant, ... I think when you tell Eclipse to make a JAR, ...
    (comp.lang.java.programmer)
  • Re: applet signing library
    ... >Hi i posted a while agoabout signing java applets. ... >with a gui front end that can jar, ... Here is an ant script to compile, jar, and sign an applet. ...
    (comp.lang.java.programmer)
  • Re: replace files in a jar...
    ... Is there a way to get ant to do ... > inside a jar without recreating the complete jar. ... A search of the Ant archives ... Or maybe someone will come along who has used the update flag in a Jar task ...
    (comp.lang.java.programmer)