Class ListClassesMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugins.dependency.ListClassesMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="list-classes", requiresProject=false, threadSafe=true) public class ListClassesMojo extends org.apache.maven.plugin.AbstractMojoRetrieves and lists all classes contained in the specified artifact from the specified remote repositories.- Since:
- 3.1.3
-
-
Field Summary
Fields Modifier and Type Field Description private ParamArtifactparamArtifactprivate java.util.List<java.lang.String>remoteRepositoriesRepositories in the formatid::[layout::]urlor just URLs.private ResolverUtilresolverUtilprivate booleanskipSkip plugin execution completely.private booleantransitiveDownload transitively, retrieving the specified artifact and all of its dependencies.
-
Constructor Summary
Constructors Constructor Description ListClassesMojo(ResolverUtil resolverUtil)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()private voidprintClassesFromArtifactResult(java.io.File file)voidsetArtifact(java.lang.String artifact)A string of the formgroupId:artifactId:version[:packaging[:classifier]].voidsetArtifactId(java.lang.String artifactId)The artifact ID of the artifact to download.voidsetClassifier(java.lang.String classifier)The classifier of the artifact to download.voidsetGroupId(java.lang.String groupId)The group ID of the artifact to download.voidsetPackaging(java.lang.String packaging)The packaging of the artifact to download.voidsetVersion(java.lang.String version)The version of the artifact to download.
-
-
-
Field Detail
-
resolverUtil
private final ResolverUtil resolverUtil
-
paramArtifact
private ParamArtifact paramArtifact
-
remoteRepositories
@Parameter(property="remoteRepositories") private java.util.List<java.lang.String> remoteRepositories
Repositories in the formatid::[layout::]urlor just URLs. That is,central::default::https://repo.maven.apache.org/maven2,myrepo::https://repo.acme.com,https://repo.acme2.com- Since:
- 3.1.3
-
transitive
@Parameter(property="transitive", defaultValue="false") private boolean transitiveDownload transitively, retrieving the specified artifact and all of its dependencies.- Since:
- 3.1.3
-
skip
@Parameter(property="mdep.skip", defaultValue="false") private boolean skipSkip plugin execution completely.- Since:
- 3.6.0
-
-
Constructor Detail
-
ListClassesMojo
@Inject public ListClassesMojo(ResolverUtil resolverUtil)
-
-
Method Detail
-
setGroupId
@Parameter(property="groupId") public void setGroupId(java.lang.String groupId)
The group ID of the artifact to download. Ignored ifartifactis used.- Since:
- 3.1.3
-
setArtifactId
@Parameter(property="artifactId") public void setArtifactId(java.lang.String artifactId)
The artifact ID of the artifact to download. Ignored ifartifactis used.- Since:
- 3.1.3
-
setVersion
@Parameter(property="version") public void setVersion(java.lang.String version)
The version of the artifact to download. Ignored ifartifactis used.- Since:
- 3.1.3
-
setClassifier
@Parameter(property="classifier") public void setClassifier(java.lang.String classifier)
The classifier of the artifact to download. Ignored ifartifactis used.- Since:
- 3.1.3
-
setPackaging
@Parameter(property="packaging", defaultValue="jar") public void setPackaging(java.lang.String packaging)The packaging of the artifact to download. Ignored ifartifactis used.- Since:
- 3.1.3
-
setArtifact
@Parameter(property="artifact") public void setArtifact(java.lang.String artifact)
A string of the formgroupId:artifactId:version[:packaging[:classifier]].- Since:
- 3.1.3
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
printClassesFromArtifactResult
private void printClassesFromArtifactResult(java.io.File file) throws java.io.IOException- Throws:
java.io.IOException
-
-