org.apache.maven.plugins.shade.mojo
Class ShadeMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugins.shade.mojo.ShadeMojo
All Implemented Interfaces:
ContextEnabled, Mojo, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

@Mojo(name="shade",
      defaultPhase=PACKAGE,
      threadSafe=true,
      requiresDependencyResolution=RUNTIME)
public class ShadeMojo
extends AbstractMojo
implements org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

Mojo that performs shading delegating to the Shader component.

Author:
Jason van Zyl, Mauro Talevi, David Blevins, Hiram Chirino

Field Summary
protected  ArtifactFactory artifactFactory
          Artifact factory, needed to download source jars for inclusion in classpath.
protected  ArtifactResolver artifactResolver
          Artifact resolver, needed to download source jars for inclusion in classpath.
protected  ArtifactRepository localRepository
          Local maven repository.
protected  List<ArtifactRepository> remoteArtifactRepositories
          Remote repositories which will be searched for source attachments.
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ShadeMojo()
           
 
Method Summary
 void contextualize(org.codehaus.plexus.context.Context context)
           
 void execute()
           
 boolean updateExcludesInDeps(MavenProject project, List<Dependency> dependencies, List<Dependency> transitiveDeps)
           
 
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

remoteArtifactRepositories

@Parameter(readonly=true,
           required=true,
           defaultValue="${project.remoteArtifactRepositories}")
protected List<ArtifactRepository> remoteArtifactRepositories
Remote repositories which will be searched for source attachments.


localRepository

@Parameter(readonly=true,
           required=true,
           defaultValue="${localRepository}")
protected ArtifactRepository localRepository
Local maven repository.


artifactFactory

@Component
protected ArtifactFactory artifactFactory
Artifact factory, needed to download source jars for inclusion in classpath.


artifactResolver

@Component
protected ArtifactResolver artifactResolver
Artifact resolver, needed to download source jars for inclusion in classpath.

Constructor Detail

ShadeMojo

public ShadeMojo()
Method Detail

contextualize

public void contextualize(org.codehaus.plexus.context.Context context)
                   throws org.codehaus.plexus.context.ContextException
Specified by:
contextualize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Throws:
org.codehaus.plexus.context.ContextException

execute

public void execute()
             throws MojoExecutionException
Specified by:
execute in interface Mojo
Throws:
MojoExecutionException

updateExcludesInDeps

public boolean updateExcludesInDeps(MavenProject project,
                                    List<Dependency> dependencies,
                                    List<Dependency> transitiveDeps)
                             throws DependencyGraphBuilderException
Throws:
DependencyGraphBuilderException


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.