Deploying a project from the command line
Deploying a project
If your system is configured to use Ant, you can deploy a project from the command line.
- 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.
- If your system is configured to use Ant, change directory to the root of the project. For example,
C:/MyWorkSpace/project1/WebContent- 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
- 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- 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.
- 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.
- From the command line, change to the WebContent directory.
cd project\WebContent- Invoke the build deployment war build.
ant -f projectDeploy.xml buildDeploymentWar
Parent topic: About deploying a project to a remote server