Package org.codehaus.cargo.maven3
Class UberWarMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.codehaus.cargo.maven3.AbstractUberWarMojo
-
- org.codehaus.cargo.maven3.UberWarMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo,org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
@Mojo(name="uberwar", defaultPhase=PACKAGE, requiresDependencyResolution=TEST, threadSafe=true) public class UberWarMojo extends AbstractUberWarMojo implements org.codehaus.plexus.personality.plexus.lifecycle.phase.ContextualizableBuilds an uber war.
-
-
Constructor Summary
Constructors Constructor Description UberWarMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddAllDependentJars(WarArchiveMerger wam)Add all the JAR files specified into the merge - these will appear in the WEB-INF/lib directory.protected voidaddAllTransitiveJars(WarArchiveMerger wam)Add all JAR files into the WAR file, calculated transitively and resolved in the normal 'maven' way (I.E if 2 war files contain different versions, resolve to using only *1* version).protected voidaddAllWars(WarArchiveMerger wam)Add all WARs from a merger.protected voidaddWar(WarArchiveMerger wam, String artifactIdent)Add a WAR to the uberwar.voidcontextualize(org.codehaus.plexus.context.Context context)Does nothing.voidexecute()Executes the UberWarMojo on the current project.protected FilegetConfigDirectory()-
Methods inherited from class org.codehaus.cargo.maven3.AbstractUberWarMojo
getProject, setProject
-
-
-
-
Method Detail
-
getConfigDirectory
protected File getConfigDirectory()
- Returns:
- Parent file of the descriptor.
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionExceptionExecutes the UberWarMojo on the current project.- Specified by:
executein interfaceorg.apache.maven.plugin.Mojo- Specified by:
executein classAbstractUberWarMojo- Throws:
org.apache.maven.plugin.MojoExecutionException- if an error occured while building the webapp
-
addAllTransitiveJars
protected void addAllTransitiveJars(WarArchiveMerger wam) throws org.apache.maven.plugin.MojoExecutionException
Add all JAR files into the WAR file, calculated transitively and resolved in the normal 'maven' way (I.E if 2 war files contain different versions, resolve to using only *1* version).- Parameters:
wam- WAR archive manager.- Throws:
org.apache.maven.plugin.MojoExecutionException- If anything goes wrong.
-
addAllDependentJars
protected void addAllDependentJars(WarArchiveMerger wam) throws org.apache.maven.plugin.MojoExecutionException
Add all the JAR files specified into the merge - these will appear in the WEB-INF/lib directory.- Parameters:
wam- WAR archive manager.- Throws:
org.apache.maven.plugin.MojoExecutionException- If anything goes wrong.
-
addWar
protected void addWar(WarArchiveMerger wam, String artifactIdent) throws org.apache.maven.plugin.MojoExecutionException, IOException
Add a WAR to the uberwar.- Parameters:
wam- WAR archive merger.artifactIdent- Artifact identifier.- Throws:
org.apache.maven.plugin.MojoExecutionException- If mojos fail.IOException- If reading or writing fails.
-
addAllWars
protected void addAllWars(WarArchiveMerger wam) throws org.apache.maven.plugin.MojoExecutionException, IOException
Add all WARs from a merger.- Parameters:
wam- WAR archive merger.- Throws:
org.apache.maven.plugin.MojoExecutionException- If mojos fail.IOException- If reading or writing fails.
-
contextualize
public void contextualize(org.codehaus.plexus.context.Context context) throws org.codehaus.plexus.context.ContextExceptionDoes nothing.- Specified by:
contextualizein interfaceorg.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable- Throws:
org.codehaus.plexus.context.ContextException
-
-