Package io.helidon.build.devloop.maven
Class MavenGoalReferenceResolver
java.lang.Object
io.helidon.build.devloop.maven.MavenGoalReferenceResolver
Utility to map a Maven goal reference to a
References may be fully qualified:
A plugin prefix may be used as an alias for the
MavenGoal. References are resolved in the context of the specified project.
References may be fully qualified:
${groupId}:${artifactId}:${version}:${goal}@${executionId}
The version will be ignored since it can only be resolved to the plugin configured in the current project. If not provided,
a default executionId will be used. For
example, with the compile goal the default execution id is default-compile.
A plugin prefix may be used as an alias for the
groupId and artifactId, for example compiler in the following reference:
compiler:compile
Finally, any lifecycle phase (e.g. process-resources) may be used as a reference, and will expand to the corresponding
list of goals.
Example References
org.apache.maven.plugins:maven-exec-plugin:3.0.0:exec@compile-sassorg.apache.maven.plugins:maven-exec-plugin:exec@compile-sassexec:exec@compile-sasscompiler:compilecompile
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MavenGoalReferenceResolver
Constructor.- Parameters:
environment- The Maven environment.
-
-
Method Details
-
resolve
Resolve a list of references.- Parameters:
references- The references.goals- The goals list to append to.- Returns:
- The goals list.
- Throws:
Exception- If an error occurs.
-
resolve
Resolve a reference.- Parameters:
reference- The reference.goals- The goals list to append to.- Returns:
- The goals list.
- Throws:
Exception- If an error occurs.
-
assertValidPhase
Asserts that the given phase is valid.- Parameters:
phase- The phase.- Throws:
Exception- If not a valid phase.
-