ant junit task and @NotNull

Hi, all.

I used junit4, ant and the annotation @NotNull. When I run tests into IDEA, then my tests is ok. But if I run the ant "junit" task, then the same test fail.

Code :
public void testCheckNullAnnotation() {
String test = null;

try {
setNoNull(test);"Fail ");
} catch (Exception e) {

private void setNoNull(@NotNull String in){

build.xml :


Anybody help me ?


Please sign in to leave a comment.