Details
-
Type:
Wish
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 3.0.2
-
Fix Version/s: None
-
Component/s: Artifacts and Repositories
-
Labels:None
-
Complexity:Intermediate
-
Number of attachments :
Description
I would like to implement custom VersionConstraints, and have thought of creating a subclass of GenericVersionScheme to achieve that. However, I had to realize that GenericVersionScheme is instantiated via new GenericVersionScheme() instead of dependency injection.
Please register GenericVersionScheme as a Plexus Component with the role org.sonatype.aether.version.VersionScheme, and use the injected version, that way I can write extensions that provide a wrapped version.
Here are the affected instantiations that I could find:
GenericVersionScheme() - org.sonatype.aether.util.version.GenericVersionScheme
isMavenVersion(String) : boolean - org.apache.maven.rtinfo.internal.DefaultRuntimeInformation
MytoysGenericVersionScheme - de.mytoys.maven.version.resolver
resolveVersionRange(RepositorySystemSession, VersionRangeRequest) : VersionRangeResult - org.apache.maven.repository.internal.DefaultVersionRangeResolver
selectVersion(DefaultPluginVersionResult, PluginVersionRequest, Versions) : void - org.apache.maven.plugin.version.internal.DefaultPluginVersionResolver
You might want to describe your specific use case and needs some more as otherwise the big picture and component interactions aren't clear.