|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.AbstractMavenComponent org.apache.maven.plugin.PluginManager
Plugin manager for MavenSession.
ThePluginManager
deals with all aspects of a plugins lifecycle.
This is not thread safe.
Field Summary | |
static java.lang.String |
BASE_CONTEXT
|
static java.lang.String |
GLOBAL_SESSION_KEY
The variable key that holds an implementation of the com.werken.werkz.Session in the parent scope context. |
static java.lang.String |
GOAL_MAPPER
|
static java.lang.String |
PLUGIN_HOUSING
|
static java.lang.String |
PLUGIN_MANAGER
|
Constructor Summary | |
PluginManager(MavenSession session)
Default constructor. |
Method Summary | |
void |
addDelayedPops(java.util.Set set)
|
void |
attainGoals(Project project,
java.util.List goals)
Attain the goals. |
void |
cleanupAttainGoal(java.util.Set pluginSet)
|
java.lang.String |
getGoalDescription(java.lang.String goalName)
|
java.util.Set |
getGoalNames()
|
java.util.Set |
getGoalNames(Project project)
Warning - this completely scrogs the default mapper. |
MavenJellyContext |
getPluginContext(java.lang.String id)
|
java.util.Collection |
getPluginList()
|
Project |
getPluginProjectFromGoal(java.lang.String goal)
|
void |
initialize()
Initialize all plugins. |
void |
installPlugin(java.io.File file,
Project parentProject)
|
void |
installPlugin(java.io.File file,
Project parentProject,
boolean cache)
Load and install a plugin. |
(package private) JellyScriptHousing |
loadPluginHousing(java.lang.String name,
java.io.File pluginDir)
|
(package private) void |
mapArtifactIdToPluginHousing(java.lang.String artifactId,
JellyScriptHousing housing)
|
java.util.Set |
prepAttainGoal(java.lang.String goalName,
MavenJellyContext baseContext,
GoalToJellyScriptHousingMapper goalMapper)
Use the name of a goal to lookup all the plugins (that are stored in the plugin housings) that need to be executed in order to satisfy all the required preconditions for successful goal attainment. |
void |
processDependencies(Project project)
Process the dependencies of the project, adding dependencies to the appropriate classloader etc |
(package private) java.util.List |
readMavenXml(Project project,
GoalToJellyScriptHousingMapper mapper)
|
(package private) void |
runScript(JellyScriptHousing jellyScriptHousing,
MavenJellyContext context)
|
(package private) MavenJellyContext |
setupBaseContext(Project project)
|
void |
uninstallPlugin(java.lang.String artifactId)
|
(package private) java.io.File |
unpackPlugin(java.lang.String pluginName,
java.io.File jarFile,
boolean cache)
Unpack the plugin. |
Methods inherited from class org.apache.maven.AbstractMavenComponent |
getMessage, getMessage, getProject, setProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String GLOBAL_SESSION_KEY
com.werken.werkz.Session
in the parent scope context.
public static final java.lang.String PLUGIN_MANAGER
public static final java.lang.String PLUGIN_HOUSING
public static final java.lang.String GOAL_MAPPER
public static final java.lang.String BASE_CONTEXT
Constructor Detail |
public PluginManager(MavenSession session)
session
- The MavenSession this plugin manager will use
until Maven shuts down.Method Detail |
public void initialize() throws java.io.IOException, MavenException
java.io.IOException
MavenException
JellyScriptHousing loadPluginHousing(java.lang.String name, java.io.File pluginDir) throws java.io.IOException
java.io.IOException
void mapArtifactIdToPluginHousing(java.lang.String artifactId, JellyScriptHousing housing)
public void processDependencies(Project project) throws java.net.MalformedURLException, java.lang.Exception
java.net.MalformedURLException
- if a file can't be converted to a URL.
java.lang.Exception
- for any other issue. FIXMEjava.util.List readMavenXml(Project project, GoalToJellyScriptHousingMapper mapper) throws MavenException
MavenException
MavenJellyContext setupBaseContext(Project project)
public void attainGoals(Project project, java.util.List goals) throws java.lang.Exception
java.lang.Exception
- If one of the specified
goals refers to an non-existent goal.
java.lang.Exception
- If an exception occurs while running a goal.public void cleanupAttainGoal(java.util.Set pluginSet) throws java.lang.Exception
java.lang.Exception
public java.util.Set prepAttainGoal(java.lang.String goalName, MavenJellyContext baseContext, GoalToJellyScriptHousingMapper goalMapper) throws java.lang.Exception
goalName
- the goalbaseContext
- the base context to attain in
java.lang.Exception
public java.util.Set getGoalNames()
public java.util.Set getGoalNames(Project project) throws MavenException
MavenException
public void installPlugin(java.io.File file, Project parentProject) throws MavenException
MavenException
public void installPlugin(java.io.File file, Project parentProject, boolean cache) throws MavenException
file
- the file to install. Must be a plugin jarparentProject
- the project to load the installed plugin into
MavenException
public void uninstallPlugin(java.lang.String artifactId) throws java.io.IOException
java.io.IOException
public MavenJellyContext getPluginContext(java.lang.String id) throws MavenException, UnknownPluginException
id
-
UnknownPluginException
MavenException
public java.lang.String getGoalDescription(java.lang.String goalName)
public void addDelayedPops(java.util.Set set)
java.io.File unpackPlugin(java.lang.String pluginName, java.io.File jarFile, boolean cache) throws MavenException
MavenException
- if there was a problem unpackingvoid runScript(JellyScriptHousing jellyScriptHousing, MavenJellyContext context) throws java.lang.Exception
context
-
java.lang.Exception
public Project getPluginProjectFromGoal(java.lang.String goal) throws MavenException
MavenException
public java.util.Collection getPluginList()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |