Package io.github.mfoo.libyear
Class LibYearMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- io.github.mfoo.libyear.LibYearMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="analyze", defaultPhase=VERIFY) public class LibYearMojo extends org.apache.maven.plugin.AbstractMojoAnalyze dependencies and calculate how old they are.
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<String>ignoredVersionsprotected booleanprocessDependenciesWhether to consider the dependencies pom section.
-
Constructor Summary
Constructors Constructor Description LibYearMojo(org.apache.maven.repository.RepositorySystem repositorySystem, org.eclipse.aether.RepositorySystem aetherRepositorySystem)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()Main entry point for the plugin.protected voidsetFetchRetryCount(int count)Setter for the HTTP API fetch retry countprotected voidsetHttpTimeout(int seconds)Setter for the HTTP timeout for API callsprotected voidsetProject(org.apache.maven.project.MavenProject project)Setter for property 'project'.protected voidsetSearchUri(String uri)Set the search URIprotected voidsetSession(org.apache.maven.execution.MavenSession session)Setter for property 'session'.
-
-
-
Field Detail
-
ignoredVersions
@Parameter(property="maven.version.ignore", readonly=true) protected Set<String> ignoredVersions
-
processDependencies
@Parameter(property="processDependencies", defaultValue="true") protected boolean processDependenciesWhether to consider the dependencies pom section. If this is set to false the plugin won't analyze dependencies, but it might analyze e.g. plugins depending on configuration.- Since:
- 1.0.
-
-
Method Detail
-
setProject
protected void setProject(org.apache.maven.project.MavenProject project)
Setter for property 'project'.- Parameters:
project- Value to set for property 'project'.
-
setSession
protected void setSession(org.apache.maven.execution.MavenSession session)
Setter for property 'session'.- Parameters:
session- Value to set for property 'session'.
-
setSearchUri
protected void setSearchUri(String uri)
Set the search URI
-
setHttpTimeout
protected void setHttpTimeout(int seconds)
Setter for the HTTP timeout for API calls
-
setFetchRetryCount
protected void setFetchRetryCount(int count)
Setter for the HTTP API fetch retry count- Parameters:
count- the number of retries before giving up
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionExceptionMain entry point for the plugin.- Throws:
org.apache.maven.plugin.MojoExecutionException- On failure, such as upstream HTTP issues
-
-