[ http://jira.codehaus.org/browse/MNG-5017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Patrick Floyd updated MNG-5017: ------------------------------------ Attachment: VersionSchemePatch.txt This patch provides the functionality I am requesting. I verified that the current Maven 3.0.3 code base works as expected with this patch. However, I have used maven-core/META-INF/plexus/components.xml to register org.sonatype.aether.util.version.GenericVersionScheme . This is probably a bad place, it should be done in aether-util but I didn't want to create patches for more than one code base. > Register VersionScheme as Plexus Component > ------------------------------------------ > > Key: MNG-5017 > URL: http://jira.codehaus.org/browse/MNG-5017 > Project: Maven 2 & 3 > Issue Type: Wish > Components: Artifacts and Repositories > Affects Versions: 3.0.2 > Reporter: Sean Patrick Floyd > Priority: Minor > Attachments: VersionSchemePatch.txt > > > 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 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira