Hi, you should use mvn clean test to make sure compilation happens everytime. Otherwise, you can check recent versions of maven-compiler-plugin (3.1) which introduced some incremental compilation support [1].
And yes, mvn compile will only compile main source code, you should check the lifecycle reference [2] [1] http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#useIncrementalCompilation [2] http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference Vincent 2013/11/19 Andrew Pennebaker <[email protected]> > I was refactoring some code, when I noticed unit test errors to do with > missing methods, as I had forgotten to also refactor my unit tests. These > sorts of errors should have been caught at compile time, but `mvn test` was > blissfully running the tests anyway. > > How can I force `mvn compile` to compile src/test/java/**.java files as > well? > > -- > Cheers, > > Andrew Pennebaker > [email protected] >
