Deploying a project from the command line

 

+

Search Tips   |   Advanced Search

 

  1. Deploying a project
  2. Invoking the deployment WAR build

 

Deploying a project

If your system is configured to use Ant, you can deploy a project from the command line.

  1. Open a command prompt, and then type ant -version.

    If version information is displayed, this confirms that your system is configured to use Ant.

    If your system is not configured to use Ant, the system displays a message saying that ant is not recognized as a command, program, or batch file. Refer to the Ant documentation for instructions for configuration.

  2. If your system is configured to use Ant, change directory to the root of the project. For example,

    C:/MyWorkSpace/project1/WebContent

  3. Assign values to the following properties, either by setting them in a properties file that you create, for example, deployProps.properties, or by specifying them in the command line.

    Specify the full name and path to the .bowstreet file as it exists relative to projectDeploy.xml stored in the WebContent directory.

    dotBowstreet=/path/to/.bowstreet

    Location of the project deployment configuration files. For example:

    wpf.config.dir=/MyWorkSpace/.metadata/.plugins/com.bowstreet.designer.webapp/deploymentconfigs

  4. Set these properties from the command line or from a properties file.

    • From the command line

      ant -f projectDeploy.xml standAloneConfig -DdotBowstreet=../.bowstreet -Dwpf.config.dir=/MyWorkSpace/.metadata/.plugins/com.bowstreet.designer.webapp/deploymentconfigs

    • From a properties file

      ant -f projectDeploy.xml standAloneConfig -propertyfile deployProps.properties

  5. Build the project and deploy the project WAR files.

    • Build the development WAR

      ant -f projectDeploy.xml standAloneConfig -propertyfile deployProps.properties

    • Build the production WAR

      ant -f projectDeploy.xml portalConfig -propertyfile deployProps.properties

Note: All deployment options set in the deployment configuration mapped for the project are used. If you specified security credentials when you created the deployment configuration, your application is deployed when you run these commands.

 

Invoking the deployment WAR build

If your system is configured to use Ant, you can invoke the build deployment war build from the command line.

  1. Open a command prompt, and then type ant.

    This command verifies that your system is configured to use Ant.

    If your system is not configured to use Ant, the system displays a message saying that ant is not recognized as a command, program, or batch file. Refer to the Ant documentation for instructions for configuration.

  2. From the command line, change to the WebContent directory.

    cd project\WebContent

  3. Invoke the build deployment war build.

    ant -f projectDeploy.xml buildDeploymentWar

Parent topic: About deploying a project to a remote server