Tweaking installed open source webapps

I'm a big fan of open source web applications like Mantis, Moodle and Mediawiki (and some not starting with 'M' too). In my experience, when using systems like these within a company you soon find need for minor tweaks. It's always best to stick with the released version as much as possible, but sometimes it is the difference between the product being accepted by users or not. Obviously, if your tweak works then the ideal is to feed it back to the open source project and have it accepted as a patch.

As these are PHP systems (yes, I know that this is a Java blog site, but I use these tools to manage my Java projects, plus I think that PHP people should be encouraged to take up build tools such as Ant even if it is Java-based) it is tempting to just unzip the distribution, install it on the server and maybe check all the files in to source control (+5 for subversion!). But, when it comes round to upgrading the software with the next release it could be a pain to find out which files you tweaked.

I like all my projects to be buildable from scratch via an Ant build, and I treat the installation and upkeep of a bugtracking system exactly the same as a system we are developing in-house. The ultimate aim is that a new developer can check out the project from subversion, run an Ant build and the system will run. I use a cut-down version of the AppFuse build.xml and properties. This includes a file that specifies which version of a library is being used.

The final piece of the jigsaw is to set CruiseControl up on the server, that way any developer can configure the app by checking a tweak into subversion. There is no need for anyone to have access to the server at all.

The files directory structure lib svnant-1.1.0-RC2 …unzipped svnant… mantis-1.0.6.tar.gz src …check in any files you tweak here… …put the original in first and you'll be able to diff against it… (optional) build.xml properties.xml build.xml

Create a file ${user.home}\${} to override project properties or a file ${user.home}\ to globally override properties Updating ${} from subversion

properties.xml # # Mantis # mantis.version=1.0.6 mantis.tar.gz=${lib.dir}/mantis-${mantis.version}.tar.gz

# # MantisConnect # mantisconnect.version=1.0a5${lib.dir}/MantisConnect-${mantisconnect.version}.zip

# # SvnAnt # svnant.version=1.1.0-RC2 svnant.dir=${lib.dir}/svnant-${svnant.version}/lib

It's All In The Game blog (c) 2005-16 by Jez Nicholson