Package org.bonitasoft.plugin.analyze
Class AnalyzeBonitaDependencyMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.bonitasoft.plugin.analyze.AnalyzeBonitaDependencyMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="analyze",
aggregator=true)
public class AnalyzeBonitaDependencyMojo
extends org.apache.maven.plugin.AbstractMojo
This mojo runs an analysis on the current project dependencies to detect
Bonita specific extensions.
Note: extensions in reactor must be compiled first, so we can inspect the class hierarchy.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ArtifactAnalyzerFactoryprotected final org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolverprotected StringScope threshold to exclude, if no value is defined for include.protected StringScope threshold to include.protected FileAnalysis report output file.protected org.apache.maven.project.MavenProjectprotected List<org.apache.maven.project.MavenProject>protected List<org.apache.maven.artifact.repository.ArtifactRepository>Remote repositories which will be searched for artifacts.protected org.apache.maven.execution.MavenSessionprotected booleanLook for incompatible dependencies.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
ConstructorsConstructorDescriptionAnalyzeBonitaDependencyMojo(org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver artifactResolver, ArtifactAnalyzerFactory artifactAnalyzerFactory, DependencyValidator dependencyValidator, org.apache.maven.lifecycle.internal.ProjectArtifactFactory artifactFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()protected List<DependencyReporter>protected List<org.apache.maven.artifact.Artifact>resolveArtifacts(Set<org.apache.maven.artifact.Artifact> artifacts, org.apache.maven.project.ProjectBuildingRequest buildingRequest) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
artifactResolver
protected final org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver artifactResolver -
artifactAnalyzerFactory
-
session
@Parameter(defaultValue="${session}", readonly=true, required=true) protected org.apache.maven.execution.MavenSession session -
project
@Parameter(defaultValue="${project}", required=true, readonly=true) protected org.apache.maven.project.MavenProject project -
reactorProjects
@Parameter(defaultValue="${reactorProjects}", required=true, readonly=true) protected List<org.apache.maven.project.MavenProject> reactorProjects -
remoteRepositories
@Parameter(defaultValue="${project.remoteArtifactRepositories}", readonly=true, required=true) protected List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepositoriesRemote repositories which will be searched for artifacts. -
outputFile
@Parameter(defaultValue="${project.build.directory}/bonita-dependencies.json", property="bonita.analyze.outputFile") protected File outputFileAnalysis report output file. -
validateDeps
@Parameter(defaultValue="true", property="bonita.validateDependencies") protected boolean validateDepsLook for incompatible dependencies. -
includeScope
Scope threshold to include. An empty string indicates include all dependencies. Default value is runtime.
The scope threshold value being interpreted is the scope as Maven filters for creating a classpath, not as specified in the pom. In summary:runtimeinclude scope gives runtime and compile dependencies,compileinclude scope gives compile, provided, and system dependencies,testinclude scope gives all dependencies (equivalent to default),providedinclude scope just gives provided dependencies,systeminclude scope just gives system dependencies.
- Since:
- 0.1.0
-
excludeScope
Scope threshold to exclude, if no value is defined for include. An empty string indicates no dependencies (default).
The scope threshold value being interpreted is the scope as Maven filters for creating a classpath, not as specified in the pom. In summary:runtimeexclude scope excludes runtime and compile dependencies,compileexclude scope excludes compile, provided, and system dependencies,testexclude scope excludes all dependencies, then not really a legitimate option: it will fail, you probably meant to configure includeScope = compileprovidedexclude scope just excludes provided dependencies,systemexclude scope just excludes system dependencies.
- Since:
- 0.1.0
-
-
Constructor Details
-
Method Details
-
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
-
getReporters
-
resolveArtifacts
protected List<org.apache.maven.artifact.Artifact> resolveArtifacts(Set<org.apache.maven.artifact.Artifact> artifacts, org.apache.maven.project.ProjectBuildingRequest buildingRequest) throws org.apache.maven.shared.artifact.filter.collection.ArtifactFilterException - Throws:
org.apache.maven.shared.artifact.filter.collection.ArtifactFilterException
-