public class MajorMinorIncrementalFilter extends Object
allowMajorUpdates=false and allowMinorUpdates=true. An given artifact
groupId:artifactId:2.0.8 and a repository which contains the following versions of this artifact:
AbstractVersionDetails.getNewerVersions(String, int, boolean) will use an upper version of
2.1.0 to limit the versions to use. The result of this would be using 2.1.0-M1 which
contradicts the wish of the user of not updating the minor version. The root cause of this is the comparison of Maven
versions which will defined 2.1.0-M1 as less than 2.1.0. The method
filter(ArtifactVersion, ArtifactVersion[]) will filter out those versions which violate the configuration
allowMajorUpdates, allowMinorUpdates allowIncrementalUpdates.| Constructor and Description |
|---|
MajorMinorIncrementalFilter(boolean allowMajorUpdates,
boolean allowMinorUpdates,
boolean allowIncrementalUpdates) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.maven.artifact.versioning.ArtifactVersion[] |
filter(org.apache.maven.artifact.versioning.ArtifactVersion selectedVersion,
org.apache.maven.artifact.versioning.ArtifactVersion[] newerVersions) |
public MajorMinorIncrementalFilter(boolean allowMajorUpdates,
boolean allowMinorUpdates,
boolean allowIncrementalUpdates)
public org.apache.maven.artifact.versioning.ArtifactVersion[] filter(org.apache.maven.artifact.versioning.ArtifactVersion selectedVersion,
org.apache.maven.artifact.versioning.ArtifactVersion[] newerVersions)
selectedVersion - The version which will be checked.newerVersions - The list of identified versions which are greater or equal than the selectedVersion.allowMajorUpdates, allowMinorUpdates,
allowIncrementalUpdates.Copyright © 2008–2018 MojoHaus. All rights reserved.