ci.maven
ci.maven copied to clipboard
Dev mode should run plugins bound to a "phase" rather than a "goal"
Rather than dev mode calling the maven-compiler-plugin
directly on startup, it should call all plugins associated with the compile
phase.
For example, users can specify an additional source directory with the build-helper-maven-plugin
:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/java2</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
Running mvn compile
will compile any files in the second source directory, but liberty:dev
will not. Dev mode should pick up the build-helper-maven-plugin
and any other plugins bound to specific phases.
That's interesting.. it could turn into a whole feature depending on how it's scoped.
E.g. do we mean goals bound to compile
phase specifically or up to compile
phase in the lifecycle? Why compile
phase and not test-compile
? Why not go all the way to post-integration-test
phase? Would this be configurable via liberty-maven-plugin config?
I suppose we will have to think about the scope a bit more. I included the compile
phase as an example, perhaps we will have to investigate further and decide which phases make the most sense to support.
cc: @ericglau
I would love to see this supported, preferably with a configurable maven life cycle phase. My current use case is with code generated for jaxws/xmlws services.