6.7 Form Tags as a plan

Plans (see Section 4.3, “Creating Plans”) allow us to package and deploy the Form Tags application in a more flexible way. Instead of packaging all the bundles of the application into a single PAR file, each bundle can be placed in the repository and referred to in a plan.

The bundles to be placed in a repository in the chain (for example, repository/usr) are:


which are just those files which were part of the PAR.

Here is the contents of a suitable plan file for the Form Tags example:

<?xml version="1.0" encoding="UTF-8"?>
<plan name="formtags.plan" version="2.0.0" scoped="true" atomic="true"

    <artifact type="bundle" name="org.springframework.showcase.formtags.domain_par" version="[2.0,2.1)"/>
    <artifact type="bundle" name="org.springframework.showcase.formtags.service_par" version="[2.0,2.1)"/>
    <artifact type="war" name="org.springframework.showcase.formtags.web_par" version="[2.0,2.1)"/>


where we have chosen to use any of the artifacts in the version range [2.0,2.1). This plan (as a file called, for example, formtags.plan) can be deployed in any of the normal ways (for example, dropped in the pickup directory).

When the plan is deployed, the artifacts it references are installed from the repository and deployed in the order given in the plan file. Because this plan is scoped and atomic, the collection is given an application scope and is started and stopped as a single unit.