Package net.shibboleth.idp.installer
Class BuildWar
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.idp.installer.BuildWar
-
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent
public final class BuildWar extends AbstractInitializableComponent
Code to build the war file during an install or on request.This code:
- Deletes any old detritus
- Creates a directory called webapp.tmp and populates it from the dist folder
- Overwrites this from edit-webapp
- Deletes the old idp.war
- Builds a jar file called idp.war
- Deletes webapp.tmp
-
-
Constructor Summary
Constructors Constructor Description BuildWar(Path idpHome)Constructor.BuildWar(InstallerProperties props, CurrentInstallState installState)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoInitialize()voidexecute()Method to do the work of building the war.private voidoverlayWebapp(Path from, Path webAppTo)Method to do a single overlay into webapp.-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
-
-
-
-
Field Detail
-
log
private final org.slf4j.Logger log
Log.
-
targetDir
private final Path targetDir
Location of the install for the job.
-
-
Constructor Detail
-
BuildWar
public BuildWar(@Nonnull InstallerProperties props, @Nonnull CurrentInstallState installState)Constructor.- Parameters:
props- The environment for the work.installState- Where we are right now.
-
BuildWar
public BuildWar(Path idpHome)
Constructor.- Parameters:
idpHome- Where to install to.
-
-
Method Detail
-
overlayWebapp
private void overlayWebapp(Path from, Path webAppTo) throws org.apache.tools.ant.BuildException
Method to do a single overlay into webapp.- Parameters:
from- Where to copy from.webAppTo- Where to copy to.- Throws:
org.apache.tools.ant.BuildException- if unexpected badness occurs.
-
execute
public void execute() throws org.apache.tools.ant.BuildExceptionMethod to do the work of building the war.- Throws:
org.apache.tools.ant.BuildException- if unexpected badness occurs.
-
doInitialize
protected void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
-