Package org.apache.maven.plugin.version
Class DefaultPluginVersionRequest
java.lang.Object
org.apache.maven.plugin.version.DefaultPluginVersionRequest
- All Implemented Interfaces:
- PluginVersionRequest
Collects settings required to resolve the version for a plugin.
- Since:
- 3.0
- Author:
- Benjamin Bentmann
- 
Constructor SummaryConstructorsConstructorDescriptionCreates an empty request.DefaultPluginVersionRequest(Plugin plugin, MavenSession session) Creates a request for the specified plugin by copying settings from the specified build session.DefaultPluginVersionRequest(Plugin plugin, org.eclipse.aether.RepositorySystemSession session, List<org.eclipse.aether.repository.RemoteRepository> repositories) Creates a request for the specified plugin using the given repository session and plugin repositories.
- 
Method SummaryModifier and TypeMethodDescriptionGets the artifact id of the plugin.Gets the group id of the plugin.getPom()Gets the POM whose build plugins are to be scanned for the version.List<org.eclipse.aether.repository.RemoteRepository>Gets the remote repositories to use.org.eclipse.aether.RepositorySystemSessionGets the session to use for repository access.setArtifactId(String artifactId) Sets the artifact id of the plugin.setGroupId(String groupId) Sets the group id of the plugin.Sets the POM whose build plugins are to be scanned for the version.setRepositories(List<org.eclipse.aether.repository.RemoteRepository> repositories) Sets the remote repositories to use.setRepositorySession(org.eclipse.aether.RepositorySystemSession session) Sets the session to use for repository access.
- 
Constructor Details- 
DefaultPluginVersionRequestpublic DefaultPluginVersionRequest()Creates an empty request.
- 
DefaultPluginVersionRequestCreates a request for the specified plugin by copying settings from the specified build session. If the session has a current project, its plugin repositories will be used as well.- Parameters:
- plugin- The plugin for which to resolve a version, must not be- null.
- session- The Maven session to use, must not be- null.
 
- 
DefaultPluginVersionRequestpublic DefaultPluginVersionRequest(Plugin plugin, org.eclipse.aether.RepositorySystemSession session, List<org.eclipse.aether.repository.RemoteRepository> repositories) Creates a request for the specified plugin using the given repository session and plugin repositories.- Parameters:
- plugin- The plugin for which to resolve a version, must not be- null.
- session- The repository session to use, must not be- null.
- repositories- The plugin repositories to query, may be- null.
 
 
- 
- 
Method Details- 
getGroupIdDescription copied from interface:PluginVersionRequestGets the group id of the plugin.- Specified by:
- getGroupIdin interface- PluginVersionRequest
- Returns:
- The group id of the plugin.
 
- 
setGroupIdDescription copied from interface:PluginVersionRequestSets the group id of the plugin.- Specified by:
- setGroupIdin interface- PluginVersionRequest
- Parameters:
- groupId- The group id of the plugin.
- Returns:
- This request, never null.
 
- 
getArtifactIdDescription copied from interface:PluginVersionRequestGets the artifact id of the plugin.- Specified by:
- getArtifactIdin interface- PluginVersionRequest
- Returns:
- The artifact id of the plugin.
 
- 
setArtifactIdDescription copied from interface:PluginVersionRequestSets the artifact id of the plugin.- Specified by:
- setArtifactIdin interface- PluginVersionRequest
- Parameters:
- artifactId- The artifact id of the plugin.
- Returns:
- This request, never null.
 
- 
getPomDescription copied from interface:PluginVersionRequestGets the POM whose build plugins are to be scanned for the version.- Specified by:
- getPomin interface- PluginVersionRequest
- Returns:
- The POM whose build plugins are to be scanned for the version or nullto only search the plugin repositories.
 
- 
setPomDescription copied from interface:PluginVersionRequestSets the POM whose build plugins are to be scanned for the version.- Specified by:
- setPomin interface- PluginVersionRequest
- Parameters:
- pom- The POM whose build plugins are to be scanned for the version, may be- nullto only search the plugin repositories.
- Returns:
- This request, never null.
 
- 
getRepositoriesDescription copied from interface:PluginVersionRequestGets the remote repositories to use.- Specified by:
- getRepositoriesin interface- PluginVersionRequest
- Returns:
- The remote repositories to use, never null.
 
- 
setRepositoriespublic DefaultPluginVersionRequest setRepositories(List<org.eclipse.aether.repository.RemoteRepository> repositories) Description copied from interface:PluginVersionRequestSets the remote repositories to use. Note: When creating a request from a project, be sure to use the plugin repositories and not the regular project repositories.- Specified by:
- setRepositoriesin interface- PluginVersionRequest
- Parameters:
- repositories- The remote repositories to use.
- Returns:
- This request, never null.
 
- 
getRepositorySessionpublic org.eclipse.aether.RepositorySystemSession getRepositorySession()Description copied from interface:PluginVersionRequestGets the session to use for repository access.- Specified by:
- getRepositorySessionin interface- PluginVersionRequest
- Returns:
- The repository session or nullif not set.
 
- 
setRepositorySessionpublic DefaultPluginVersionRequest setRepositorySession(org.eclipse.aether.RepositorySystemSession session) Description copied from interface:PluginVersionRequestSets the session to use for repository access.- Specified by:
- setRepositorySessionin interface- PluginVersionRequest
- Parameters:
- session- The repository session to use.
- Returns:
- This request, never null.
 
 
-