Maven fails to compile, while intelij goes fine...

hi..

i have a project which maven fails to compile with the error of not recognizing a method, while intelij has no problem with it.

BUT it gets weirder, the project which fails to compile is a fresh checkout from svn, i also have the same project which i checked out eariler ,which DOES compile even with maven, and it is up to date accordin to svn (did an update).

the compiler error only blows up with clean install .if i compile it once, it fails, and if i compile it the second time, without clean, it passes. however REBUILDING in intelij always works. so it's only maven which is at fault.

the code itself is rather simple i have:

interface FactoryType{
     public FactoryInfo getFactoryInfo()
}

enum CommType implements FactoryType{

}

public class Bulder {

     public void buildIt(CommType commType){
          commType.getFactoryInfo(); // this is where it fails
     }
}


i tried to compare everything i could think of, but that didn't help .

2 comments

Hi.

Just to make sure: is that Java? Not any other JVM-related language? I'm asking just because in Java even "public FactoryInfo getFactoryInfo()" without semicolon is an error.

For me the enumeration is not compiled in IDEA even after necessary corrections. To judge should the code be compilable or not you can call javac directly.

Please, try main menu / File / Invalidate Caches and restart, maybe it makes the case more clear.

Regards,
Alexander.

0

yes it is java, ( i didn't really made sure it compiled, it was just an example) it's also a jave problem, compounded by maven http://stackoverflow.com/questions/9505857/workaround-for-javac-compilation-order-bug-in-maven but didnt't appear in interlij.

0

Please sign in to leave a comment.