Deployment

The exact deployment procedure varies slightly according to whether or not your application server supports EAR deployment. Most application servers do, but Tomcat does not.

graphics/ear-deployment.png

The procedure involves the following steps:

  1. Zip up the modified folder tree using any zip-capable archiving utility. If necessary, rename the resulting archive from .zip to .war (some utilities will do this for you). The archive should not contain the application's root folder. That is, if you have an application tree in which the root folder is called myapp, you should create an archive called myapp.zip with the same contents as the myapp folder.

  2. Copy the WAR archive to the escenic/assembly-tool-version/publications folder on your application server. If you are working on a different host from the server then you will need to use a remote copying tool to do this.

  3. If you are deploying the publication for the first time then you also need to create a publication properties file describing the publication and copy it to the same location as the WAR archive. A publication properties file is a simple text file with the same name as the publication WAR archive, the extension .properties and the following contents:

    name:          publication-name
    source-war:    archive-name.war
    context-root:  /publication-name

    where publication-name is the name to be used for the publication and archive-name is the name of the publication archive. publication-name and archive-name can be the same but should probably not be (you may want to create several publications based on the same publication definition).

  4. Log in on the application server host, CD to the escenic/assembly-tool-version folder and enter:

    ant -q ear
    • If your application server supports EAR file deployment, copy escenic/assembly-tool-version/dist/engine.ear to your application server using the particular server's recommended deployment procedure.

    • If your application server does not support EAR file deployment, copy escenic/assembly-tool-version/dist/war/myapp.war to your application server using the particular server's recommended deployment procedure. If this is the first time you are deploying an Escenic publication, then you should copy all the WAR files you find in the escenic/assembly-tool-version/dist/war folder. If it is not the first time then you only need to copy the publication war file.

You must use the assembly tool as described above to deploy publications, even if you are only redeploying a single WAR file: the assembly tool modifies the WAR file you supply to it, adding libraries, patches and other important components. But don't worry - in a normal development environment you won't need to to do it very often as you can do most of your development directly on a deployed copy of the application - see Making Template Changes.

Once you have completed deployment, you should visit the publication using a browser to check that it has actually been deployed/redeployed.