Closed cschwier closed 5 years ago
I just realised this is a limitation of mavens lifecycle handling since it does not skip phases. The compilation step is skipped by javac
not maven's compiler plugin. There's very little one can do about it.
The correct way to realize above usecase is by passing skip flags for all plugins one does not want to have executed in the 2nd case (-Dse.eris.notnull.instrument=false
for the instrumenter) or run mvn clean verify
instead.
I have actually been thinking about a way to detect of classes have been instrumented by us, but I haven't figured out a good way to do it...
When building with maven and running the two commands in succession instrumentation will happen twice.
For the first command the instrumentation goal is run after compilation. For the second command the instrumentation is run again although the compilation step was skipped with the message
This is not a semantic bug since a null check will either fail on the first or pass two times but is probably unintended since it just bloats the binary.
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T20:49:05+01:00) notnull-instrumenter-maven-plugin 0.6.8 Java Oracle JDK 11.0.1 Windows 10