@Mojo(name="update-parent",
threadSafe=true)
public class UpdateParentMojo
extends AbstractVersionsUpdaterMojo
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
allowDowngrade
Whether to downgrade a snapshot dependency if
allowSnapshots is false
and there exists a version within the range fulfilling the criteria. |
protected boolean |
allowIncrementalUpdates
Whether to allow the incremental version number to be changed.
|
protected boolean |
allowMajorUpdates
Whether to allow the major version number to be changed.
|
protected boolean |
allowMinorUpdates
Whether to allow the minor version number to be changed.
|
protected boolean |
forceUpdate
to update parent version by force when it is RELEASE or LATEST
|
protected String |
parentVersion
If
skipResolution is not set, specifies the bottom version considered
for target version resolution. |
protected boolean |
skipResolution
Skips version resolution, only valid if
parentVersion is set. |
allowSnapshots, artifactMetadataSource, artifactResolver, ignoredVersions, localRepository, project, projectBuilder, reactorProjects, remoteArtifactRepositories, remotePluginRepositories, repositorySystem, ruleSet, session, settings| Constructor and Description |
|---|
UpdateParentMojo(org.apache.maven.repository.RepositorySystem repositorySystem,
org.apache.maven.project.MavenProjectBuilder projectBuilder,
org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource,
org.apache.maven.artifact.manager.WagonManager wagonManager,
org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.maven.artifact.versioning.ArtifactVersion |
resolveTargetVersion(String initialVersion) |
protected void |
update(ModifiedPomXMLEventReader pom)
Updates the pom.
|
execute, findLatestVersion, getChangeRecorder, getHelper, getProject, getPropertyValue, getVersion, newModifiedPomXER, process, saveChangeRecorderResults, setProject, shouldApplyUpdate, shouldApplyUpdate, updatePropertyToNewestVersion, writeFile@Parameter(property="parentVersion") protected String parentVersion
If skipResolution is not set, specifies the bottom version considered
for target version resolution. If it is a version range, the resolved version will be
restricted by that range.
If skipResolution is true, will specify the target version to which
the parent artifact will be updated.
@Parameter(property="forceUpdate",
defaultValue="false")
protected boolean forceUpdate
@Parameter(property="skipResolution",
defaultValue="false")
protected boolean skipResolution
parentVersion is set.
Will effectively set the new parent version to the one from parentVersion@Parameter(property="allowDowngrade",
defaultValue="false")
protected boolean allowDowngrade
Whether to downgrade a snapshot dependency if allowSnapshots is false
and there exists a version within the range fulfilling the criteria.
Default false
@Parameter(property="allowMajorUpdates",
defaultValue="true")
protected boolean allowMajorUpdates
@Parameter(property="allowMinorUpdates",
defaultValue="true")
protected boolean allowMinorUpdates
Whether to allow the minor version number to be changed.
Note: false also implies allowMajorUpdates false
@Parameter(property="allowIncrementalUpdates",
defaultValue="true")
protected boolean allowIncrementalUpdates
Whether to allow the incremental version number to be changed.
Note: false also implies allowMajorUpdates
and allowMinorUpdates false
@Inject
public UpdateParentMojo(org.apache.maven.repository.RepositorySystem repositorySystem,
org.apache.maven.project.MavenProjectBuilder projectBuilder,
org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource,
org.apache.maven.artifact.manager.WagonManager wagonManager,
org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver)
protected void update(ModifiedPomXMLEventReader pom) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException, XMLStreamException
AbstractVersionsUpdaterMojoupdate in class AbstractVersionsUpdaterMojopom - the pom to update.org.apache.maven.plugin.MojoExecutionException - when things go wrongorg.apache.maven.plugin.MojoFailureException - when things go wrong in a very bad wayXMLStreamException - when things go wrong with XML streamingAbstractVersionsUpdaterMojo.update(ModifiedPomXMLEventReader)protected org.apache.maven.artifact.versioning.ArtifactVersion resolveTargetVersion(String initialVersion) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException, org.apache.maven.artifact.versioning.InvalidVersionSpecificationException, InvalidSegmentException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.artifact.metadata.ArtifactMetadataRetrievalExceptionorg.apache.maven.artifact.versioning.InvalidVersionSpecificationExceptionInvalidSegmentExceptionCopyright © 2008–2022 MojoHaus. All rights reserved.