hello, i'm trying to create maven plugin and was w...
# build-tools
d
hello, i'm trying to create maven plugin and was wondering whether it is possible to configure mojo to ensure it runs after compilation without parallel lifecycle, e.g. if i do the following
Copy code
@Mojo(name = "myMojo", defaultPhase = LifecyclePhase.PROCESS_CLASSES)
@Execute(phase = LifecyclePhase.COMPILE)
class MyCustomMojo : AbstractMojo() { ... }
it will always run
myMojo
goal after compilation but it will also spawn parallel lifecycle. In the above I end up running
compile
twice if I configure plugin in the
pom.xml
to be executed during the build process. What I would like to do is to execute compile only if the sources need to be compiled. Based on the docs I don't think it is possible in Maven?