Elastic Path Maven Profiles
Elastic Path Maven Profiles
Maven build profiles are sets of configuration settings for building your software for different environments. For example, if you have tomcat-developer as an active profile, Maven builds your projects according to the tomcat-developer settings, which in this case means your web application projects are built into a deployable Tomcat .WAR.
Elastic Path provides a number of build profiles so you can build and deploy your Elastic Path platform on different application servers and databases. You can activate or deactivate the build profiles in your Maven settings.xml file that is located in your .m2 directory.
If you switch to one of these profiles as you are developing, mysql-dev-db, oracle-dev-db, mssql-dev-db, or wtp-developer, you must update your database with the settings associated with these profiles. To update the database, run the command shown here: Elastic_Path_Maven_Commands.html#ChangingProfiles
Application Server Profiles
The application server profiles are used to configure the type of WAR file generated by Maven. Choose the appropriate profile for your server.
Server Profiles | Server |
---|---|
tomcat-developer | Tomcat 6 |
jboss-developer | JBoss 5.1 |
weblogic-developer | Weblogic 11g |
Database Profiles
The database server profiles are used to configure the database the Elastic Path platform uses. Choose the appropriate profile for your database system.
Database Profiles | Database |
---|---|
mysql-dev-db | MySQL 5.1, 5.5 |
oracle-dev-db | Oracle 11g r1, 11g r2, 11g r1 RAC, 11g r2 RAC |
mssql-dev-db | MSSQL 2008 |
Specifying your database schema
By default, the database profiles will use the following properties to access your database:
Schema Name | COMMERCEDB |
Username | ep |
Password | ep |
You may override these values by adding the following profile in your settings.xml and inserting your own settings.
<profile> <id>Database Profile</id> <properties> <epdb.schemaname>Schema Name</epdb.schemaname> <epdb.username>Database Username</epdb.username> <epdb.password>Database Password</epdb.password> </properties> </profile>
For MySQL, your settings.xml should look similar to the following:
Other Profiles
In addition to the server and database profiles, there are profiles that configure Maven for development with WTP or for the automatic build of the client when the core is built.
Profile | Description |
---|---|
wtp-developer | Overrides port numbers to set up development in Eclipse WTP. This profile only works with Tomcat. |
with-oauth2-resource | Includes the oauth2 resource in Cortex API web application build. Without the profile, the oauth2 resource is not included in the build. This is for customers who have their own customized oauth2 solution and do not want the default oauth2 resource. For more information on using this profile, see Generate Cortex API Web Application |