@Mojo(name="set-version",
aggregator=true,
requiresDirectInvocation=true)
public class SetMojo
extends org.apache.maven.plugin.AbstractMojo
Sets the version of the current project and child projects with the same version, and updates references as necessary.
The set-version goal implements a version refactoring for a Tycho reactor: When updating the version of a project, it consistently updates the version strings in the project's configuration files (e.g. pom.xml and META-INF/MANIFEST.MF) and all references to that project (e.g. in a feature.xml).
In many cases, the set-version goal changes the version of multiple projects or entities at once. In addition to the current project, child projects with the same version are also changed. The set of version changes is determined according to the following rules:
Modifier and Type | Field and Description |
---|---|
protected org.apache.maven.execution.MavenSession |
session |
Constructor and Description |
---|
SetMojo() |
Modifier and Type | Method and Description |
---|---|
void |
execute() |
protected <T> T |
lookup(Class<T> clazz) |
protected ProjectMetadataReader |
newProjectMetadataReader() |
@Parameter(property="session", readonly=true) protected org.apache.maven.execution.MavenSession session
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected <T> T lookup(Class<T> clazz) throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
protected ProjectMetadataReader newProjectMetadataReader() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
Copyright © 2008-2015 Eclipse Foundation. All Rights Reserved.