Class 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.
    • Field Detail

      • artifactResolver

        protected final org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver artifactResolver
      • 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> remoteRepositories
        Remote repositories which will be searched for artifacts.
      • outputFile

        @Parameter(defaultValue="${project.build.directory}/bonita-dependencies.json",
                   property="bonita.analyze.outputFile")
        protected File outputFile
        Analysis report output file.
      • validateDeps

        @Parameter(defaultValue="true",
                   property="bonita.validateDependencies")
        protected boolean validateDeps
        Look for incompatible dependencies.
      • includeScope

        @Parameter(property="includeScope",
                   defaultValue="runtime")
        protected String 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:
        • runtime include scope gives runtime and compile dependencies,
        • compile include scope gives compile, provided, and system dependencies,
        • test include scope gives all dependencies (equivalent to default),
        • provided include scope just gives provided dependencies,
        • system include scope just gives system dependencies.
        Since:
        0.1.0
      • excludeScope

        @Parameter(property="excludeScope",
                   defaultValue="")
        protected String 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:
        • runtime exclude scope excludes runtime and compile dependencies,
        • compile exclude scope excludes compile, provided, and system dependencies,
        • test exclude scope excludes all dependencies, then not really a legitimate option: it will fail, you probably meant to configure includeScope = compile
        • provided exclude scope just excludes provided dependencies,
        • system exclude scope just excludes system dependencies.
        Since:
        0.1.0
    • Constructor Detail

      • AnalyzeBonitaDependencyMojo

        @Inject
        public AnalyzeBonitaDependencyMojo​(org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver artifactResolver,
                                           ArtifactAnalyzerFactory artifactAnalyzerFactory,
                                           DependencyValidator dependencyValidator,
                                           org.apache.maven.lifecycle.internal.ProjectArtifactFactory artifactFactory)
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException,
                            org.apache.maven.plugin.MojoFailureException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException
      • 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