@Mojo(name="check-auto-container",
defaultPhase=VALIDATE,
requiresProject=true,
requiresOnline=true,
requiresDependencyResolution=RUNTIME)
public class CheckAutoContainerPlugin
extends AbstractPlugin
Plugin.InitState, Plugin.Packaging| Modifier and Type | Field and Description |
|---|---|
protected boolean |
addMavenCentral
A flag to add the maven central repository https://repo1.maven.org/maven2
to
repositories. |
protected org.apache.maven.artifact.repository.ArtifactRepositoryFactory |
artifactRepositoryFactory
Artifact repository factory component.
|
protected org.apache.maven.artifact.resolver.ArtifactResolver |
artifactResolver
Wagon manager component.
|
protected boolean |
failIfNotSafe
A flag to fail if project is not auto container.
|
static String |
MAVEN_CENTRAL_ID |
static String |
MAVEN_CENTRAL_URL |
protected org.apache.maven.project.MavenProject |
project
Project.
|
protected org.apache.maven.settings.Proxy |
proxy
Active proxy from settings (if any).
|
protected List<?> |
reactorProjects
The projects in reactor (used to detected sibling dependencies).
|
protected Map<String,String> |
repositories
Map of repositories to use.
|
protected boolean |
runOnce
A flag to execute only once the mojo.
|
protected boolean |
runOnlyOnRoot
A flag to restrict only to run on root module.
|
protected boolean |
skipCheckAutocontainer
A flag to skip the goal.
|
protected boolean |
verbose
A flag to activate verbose mode.
|
| Constructor and Description |
|---|
CheckAutoContainerPlugin() |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.maven.artifact.Artifact |
acceptArtifact(org.apache.maven.artifact.Artifact a,
List<String> siblings) |
protected boolean |
checkSkip() |
protected List<org.apache.maven.artifact.repository.ArtifactRepository> |
createSafeRepositories() |
protected void |
doAction() |
protected String |
getArtifactId(org.apache.maven.artifact.Artifact artifact) |
org.apache.maven.project.MavenProject |
getProject() |
protected org.apache.maven.wagon.proxy.ProxyInfo |
getProxyInfo() |
protected List<String> |
getRepositoryCache(String url) |
void |
init() |
protected boolean |
isGoalSkip() |
boolean |
isVerbose() |
protected List<org.apache.maven.artifact.Artifact> |
prepareArtifacts() |
void |
setProject(org.apache.maven.project.MavenProject project) |
void |
setVerbose(boolean verbose) |
acceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addUrlToUrlsList, afterExecute, backupFile, checkEncoding, checkPackaging, checkResource, checkRunOnceDone, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, execute, getBackupFile, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getRootProject, getTemplate, hasClassPath, initClassLoader, isExecutionRoot, isFileNewerThanPomFile, needInvoke, needInvoke, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFilegetLog, getPluginContext, setLog, setPluginContext@Parameter protected Map<String,String> repositories
@Parameter(property="addMavenCentral",
defaultValue="false")
protected boolean addMavenCentral
repositories.@Parameter(property="helper.failIfNotSafe",
defaultValue="false")
protected boolean failIfNotSafe
@Parameter(property="helper.verbose",
defaultValue="${maven.verbose}")
protected boolean verbose
@Parameter(property="helper.runOnce",
defaultValue="true")
protected boolean runOnce
true since it is not necessary to check twice for a same artifact.@Parameter(property="helper.runOnlyOnRoot",
defaultValue="true")
protected boolean runOnlyOnRoot
@Parameter(property="helper.skipCheckAutocontainer",
defaultValue="false")
protected boolean skipCheckAutocontainer
@Parameter(defaultValue="${project}",
required=true,
readonly=true)
protected org.apache.maven.project.MavenProject project
@Parameter(property="reactorProjects",
readonly=true)
protected List<?> reactorProjects
@Parameter(property="settings.activeProxy",
required=true,
readonly=true)
protected org.apache.maven.settings.Proxy proxy
@Component protected org.apache.maven.artifact.repository.ArtifactRepositoryFactory artifactRepositoryFactory
@Component protected org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
public static final String MAVEN_CENTRAL_ID
public static final String MAVEN_CENTRAL_URL
public org.apache.maven.project.MavenProject getProject()
public void setProject(org.apache.maven.project.MavenProject project)
public boolean isVerbose()
public void setVerbose(boolean verbose)
public void init()
throws Exception
init in class AbstractPluginExceptionprotected boolean checkSkip()
checkSkip in class AbstractPluginprotected void doAction()
throws Exception
doAction in class AbstractPluginExceptionprotected List<org.apache.maven.artifact.repository.ArtifactRepository> createSafeRepositories()
protected List<org.apache.maven.artifact.Artifact> prepareArtifacts()
protected org.apache.maven.artifact.Artifact acceptArtifact(org.apache.maven.artifact.Artifact a,
List<String> siblings)
protected String getArtifactId(org.apache.maven.artifact.Artifact artifact)
protected org.apache.maven.wagon.proxy.ProxyInfo getProxyInfo()
protected boolean isGoalSkip()
Copyright © 2009–2020 Code Lutin. All rights reserved.