SVN post-commit hook for Windows and Linux

For demonstration purposes I have rewritten a post-commit hook (which was originally developed for Linux) for Windows.

post-commit (Linux version)

#!/bin/sh
# POST-COMMIT HOOK
# The post-commit hook is invoked after a commit.
#
#   [1] REPOS-PATH   (the path to this repository)
#   [2] REV          (the number of the revision just committed)
#
REPOS="$1"
REV="$2"
 
echo $REPOS $REV >> /tmp/test.txt

post-commit.bat (Windows version)

@echo off
:: POST-COMMIT HOOK
:: The post-commit hook is invoked after a commit.
::
::  [1] REPOS-PATH   (the path to this repository)
::  [2] REV          (the number of the revision just committed)
::
@echo off  
 
set REPOS=%1
set REV=%2   
 
echo %REPOS% %REV% > C:/Temp/test.txt

Beispiel für Apache Ant Build Script

In letzter Zeit habe ich viel mit Apache Ant Build-Skripten zu tun. Bei richtiger Konfigurationen bringt Apache Ant einen erheblichen Vorteil bei der Erstellung von Java-Projekten, unabhängig von Betriebssystem und IDE. Um Anfängern den Einstieg in Ant zu erleichtern, habe ich eine Vorlage für eine build.xml mitsamt build.properties erstellt, die beliebig erweitert werden kann.

In NetBeans kann man mit einem Java Free-Form Project das eigene Build-Skript benutzen.
Beispiel für Apache Ant Build Script weiterlesen