Package org.codehaus.mojo.versions
Class UpdatePropertiesMojoBase
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
org.codehaus.mojo.versions.AbstractVersionsDependencyUpdaterMojo
org.codehaus.mojo.versions.UpdatePropertiesMojoBase
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
UpdatePropertiesMojo,UpdatePropertyMojo
Common base class for
UpdatePropertiesMojo
and UpdatePropertyMojo-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanIf a property points to a version like1.2.3and your repository contains versions like1.2.3and1.1.0without settings this totruethe property will never being changed back to1.1.0by using-DnewVersion=[1.1.0].protected booleanWhether to allow the incremental version number to be changed.protected booleanWhether to allow the major version number to be changed.protected booleanWhether to allow the minor version number to be changed.protected booleanWhether properties linking versions should be auto-detected or not.protected booleanWhether to include parent POMs in the search.Fields inherited from class org.codehaus.mojo.versions.AbstractVersionsDependencyUpdaterMojo
SNAPSHOT_REGEXFields inherited from class org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
allowSnapshots, artifactHandlerManager, generateBackupPoms, ignoredVersions, project, reactorProjects, repositorySystem, ruleSet, session, wagonMapFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
ConstructorsConstructorDescriptionUpdatePropertiesMojoBase(org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager, org.eclipse.aether.RepositorySystem repositorySystem, Map<String, org.apache.maven.wagon.Wagon> wagonMap, Map<String, ChangeRecorder> changeRecorders) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidupdate(MutableXMLStreamReader pom, Map<Property, PropertyVersions> propertyVersions) Methods inherited from class org.codehaus.mojo.versions.AbstractVersionsDependencyUpdaterMojo
findArtifact, getParentDependency, hasIncludes, isExcludeReactor, isHandledByProperty, isIncluded, isProcessingDependencies, isProcessingDependencyManagement, isProcessingParent, isProducedByReactor, separatePatterns, toArtifact, toArtifact, toString, toString, updateDependencyVersionMethods inherited from class org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo
execute, findLatestVersion, getChangeRecorder, getHelper, getProject, getVersion, process, saveChangeRecorderResults, setProject, shouldApplyUpdate, shouldApplyUpdate, update, updatePropertyToNewestVersion, validateInputMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
autoLinkItems
@Parameter(property="autoLinkItems", defaultValue="true") protected boolean autoLinkItemsWhether properties linking versions should be auto-detected or not.- Since:
- 1.0-alpha-2
-
allowDowngrade
@Parameter(property="allowDowngrade", defaultValue="false") protected boolean allowDowngradeIf a property points to a version like1.2.3and your repository contains versions like1.2.3and1.1.0without settings this totruethe property will never being changed back to1.1.0by using-DnewVersion=[1.1.0].- Since:
- 3.0.0
-
allowMajorUpdates
@Parameter(property="allowMajorUpdates", defaultValue="true") protected boolean allowMajorUpdatesWhether to allow the major version number to be changed.- Since:
- 2.4
-
allowMinorUpdates
@Parameter(property="allowMinorUpdates", defaultValue="true") protected boolean allowMinorUpdatesWhether to allow the minor version number to be changed.
Note:
falsealso implies allowMajorUpdatesfalse- Since:
- 2.4
-
allowIncrementalUpdates
@Parameter(property="allowIncrementalUpdates", defaultValue="true") protected boolean allowIncrementalUpdatesWhether to allow the incremental version number to be changed.
Note:
falsealso implies allowMajorUpdates and allowMinorUpdatesfalse- Since:
- 2.4
-
includeParent
@Parameter(property="includeParent", defaultValue="true") protected boolean includeParentWhether to include parent POMs in the search. Default:
trueSetting this to
falsecan speed up execution, but will not resolve property-bound dependencies, defined in parent POMs.- Since:
- 2.14.0
-
-
Constructor Details
-
UpdatePropertiesMojoBase
public UpdatePropertiesMojoBase(org.apache.maven.artifact.handler.manager.ArtifactHandlerManager artifactHandlerManager, org.eclipse.aether.RepositorySystem repositorySystem, Map<String, org.apache.maven.wagon.Wagon> wagonMap, Map<String, ChangeRecorder> changeRecorders)
-
-
Method Details
-
update
protected void update(MutableXMLStreamReader pom, Map<Property, PropertyVersions> propertyVersions) throws XMLStreamException- Throws:
XMLStreamException
-