Class BaselineMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="baseline",
          defaultPhase=VERIFY,
          threadSafe=true)
    public class BaselineMojo
    extends org.apache.maven.plugin.AbstractMojo
    Exports project dependencies to OSGi R5 index format.
    • Constructor Summary

      Constructors 
      Constructor Description
      BaselineMojo()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private boolean checkFailures​(org.eclipse.aether.artifact.Artifact artifact, org.eclipse.aether.resolution.ArtifactResult artifactResult, Baseline baseline, Instructions diffpackages)  
      void execute()  
      private java.util.List<org.eclipse.aether.repository.RemoteRepository> getRepositories​(org.eclipse.aether.artifact.Artifact artifact)  
      private org.eclipse.aether.resolution.ArtifactResult locateBaseJar​(java.util.List<org.eclipse.aether.repository.RemoteRepository> aetherRepos)  
      private void searchForBaseVersion​(java.util.List<org.eclipse.aether.repository.RemoteRepository> aetherRepos)  
      private void setupBase​(org.eclipse.aether.artifact.Artifact artifact)  
      • Methods inherited from class org.apache.maven.plugin.AbstractMojo

        getLog, getPluginContext, setLog, setPluginContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • logger

        private static final org.slf4j.Logger logger
      • project

        @Parameter(defaultValue="${project}",
                   readonly=true,
                   required=true)
        private org.apache.maven.project.MavenProject project
      • session

        @Parameter(defaultValue="${repositorySystemSession}",
                   readonly=true,
                   required=true)
        private org.eclipse.aether.RepositorySystemSession session
      • failOnMissing

        @Parameter(property="bnd.baseline.fail.on.missing",
                   defaultValue="true")
        private boolean failOnMissing
      • includeDistributionManagement

        @Parameter(property="bnd.baseline.include.distribution.management",
                   defaultValue="true")
        private boolean includeDistributionManagement
      • fullReport

        @Parameter(property="bnd.baseline.full.report",
                   defaultValue="false")
        private boolean fullReport
      • continueOnError

        @Parameter(property="bnd.baseline.continue.on.error",
                   defaultValue="false")
        private boolean continueOnError
      • base

        @Parameter
        private Base base
      • diffignores

        @Parameter(required=false)
        private java.util.List<java.lang.String> diffignores
      • diffpackages

        @Parameter(required=false,
                   defaultValue="*")
        private java.util.List<java.lang.String> diffpackages
      • skip

        @Parameter(property="bnd.baseline.skip",
                   defaultValue="false")
        private boolean skip
      • system

        @Component
        private org.eclipse.aether.RepositorySystem system
    • Constructor Detail

      • BaselineMojo

        public BaselineMojo()
    • 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
      • getRepositories

        private java.util.List<org.eclipse.aether.repository.RemoteRepository> getRepositories​(org.eclipse.aether.artifact.Artifact artifact)
      • setupBase

        private void setupBase​(org.eclipse.aether.artifact.Artifact artifact)
      • searchForBaseVersion

        private void searchForBaseVersion​(java.util.List<org.eclipse.aether.repository.RemoteRepository> aetherRepos)
                                   throws org.eclipse.aether.resolution.VersionRangeResolutionException
        Throws:
        org.eclipse.aether.resolution.VersionRangeResolutionException
      • locateBaseJar

        private org.eclipse.aether.resolution.ArtifactResult locateBaseJar​(java.util.List<org.eclipse.aether.repository.RemoteRepository> aetherRepos)
                                                                    throws org.eclipse.aether.resolution.ArtifactResolutionException
        Throws:
        org.eclipse.aether.resolution.ArtifactResolutionException
      • checkFailures

        private boolean checkFailures​(org.eclipse.aether.artifact.Artifact artifact,
                                      org.eclipse.aether.resolution.ArtifactResult artifactResult,
                                      Baseline baseline,
                                      Instructions diffpackages)
                               throws java.lang.Exception,
                                      java.io.IOException
        Throws:
        java.lang.Exception
        java.io.IOException