Last active
August 29, 2015 14:27
-
-
Save sebasjm/02993381111e759ab10c to your computer and use it in GitHub Desktop.
incremental javac with inotify & maven
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function log(){ | |
echo [status] $(date +%x-%X) $@ | |
} | |
log install | |
mvn clean install || exit 1 | |
log copy deps | |
mvn dependency:copy-dependencies || exit 1 | |
log ready | |
inotifywait $(find src/main/java -type f) -m -e close_write | while read file op; do | |
log compiling $file | |
$JAVA_HOME/bin/javac -g -cp target/classes/:target/dependency/* -d target/classes $file && log ok | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment