Class ResolvePluginsMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugins.dependency.AbstractDependencyMojo
-
- org.apache.maven.plugins.dependency.resolvers.ResolvePluginsMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="resolve-plugins", defaultPhase=GENERATE_SOURCES, threadSafe=true) public class ResolvePluginsMojo extends AbstractDependencyMojoGoal that resolves all project plugins and reports and their dependencies.- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanappendOutputWhether to append outputs into the output file or overwrite it.protected java.util.List<java.lang.String>excludeArtifactIdsList of artifact IDs to exclude.protected java.util.List<java.lang.String>excludeGroupIdsList of group IDs to exclude.protected booleanexcludeReactorDon't resolve plugins that are in the current reactor.protected booleanexcludeTransitiveIf we should exclude transitive dependencies.protected java.util.List<java.lang.String>includeArtifactIdsList of artifact IDs to include.protected java.util.List<java.lang.String>includeGroupIdsList of group IDs to include.private booleanoutputAbsoluteArtifactFilenameOutput absolute filename for resolved artifacts.private java.lang.StringoutputEncodingThe encoding of the output file.protected java.io.FileoutputFileIf specified, this parameter causes the dependencies to be written to the path specified instead of the console.private ResolverUtilresolverUtil-
Fields inherited from class org.apache.maven.plugins.dependency.AbstractDependencyMojo
session
-
-
Constructor Summary
Constructors Constructor Description ResolvePluginsMojo(org.apache.maven.execution.MavenSession session, org.sonatype.plexus.build.incremental.BuildContext buildContext, org.apache.maven.project.MavenProject project, ResolverUtil resolverUtil)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoExecute()Main entry into mojo.private java.util.function.Predicate<org.apache.maven.model.Dependency>getDependencyFilter()private java.util.Set<org.apache.maven.model.Plugin>getProjectPlugins()This return plugin list of the project after applying the include/exclude filters.-
Methods inherited from class org.apache.maven.plugins.dependency.AbstractDependencyMojo
execute, getProject, isSilent, isSkip, setSilent, setSkip
-
-
-
-
Field Detail
-
outputFile
@Parameter(property="outputFile") protected java.io.File outputFile
If specified, this parameter causes the dependencies to be written to the path specified instead of the console.- Since:
- 2.0
-
excludeTransitive
@Parameter(property="excludeTransitive", defaultValue="false") protected boolean excludeTransitiveIf we should exclude transitive dependencies. This means only the plugin artifacts itself will be resolved not plugin dependencies.- Since:
- 2.0
-
excludeArtifactIds
@Parameter(property="excludeArtifactIds", defaultValue="") protected java.util.List<java.lang.String> excludeArtifactIdsList of artifact IDs to exclude.- Since:
- 2.0
-
includeArtifactIds
@Parameter(property="includeArtifactIds", defaultValue="") protected java.util.List<java.lang.String> includeArtifactIdsList of artifact IDs to include. Empty list indicates include everything (default).- Since:
- 2.0
-
excludeGroupIds
@Parameter(property="excludeGroupIds", defaultValue="") protected java.util.List<java.lang.String> excludeGroupIdsList of group IDs to exclude.- Since:
- 2.0
-
includeGroupIds
@Parameter(property="includeGroupIds", defaultValue="") protected java.util.List<java.lang.String> includeGroupIdsList of group IDs to include. Empty list indicates include everything (default).- Since:
- 2.0
-
appendOutput
@Parameter(property="appendOutput", defaultValue="false") protected boolean appendOutputWhether to append outputs into the output file or overwrite it.- Since:
- 2.2
-
excludeReactor
@Parameter(property="excludeReactor", defaultValue="true") protected boolean excludeReactorDon't resolve plugins that are in the current reactor.- Since:
- 2.7
-
outputEncoding
@Parameter(property="outputEncoding", defaultValue="${project.reporting.outputEncoding}") private java.lang.String outputEncodingThe encoding of the output file.- Since:
- 3.2.0
-
outputAbsoluteArtifactFilename
@Parameter(property="outputAbsoluteArtifactFilename", defaultValue="false") private boolean outputAbsoluteArtifactFilenameOutput absolute filename for resolved artifacts.- Since:
- 2.0
-
resolverUtil
private final ResolverUtil resolverUtil
-
-
Constructor Detail
-
ResolvePluginsMojo
@Inject public ResolvePluginsMojo(org.apache.maven.execution.MavenSession session, org.sonatype.plexus.build.incremental.BuildContext buildContext, org.apache.maven.project.MavenProject project, ResolverUtil resolverUtil)
-
-
Method Detail
-
doExecute
protected void doExecute() throws org.apache.maven.plugin.MojoExecutionExceptionMain entry into mojo. Gets the list of dependencies and iterates through displaying the resolved version.- Specified by:
doExecutein classAbstractDependencyMojo- Throws:
org.apache.maven.plugin.MojoExecutionException- with a message if an error occurs
-
getDependencyFilter
private java.util.function.Predicate<org.apache.maven.model.Dependency> getDependencyFilter()
-
getProjectPlugins
private java.util.Set<org.apache.maven.model.Plugin> getProjectPlugins()
This return plugin list of the project after applying the include/exclude filters.- Returns:
- set of project plugin
-
-