Class AbstractBaseMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.isomorphic.maven.mojo.AbstractBaseMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
AbstractPackagerMojo, ImportMojo

public abstract class AbstractBaseMojo
extends org.apache.maven.plugin.AbstractMojo
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected org.eclipse.aether.impl.ArtifactResolver artifactResolver  
    protected org.apache.maven.model.building.ModelBuilder modelBuilder  
    protected org.apache.maven.project.MavenProject project  
    protected org.eclipse.aether.impl.RemoteRepositoryManager remoteRepositoryManager  
    protected org.eclipse.aether.RepositorySystem repositorySystem  
    protected org.eclipse.aether.RepositorySystemSession repositorySystemSession  
    protected org.apache.maven.settings.Settings settings  

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

    ROLE
  • Constructor Summary

    Constructors 
    Constructor Description
    AbstractBaseMojo()  
  • Method Summary

    Modifier and Type Method Description
    abstract void execute()  
    protected org.eclipse.aether.repository.Authentication getAuthentication​(String serverId)
    Returns user credentials for the server with the given id, as kept in Maven settings.
    org.apache.http.auth.UsernamePasswordCredentials getCredentials​(String serverId)  

    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 Details

    • repositorySystemSession

      @Parameter(readonly=true, defaultValue="${repositorySystemSession}") protected org.eclipse.aether.RepositorySystemSession repositorySystemSession
    • modelBuilder

      @Component protected org.apache.maven.model.building.ModelBuilder modelBuilder
    • project

      @Component protected org.apache.maven.project.MavenProject project
    • repositorySystem

      @Component protected org.eclipse.aether.RepositorySystem repositorySystem
    • artifactResolver

      @Component protected org.eclipse.aether.impl.ArtifactResolver artifactResolver
    • remoteRepositoryManager

      @Component protected org.eclipse.aether.impl.RemoteRepositoryManager remoteRepositoryManager
    • settings

      @Component protected org.apache.maven.settings.Settings settings
  • Constructor Details

  • Method Details

    • execute

      public abstract void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException
    • getCredentials

      public org.apache.http.auth.UsernamePasswordCredentials getCredentials​(String serverId)
    • getAuthentication

      protected org.eclipse.aether.repository.Authentication getAuthentication​(String serverId)
      Returns user credentials for the server with the given id, as kept in Maven settings.

      Refer to http://maven.apache.org/settings.html#Servers

      Parameters:
      serverId - the id of the server containing the authentication credentials
      Returns:
      the Authentication credentials for the given server with the given id