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.Contextualizable
Builds an uber war.
-
-
Constructor Summary
Constructors Constructor Description UberWarMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addAllDependentJars(WarArchiveMerger wam)
Add all the JAR files specified into the merge - these will appear in the WEB-INF/lib directory.protected void
addAllTransitiveJars(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 void
addAllWars(WarArchiveMerger wam)
Add all WARs from a merger.protected void
addWar(WarArchiveMerger wam, String artifactIdent)
Add a WAR to the uberwar.void
contextualize(org.codehaus.plexus.context.Context context)
Does nothing.void
execute()
Executes the UberWarMojo on the current project.protected File
getConfigDirectory()
-
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.MojoExecutionException
Executes the UberWarMojo on the current project.- Specified by:
execute
in interfaceorg.apache.maven.plugin.Mojo
- Specified by:
execute
in 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.ContextException
Does nothing.- Specified by:
contextualize
in interfaceorg.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
- Throws:
org.codehaus.plexus.context.ContextException
-
-