org.sandev.sandbuild
Class SARDeploymentPackager

java.lang.Object
  extended byorg.sandev.sandbuild.SARDeploymentPackager
All Implemented Interfaces:
SandDeploymentPackager

public class SARDeploymentPackager
extends java.lang.Object
implements SandDeploymentPackager

Deploy the finished build files into JBOSS_HOME/bin and SAND_DEPLOY and launch the application from the SAND SAR.


Field Summary
protected  java.io.File deploymentDir
          The directory where the application files will be copied to on build completion.
 
Constructor Summary
SARDeploymentPackager()
           
 
Method Summary
protected  void checkLocalDTD(SandProject platform)
          If the XHTML DTDs are defined locally, then copy them into the runtime area for offline use.
 void doDeployment(SandProject deployment, SandProject platform, int mode)
          Deploy the files into the container.
 java.io.File getDeploymentDir()
          accessor for deploymentDir
protected  void log(java.lang.String text)
          Dump the specified text to the build log.
 void setDeploymentDir(java.io.File dir)
          mutator for deploymentDir
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deploymentDir

protected java.io.File deploymentDir
The directory where the application files will be copied to on build completion.

Constructor Detail

SARDeploymentPackager

public SARDeploymentPackager()
Method Detail

setDeploymentDir

public void setDeploymentDir(java.io.File dir)
mutator for deploymentDir

Specified by:
setDeploymentDir in interface SandDeploymentPackager

getDeploymentDir

public java.io.File getDeploymentDir()
accessor for deploymentDir

Specified by:
getDeploymentDir in interface SandDeploymentPackager

doDeployment

public void doDeployment(SandProject deployment,
                         SandProject platform,
                         int mode)
                  throws SandBuildException
Deploy the files into the container.

Specified by:
doDeployment in interface SandDeploymentPackager
Throws:
SandBuildException

log

protected void log(java.lang.String text)
Dump the specified text to the build log.


checkLocalDTD

protected void checkLocalDTD(SandProject platform)
                      throws SandBuildException
If the XHTML DTDs are defined locally, then copy them into the runtime area for offline use. If we don't do this, then XSLT rendering will look them up on the net at runtime, which requires an internet connection. Since that is pretty inconvenient when working offline (not to mention innefficient), we keep a copy of w3_xhtml1_dtd.zip local in the platform build directory. We unzip this if necessary, and copy the files into JBOSS_HOME/bin/DTD for general use.

These files are read-only, and don't change. So we copy them over as needed, but we don't clean them up.

Throws:
SandBuildException