Class GetMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.dependency.GetMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="get", requiresProject=false, threadSafe=true) public class GetMojo extends org.apache.maven.plugin.AbstractMojo
Resolves a single artifact, eventually transitively, from the specified remote repositories. Caveat: will always check the central repository defined in the super pom. You could use a mirror entry in your settings.xml
  • Field Summary

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected boolean
     
    void
    setArtifactId(String artifactId)
    The artifactId of the artifact to resolve.
    void
    setClassifier(String classifier)
    The classifier of the artifact to resolve.
    void
    setGroupId(String groupId)
    The groupId of the artifact to resolve.
    void
    The packaging of the artifact to resolve.
    void
    setVersion(String version)
    The version of the artifact to resolve.

    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
  • Constructor Details

    • GetMojo

      public GetMojo()
  • Method Details

    • 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
    • isSkip

      protected boolean isSkip()
      Returns:
      skip
    • setGroupId

      @Parameter(property="groupId") public void setGroupId(String groupId)
      The groupId of the artifact to resolve. Ignored if artifact is used.
      Parameters:
      groupId - The groupId.
    • setArtifactId

      @Parameter(property="artifactId") public void setArtifactId(String artifactId)
      The artifactId of the artifact to resolve. Ignored if artifact is used.
      Parameters:
      artifactId - The artifactId.
    • setVersion

      @Parameter(property="version") public void setVersion(String version)
      The version of the artifact to resolve. Ignored if artifact is used.
      Parameters:
      version - The version.
    • setClassifier

      @Parameter(property="classifier") public void setClassifier(String classifier)
      The classifier of the artifact to resolve. Ignored if artifact is used.
      Parameters:
      classifier - The classifier to be used.
      Since:
      2.3
    • setPackaging

      @Parameter(property="packaging", defaultValue="jar") public void setPackaging(String type)
      The packaging of the artifact to resolve. Ignored if artifact is used.
      Parameters:
      type - packaging.