Is it safe to use svnant to update the directory where the build.xml file is located?

I support a build system that uses svnant from one directory to update a large number of projects in another directory. He then moves on to one of those projects that have been updated and does the actual build.

Is it safe to do everything from this main project? Can the main project use svnant to update itself, or can a problem arise if svn needs to update the build.xml file that ant is currently using?

+4
source share
2 answers

For the self-updating main project build.xml - there may be a problem with running the subversion update and building at a time. The nature of the problem depends on what changes are made to build.xml. Just restarting the assembly will probably fix it, since build.xml Ant, then loading at startup will be relevant.

If you really need to reliably update build.xml and complete the build in one go, you might consider moving part of the build after publishing to antcall . When Ant launches the antcall'ed target, it reads the build.xml file again, so any change to this file from the moment Ant is called is accepted for the account. Antcall starts processing from scratch, so if you have (possibly expensive) initializations, you will need to start them again.

+1
source

If this does not take up too much disk space (if disk space is not a problem), you can have two working directories:

  • where you svnant 'anything you want
  • where you run the builds, except that rsynch will precede the start of the run to import any changes from the first working directory to the second.

In other words, you must pull out the modifications before starting any assembly.

0
source

All Articles