<?xml version="1.0"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
  
  http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<document>
  <properties>
    <title>Build Commands</title>
    <subtitle>Build Commands for Maven-2 and Jetspeed</subtitle>
	<authors>
		<person name="David Sean Taylor" email="taylor@apache.org" />
	</authors>
  </properties>
  <body>
    <section name="Build Commands for Maven-2 and Jetspeed">
      <p>      
      	Here is a quick summary of the current Jetspeed2 Maven2 build commands:
      </p>
<div>
<table>
<tr>
<td>
<strong><tt>commands</tt></strong>
</td>
<td>
<strong><tt>explanation</tt></strong>
</td>
</tr>
<tr>
<td>
<strong><tt>mvn</tt></strong>
</td>
<td>
performs base build and installs J2 artifacts in the Maven2 repository, (install is the default Maven2 goal for this build)
</td>
</tr>
<tr>
<td>
<strong><tt>mvn -P test</tt></strong>
</td>
<td>
performs base build and includes execution of test cases, (includes test database setup)
</td>
</tr>
<tr>
<td>
<strong><tt>mvn -P tomcat</tt></strong>
</td>
<td>
performs base build and deploys to Tomcat app server, (includes prodution database setup). 
Other app servers will be supported in the future, (see below for details)
</td>
</tr>
<tr>
<td>
<strong><tt>mvn clean</tt></strong>
</td>
<td>
cleans all build target directories
</td>
</tr>
</table>
</div>
<p><em>Please note that the Maven2 repositories used by default with this build are generally saturated and the Jetspeed2 Maven2 repository does not yet contain a full mirror of the artifacts required to build Jetspeed2. If you experience download or connection failures, simply restart the build by issuing your last command again to retry.</em> </p>
      
<subsection name='Additional Profiles'>
<p>The following profiles are optional and can be supplied when building/deploying to Tomcat </p>
<div>
<table>
<tr>
<td>
<strong><tt>mvn -P tomcat,min</tt></strong>
</td>
<td>
specified that only the administrative portlets be deployed along with a minimal set of PSML pages.
</td>
</tr>
<tr>
<td>
<strong><tt>mvn -P tomcat,full</tt></strong>
</td>
<td>
at the moment, this is the same as the default build: deploys a full J2 set of portlets and PSML pages.
</td>
</tr>
<tr>
<td>
<strong><tt>mvn -P tomcat,nodb</tt></strong>
</td>
<td>
specifies that configuration of the production database should be skipped.
</td>
</tr>
<tr>
<td>
<strong><tt>mvn -P tomcat,hot</tt></strong>
</td>
<td>
indicates that a portlet app, component, or content should be directly written to the deployed Jetspeed2 webapp.
</td>
</tr>
<tr>
<td>
<strong><tt>mvn -P tomcat,dbpsml</tt></strong>
</td>
<td>
specifies portal build and database deployment/import to include configuration of database PSML.
</td>
</tr>
<tr>
<td>
<strong><tt>mvn -P prod</tt></strong>
</td>
<td>
executes deployment to application server specified in settings.xml, (see below).
</td>
</tr>
</table>
</div>
<p>Currently, only Tomcat 5 and Tomcat 5.5 application servers are supported by this build. 
   More platforms are to be supported in the near future. 
</p>
</subsection>
</section>
</body>
</document>

