java - Missing Annotation Processor with -XDdev leads to successful build without building class files -
i running curious problem today , more info on that, google-fu proved insufficient that.
what happened
the scenario follows: have straightforward netbeans project, contains .java file makes use of annotations, handled netbeans annotation processor (org.openide.filesystems.annotations.layergeneratingprocessor precise) create .xml file during compilation.
all of worked fine until today, when accidentally forgot add dependency annotation processor new project (i.e. core/org-openide-filesystems.jar). without dependency being present witnessed strangest behavior: build (via netbeans directly via ant on commandline) report successful, yet no .class files generated @ all.
what threw me off build call come success. not single warning or other indicator amiss.. no classes generated , tiny little .jar file contained bundle.properties files, again no .class files.
the workaround
so scenario itself. after while came find out javac option lead compiler tell me went wrong: -xddev. have never seen option before , googling find these kind of options referred hidden options. haven't found listing of hidden options available , they're for. reference on appreciated.
anyways, adding option compile, actual javac call spit out large stacktrace boils down classnotfoundexception layergeneratorprocessor class. lo , behold, once added dependency class project builds fine again.
the remaining problem
what funny (as in scary) despite exception being printed stderr , indicating annotation processing failed, overall javac call succeeds! still comes build successful , acts if fine. without -xddev option, 1 not have indication @ output went wrong.
finally, actual question: there way turn behavior proper error? while -xddev fine find out problem, requires @ build output, in ci context not feasible. protect others , myself accidentally forgetting dependency in future somehow switching behavior proper build error such notified ci system in cases.
Comments
Post a Comment