Java Code Examples for org.apache.maven.execution.MavenExecutionRequest#setGoals()
The following examples show how to use
org.apache.maven.execution.MavenExecutionRequest#setGoals() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MavenExecutionUtils.java From vertx-maven-plugin with Apache License 2.0 | 5 votes |
private static MavenExecutionRequest getMavenExecutionRequest(MavenSession session, String phase) { MavenExecutionRequest request = DefaultMavenExecutionRequest.copy(session.getRequest()); request.setStartTime(session.getStartTime()); request.setExecutionListener(null); request.setGoals(ImmutableList.of(phase)); return request; }
Example 2
Source File: MavenExecutionUtils.java From vertx-maven-plugin with Apache License 2.0 | 5 votes |
private static MavenExecutionRequest getMavenExecutionRequest(MavenSession session, String phase) { MavenExecutionRequest request = DefaultMavenExecutionRequest.copy(session.getRequest()); request.setStartTime(session.getStartTime()); request.setExecutionListener(null); request.setGoals(ImmutableList.of(phase)); return request; }
Example 3
Source File: RunMojo.java From wisdom with Apache License 2.0 | 5 votes |
private MavenExecutionRequest getMavenExecutionRequest() { MavenExecutionRequest request = DefaultMavenExecutionRequest.copy(session.getRequest()); request.setStartTime(session.getStartTime()); request.setExecutionListener(null); if (! initialBuild && session.getGoals().contains("clean")) { // Here the package phase is required to restore the runtime environment request.setGoals(ImmutableList.of("clean", "package", "wisdom:internal-run")); } else { // It is safer to re-execute the package phase to have the new classes... request.setGoals(ImmutableList.of("package", "wisdom:internal-run")); } return request; }