This chapter describes options and required settings for deploying a WAR file or Maven project, which was created via the predefined Stardust Tomcat Portal archetype.
Prior to deployment, create a new Maven project with the Tomcat 7 archetype, as described in chapter Creating a Stardust Runtime Environment with Apache Maven of the Installation Guide. section Maven Archetypes of our Stardust Wiki Maven/Basic Setup page. You can either create the Maven project via commandline and import it in Eclipse later, or create it in Eclipse directly.
To create the Maven project via commandline, enter the following:
mvn archetype:generate -DarchetypeGroupId=com.infinity.bpm.archetypes
-DarchetypeArtifactId=ipp-archetype-tc7-ipp-portal-war -DarchetypeVersion=<version>
-DgroupId=com.infinity.test -DartifactId=ipp-portal -Dversion=1.0-SNAPSHOT
mvn archetype:generate -DarchetypeGroupId=org.eclipse.stardust.deploy.jee.archetypes
-DarchetypeArtifactId=tc7-stardust-portal-war -DarchetypeVersion=<version>
-DgroupId=org.eclipse.stardust.test -DartifactId=ipp-portal -Dversion=1.0-SNAPSHOT
To import your project in Eclipse as existing Maven project, perform the following steps:


For more details please refer to section Importing an existing Maven Project in Eclipse of installation chapter Creating a Stardust Runtime Environment with Apache Maven.
Prepare an M2 Eclipse environment and create a Maven project in Eclipse as described in section Using the M2Eclipse Plugin to create a new Maven Project of chapter Creating a Stardust Runtime Environment with Apache Maven. M2 Eclipse Plugin on the Stardust Knowledge Base site.

ipp-archetype-tc7-ipp-portal-war
tc7-stardust-portal-war archetype.You have the following options to deploy the created Portal project or WAR file:
To deploy the created WAR file on an external Tomcat server, add it to the
webapps folder of your Tomcat installation. Note that you have to manually
adjust the server.xml file to provide a valid datasource definition as
described below.
For an embedded Derby database definition, include the following resource definition in
the <GlobalNamingResources> section of your Tomcat
server.xml file:
<Resource name="AuditTrail.DataSource" description="Embedded Derby database for IPP" factory="org.apache.tomcat.jdbc.naming.GenericNamingResourcesFactory" type="org.apache.derby.jdbc.EmbeddedXADataSource" databaseName="carnot" user="carnot" password="ag" />
To use a Derby database which is accessible via network, add the following snippet to
the <GlobalNamingResources> section of your Tomcat
server.xml file:
<Resource name="AuditTrail.DataSource" description="Network Derby database for IPP" factory="org.apache.tomcat.jdbc.naming.GenericNamingResourcesFactory" databaseName="carnot" user="carnot" password="ag" portNumber="1527" serverName="localhost" type="org.apache.derby.jdbc.ClientXADataSource" />
If you deploy the WAR file or Maven project in RAD, a valid datasource definition,
which provides access to the embedded Derby database, will be added automatically to your
Tomcat server.xml file on audit trail database creation or update.
To deploy the Maven project in Eclipse:
Note
If you use a database that was created with an earlier
release, please remove and re-add the database. Republish the server to automatically
add the valid datasource definition in the server.xml.




