maven - How can I get Eclipse to re-compile my JUnit test when I make a change to it? -


i'm using eclipse juno on mac 10.7.5, java 6, junit 4.8.1, , maven 3.0.3. have imported maven project eclipse having trouble getting junit test compilations refresh. when edit junit test in editor, save it, right click on test , select "run as" -> "junit test," eclipse doesn't appear recompiling test, rather using original class file in target/test-classes directory. when compile on command line using "mvn clean test-compile," updated class appears correctly in target/test-classes directory.

so question is, how can eclipse compile test , place in target/test-classes directory? have verified in project settings under "source," have myproject/src/test/java output folder myproject/target/test-classes included (all) , excluded (none).

  • dave

this strange. junit tests treated other java file , should recompiled on save. first, make sure project -> build automatically enabled.

if yes, go file system, delete class file test , make whitespace change file inside ide. file regenerated? guess is.

if not, take @ error log , paste relevant errors here.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -