SVN pre-commit hook for java code compilation

163 Views Asked by At

This sounds to me difficult but ensuring, if it is possible to add server or local svn pre-commit hook to prevent if there are any java code compilations. Usually when there is a requirement to merge bulk of java files from higher version to lower version, and if we do not have working local lower env setup, then this mechanism will help to save time setting up the local env.

  • Just thinking a solution - If I have a running QA AIX box of lower env, that I can utilize for code compilation while doing the checkins, in the hook I can add command as javac -classpath <AIX path>:$CLASSPATH:<corresponding jar> -d . filename.java, where filename.java will be passed as parameter. Along with connection credentials so that I can first connect to AIX before to compile. Is this approach possible, if yes how to add such conditions in hook. Or is there any thing already available that I am not aware of ?
0

There are 0 best solutions below