Class ResolveArtifactMojo

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

    @Mojo(name="resolve-artifact",
          threadSafe=true)
    public class ResolveArtifactMojo
    extends org.apache.maven.plugin.AbstractMojo
    Resolves a single artifact (not including its transitive dependencies).
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String artifactCoords
      The <groupId>:<artifactId>[:<extension>[:<classifier>]]:<version> of the artifact to resolve.
      private static org.slf4j.Logger LOGGER  
      private java.util.List<RemoteRepository> remoteRepos
      The project's remote repositories to use for the resolution.
      private RepositorySystemSession repoSession
      The current repository/network configuration of Maven.
      private RepositorySystem repoSystem
      The entry point to Maven Artifact Resolver, i.e.
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute()
      The actual execution of the mojo.
      • 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
      • repoSystem

        @Component
        private RepositorySystem repoSystem
        The entry point to Maven Artifact Resolver, i.e. the component doing all the work.
      • repoSession

        @Parameter(defaultValue="${repositorySystemSession}",
                   readonly=true)
        private RepositorySystemSession repoSession
        The current repository/network configuration of Maven.
      • remoteRepos

        @Parameter(defaultValue="${project.remoteProjectRepositories}",
                   readonly=true)
        private java.util.List<RemoteRepository> remoteRepos
        The project's remote repositories to use for the resolution.
      • artifactCoords

        @Parameter(property="resolver.artifactCoords",
                   readonly=true)
        private java.lang.String artifactCoords
        The <groupId>:<artifactId>[:<extension>[:<classifier>]]:<version> of the artifact to resolve.
    • Constructor Detail

      • ResolveArtifactMojo

        public ResolveArtifactMojo()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException,
                            org.apache.maven.plugin.MojoFailureException
        The actual execution of the mojo.
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException