Interface DependencyHelper

  • All Known Implementing Classes:
    Dependency31Helper

    public interface DependencyHelper

    An interface for accessing available Aether subsystem (Sonatype for Maven 3.0.x or Eclipse for Maven 3.1.x)

    Some methods have Object parameters because they should be able to receive Aether classes from both Aether variants.

    • Method Detail

      • getTreeListing

        String getTreeListing()
      • getDependencies

        void getDependencies​(org.apache.maven.project.MavenProject project,
                             boolean useTransitiveDependencies)
                      throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • isArtifactAFeature

        boolean isArtifactAFeature​(Object artifact)
      • getBaseVersion

        String getBaseVersion​(Object artifact)
      • resolve

        File resolve​(Object artifact,
                     org.apache.maven.plugin.logging.Log log)
      • resolveById

        File resolveById​(String id,
                         org.apache.maven.plugin.logging.Log log)
                  throws org.apache.maven.plugin.MojoFailureException
        Throws:
        org.apache.maven.plugin.MojoFailureException
      • setRepositorySession

        void setRepositorySession​(org.apache.maven.project.ProjectBuildingRequest request)
                           throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • artifactToMvn

        String artifactToMvn​(org.apache.maven.artifact.Artifact artifact,
                             String versionOrRange)
                      throws org.apache.maven.plugin.MojoExecutionException
        Convert a Maven Artifact into a PAX URL mvn format.
        Parameters:
        artifact - The Maven Artifact.
        Returns:
        The corresponding PAX URL mvn format (mvn:groupId/artifactId/version/type/classifier)
        Throws:
        org.apache.maven.plugin.MojoExecutionException - If the plugin execution fails.
      • artifactToMvn

        String artifactToMvn​(Object object,
                             String versionOrRange)
                      throws org.apache.maven.plugin.MojoExecutionException
        Convert an Aether (Sonatype or Eclipse) artifact into a PAX URL mvn format.
        Parameters:
        object - The Aether org.sonatype|eclipse.aether.artifact.Artifact.
        Returns:
        The corresponding PAX URL mvn format (mvn:groupId/artifactId/version/type/classifier).
        Throws:
        org.apache.maven.plugin.MojoExecutionException - If the plugin execution fails.
      • mvnToArtifact

        org.apache.maven.artifact.Artifact mvnToArtifact​(String name)
                                                  throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • pathFromMaven

        String pathFromMaven​(String name)
                      throws org.apache.maven.plugin.MojoExecutionException
        Convert a PAX URL mvn format into a filesystem path.
        Parameters:
        name - PAX URL mvn format (mvn:groupId/artifactId/version/type/classifier).
        Returns:
        The filesystem path.
        Throws:
        org.apache.maven.plugin.MojoExecutionException - If the plugin execution fails.
      • pathFromAether

        String pathFromAether​(String name)
                       throws org.apache.maven.plugin.MojoExecutionException
        Convert an Aether coordinate format into a filesystem path.
        Parameters:
        name - The Aether coordinate format (groupId:artifactId[:extension[:classifier]]:version).
        Returns:
        The filesystem path.
        Throws:
        org.apache.maven.plugin.MojoExecutionException - If the plugin execution fails.