Run mvn compile whenever a Java file changes in a particular directory. brew install watchman watchman-make --make mvn -p 'src/main/java/**/*.java' -t compile