13 Building Oracle SOA Suite and Oracle Business Process Management Projects with Maven

You can use the Oracle SOA Suite and Oracle Business Process Management Maven archetypes to create, build, and deploy Oracle SOA Suite and Oracle Business Process Management applications.

Topics:

For more information about using the Oracle SOA Suite development plug-in with Maven, see "Using the Oracle SOA Suite Development Maven Plug-In" in Developing SOA Applications with Oracle SOA Suite.

13.1 Introduction to Building Oracle SOA Suite and Oracle Business Process Management Projects with Maven

Oracle Fusion Middleware provides a Maven plug-in and two archetypes are provided for Oracle SOA Suite and Oracle Business Process Management

Table 13-1 describes the Maven coordinates.

Table 13-1 Maven Coordinates with Oracle SOA Suite

Artifact groupId artifactId version

SOA plug-in

com.oracle.soa.plugin

oracle-soa-plugin

12.2.1-0-0

SOA Application archetype

com.oracle.soa.archetype

oracle-soa-application

12.2.1-0-0

SOA Project archetype

com.oracle.soa.archetype

oracle-soa-project

12.2.1-0-0

Table 13-2 describes the goals supported by the Oracle SOA Suite plug-in.

Table 13-2 Oracle SOA Suite Plug-In Goals

Goal Purpose

compile

Runs the SCA composite validation routine on your project---this is somewhat equivalent to a traditional compile operation in that it inspects the source artifacts and produces errors and warnings. However, it does not produce any compiled version of the source artifacts.

sar

Creates a SOA archive (SAR) file from the project.

deploy

Deploys the SAR file to a runtime environment. Note that this goal is mapped to the pre-integration-test phase in the default lifecycle, not the deploy phase, as deployment to a runtime environment is normally done in the pre-integration-test phase in Maven.

test

Executes SCA tests in the composite. Note that this goal is mapped to the integration-test phase, not the test phase, as it depends on the composite (SAR) having been deployed to a runtime environment.

undeploy

Undeploys a composite (SAR) from a runtime environment. Note that this goal is not mapped to any phase in the default Maven lifecycle.

The SOA Application archetype allows you to create a new SOA application with a single SOA Project in it. This can be imported in JDeveloper for editing.

The SOA Project archetype allows you to add a new SOA Project to an existing SOA Application.

13.2 Creating a New SOA Application and Project from a Maven Archetype

You can create a new SOA application (containing a single SOA project) using the SOA Maven archetype.

To do so, execute a command similar to the following:

mvn archetype:generate
     -DarchetypeGroupId=com.oracle.soa.archetype
     -DarchetypeArtifactId=oracle-soa-application
     -DarchetypeVersion=12.2.1-0-0
     -DgroupId=org.mycompany
     -DartifactId=my-soa-app
     -Dversion=1.0-SNAPSHOT
     -DprojectName=my-project

This command runs Maven's archetype:generate goal which allows you to create a new SOA Application from an archetype. Table 13-3 describes the parameters.

Table 13-3 Parameters for the Oracle SOA Suite Application

Parameter Purpose

archetypeGroupId

The groupId of the archetype that you want to use to create the new SOA application. This must be com.oracle.soa as shown in the previous example.

archetypeArtifactId

The artifactId of the archetype that you want to use to create the new SOA application. This must be oracle-soa-application as shown in the previous example.

archetypeVersion

The version of the archetype that you want to use to create the new SOA application. This must be 12.2.1.0.0 as shown in the previous example.

groupId

The groupId for your new SOA application. This would normally start with your organization's domain name in reverse format.

artifactId

The artifactId for your new SOA application. This would normally be an identifier for this SOA application.

version

The version for your new SOA application. This would normally be 1.0-SNAPSHOT for a new project.

projectName

The name for the SOA project inside your new SOA application. This should be different to the name of the SOA application (artifactId).

You can also run the command without any arguments, as shown in the following example. In this case, Maven displays a list of available archetypes and prompts you to enter the required information.

mvn archetype:generate

After creating your application, it contains the following files, assuming you named your application my-soa-app and your project my-project, as shown in the previous example:

The generated project contains files and a handful of empty directories. The files are described in Table 13-4.

Table 13-4 Files Created for the Oracle SOA Suite Application and Project

File Purpose

pom.xml

The Maven Project Object Model (POM) file that describes your new application. It includes the Maven coordinates that you specified for your application, and a reference to the SOA project inside the application.

PROJECT/pom.xml

The Maven POM file that describes your new project. It includes the Maven coordinates that you specified for your project, and the appropriate plug-in definitions to use the SOA Maven Plug-in to build your project into a SAR file.

PROJECT/composite.xml

Composite metadata.

.adf/META-INF/adf-config.xml

The definitions for MDS repositories that may be needed to build your composites.

Others

The remainder are the standard files that are created in any new composite. These are the same files as you would find in a new SOA Application and SOA Project created in JDeveloper.

13.3 Creating a SOA Project in an Existing SOA Application from a Maven Archetype

You can create a new SOA project (in an existing SOA application) using the SOA Maven archetype.

To do so, execute a command similar to the following, while in the SOA application directory:

mvn archetype:generate
    -DarchetypeGroupId=com.oracle.soa.archetype
    -DarchetypeArtifactId=oracle-soa-project
    -DarchetypeVersion=12.2.1-0-0
    -DgroupId=org.mycompany
    -DartifactId=my-second-project
    -Dversion=1.0-SNAPSHOT

This command runs Maven's archetype:generate goal which allows you to create a new SOA Project from an archetype. Table 13-5 describes the parameters:

Table 13-5 Parameters for the Oracle SOA Suite Project

Parameter Purpose

archetypeGroupId

The groupId of the archetype that you want to use to create the new SOA application. This must be com.oracle.soa as shown in the previous example.

archetypeArtifactId

The artifactId of the archetype that you want to use to create the new SOA application. This must be oracle-soa-project as shown in the previous example.

archetypeVersion

The version of the archetype that you want to use to create the new SOA application. This must be 12.2.1.0.0 as shown in the previous example.

groupId

The groupId for your new SOA project. This would normally start with your organization's domain name in reverse format.

artifactId

The artifactId for your new SOA project. This would normally be an identifier for this SOA project.

version

The version for your new SOA project. This would normally be 1.0-SNAPSHOT for a new project.

You can also run the command without any arguments, as shown in the following example. In this case, Maven displays a list of available archetypes and prompts you to enter the required information.

mvn archetype:generate

After creating your new project, it contains the following files, assuming that you named your project my-second-project:

The generated project contains files and a handful of empty directories. The files are described in Table 13-4.

The mvn generate command also updates your SOA Application POM to add the new project. For example, if you created this project in the application in Creating a New SOA Application and Project from a Maven Archetype, you would see the following list in the SOA Application POM:

<modules>
  <module>my-project</module>
  <module>my-second-project</module>
</modules>

When you have a SOA Application with multiple SOA Projects like this (a Maven multi-module project), Maven builds your projects one by one, in the order they are listed in the SOA Application POM.

13.4 Editing Your SOA Application in Oracle JDeveloper

You can edit your SOA application in Oracle JDeveloper to configure SOA composites.

To edit your application, you open the project in Oracle JDeveloper, then edit the application:

  1. Open the File menu, then select Import….
  2. In the Import dialog box, select the Maven Project option and click OK.
  3. In the Root Directory field, enter the path to the application you want to import into JDeveloper.
  4. In the Settings File field, enter the path to your Maven settings.xml file. The default value is most likely correct unless you are using a non-standard location for your Maven settings file.
  5. Click Refresh to load a list of projects available at that location.
  6. Select the projects that you want to import. Also, select Also import source files into application and Update existing JDeveloper Projects to synch with imported POM files.
  7. Click OK to complete the import.

Your projects are then opened in JDeveloper.

13.5 Building Your SOA Project with Maven

After you have written your project code, you can use Maven to build the project.

To do so:

  1. To run the SCA validation on your project, execute this command:
    mvn compile
    
  2. To build the SAR file, execute this command:
    mvn package
    

13.6 What You May Need to Know About Building SOA Projects

Some SOA composite projects require access to an MDS repository in order to be built. This includes all composites that contain a Human Task or Business Rule component. These components refer to WSDL or XSD files, or both, in MDS.

To build these projects, you need to provide the build with access to an MDS repository. This can be either a file-based or a database-based MDS repository.

The MDS repository connection details are specified in the SOA Application/.adf/META-INF/adf-config.xml file. This means that any SOA Project which requires access to MDS must be located inside a SOA Application.

If you create a new project using the SOA Maven Application archetype or using JDeveloper, the adf-config.xml will contain the following default MDS repository configuration:

<metadata-store-usages>
  <metadata-store-usage id="mstore-usage_1">
    <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
      <property name="metadata-path" value="${oracleHome}/integration"/>
      <property name="partition-name" value="seed"/>
    </metadata-store>
  </metadata-store-usage>
</metadata-store-usages>

This example defines a file-based MDS repository in the location ${oracleHome}/integration. If you run this build in Maven, the oracleHome variable may not be defined. In that case, you need to specify it on the Maven command line, as shown in the following example:

mvn compile -DoracleHome=MW_HOME/soa -DappHome=dir_for_application_for_proj

Notice that the value of oracleHome points to the soa directory in the Oracle Home in which you installed the SOA Quickstart or JDeveloper. That directory contains the seed MDS repository.

Alternatively, you can just update the adf-config.xml file to provide the full path to the MDS repository that you want to use.

If you want to use a database-based MDS repository, you must alter the configuration to specify the JDBC values, similar to that shown in the following example:

<metadata-store-usage id="mstore-usage_1">
  <metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
     <property name="jdbc-userid" value="your_prefix_mds"/>
     <property name="jdbc-password" value="welcome1"/>
     <property name="jdbc-url" 
             value="jdbc:oracle:thin://@database.server:1521/service_name"/>
     <property name="partition-name" value="soa-infra"/>
  </metadata-store>
</metadata-store-usage>

13.7 Deploying Your SOA Project to the SOA Server with Maven

To deploy your SOA project to the SOA server with Maven, you deploy the SAR file and edit the project POM.

To deploy the SAR file, execute the following command:

mvn pre-integration-test

Table 13-6 describes the parameters that you can specify for the deployment. These may be specified either in the POM file for the project or on the command line.

Table 13-6 Parameters for Deploying a SOA Project

Parameter Purpose

serverURL

The URL of the Administration Server in the SOA domain.

sarLocation

The location of the SAR file.

overwrite

Whether deployment should overwrite any existing composite with the same revision.

configplan

(Optional) The name of the SOA configuration plan to use, if any.

forceDefault

Whether deployment should make this revision the default revision.

regenerateRuleBase

Whether the base rule dictionary should be regenerated.

composite.partition

The SOA partition that the composite will be deployed into.

user

User name to be used for deployment.

password

Password to be used for deployment.

To specify the parameters:

  • On the command line: Use the format -Dparameter=value, as shown in this example (note that the whole command would be entered on one line):

    mvn pre-integration-test -DserverURL=http://test.server:7001
                             -DsarLocation=deploy/sca_my-project_rev1.0.sar
                             -Doverwrite=true
                             -DforceDefault=true
                             -Dcomposite.partition=test
                             -Duser=weblogic
                             -Dpassword=welcome1
    
  • In your project POM file: Specify replacement values for the defaults already specified in the parameters section of the project POM:

    <properties>
            <!-- these parameters are used by the compile goal -->
            <scac.input.dir>${project.basedir}/SOA/</scac.input.dir>
            <scac.output.dir>${project.basedir}/target</scac.output.dir>
            <scac.input>${scac.input.dir}/composite.xml</scac.input>
            <scac.output>${scac.output.dir}/out.xml</scac.output>
            <scac.error>${scac.output.dir}/error.txt</scac.error>
            <scac.displayLevel>1</scac.displayLevel>
            <!-- if you are using a config plan, uncomment the following line and update to point
                 to your config plan -->
            <!--<configplan>${scac.input.dir}/configplan.xml</configplan>-->
            <!-- these parameters are used by the deploy and undeploy goals -->
            <composite.name>${project.artifactId}</composite.name>
            <composite.revision>1.0</composite.revision>
            <composite.partition>default</composite.partition>
            <serverUrl>${oracleServerUrl}</serverUrl>
            <user>${oracleUsername}</user>
            <password>${oraclePassword}</password>
            <overwrite>true</overwrite>
            <forceDefault>true</forceDefault>
            <regenerateRulebase>false</regenerateRulebase>
            <keepInstancesOnRedeploy>false</keepInstancesOnRedeploy>
            <!-- these parameters are used by the test goal -->
            <!-- if you are using the sca-test (test) goal, you need to uncomment 
                 the following line and point it to your jndi.properties file. -->
           <!--<jndi.properties.input>${basedir}/jndi.properties</jndi.properties.input>-->
            <scatest.result>${scac.output.dir}/testResult</scatest.result>
            <!--  input is the name of the composite to run test suites against -->
            <input>project12</input>
    </properties>
    

13.8 Running SCA Test Suites with Maven

You can run SCA test suites with Maven.

To execute your SCA Test Suites as part of the Maven build process:

  1. Create a jndi.properties file (as you would if you were executing SCA Test Suites from ANT, for example) in your SOA composite project directory. This file contains the following information:
    java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
    java.naming.provider.url=t3://test.server:7003/soa-infra
    java.naming.security.principal=weblogic
    java.naming.security.credentials=welcome1
    dedicated.connection=true
    dedicated.rmicontext=true
    
  2. Uncomment the jndi.properties entry in the SOA composite project POM (pom.xml) and ensure that it points to the file you just created.
  3. The SOA Maven Plug-in executes the SCA Tests in the integration-test phase. To compile and package your composite, deploy it to a server and run the SCA Tests, execute this command:
    mvn verify
    

13.9 What You May Need to Know About Deploying SOA Composites

When you create a SOA composite, you may use new resources, such as WebLogic data sources, JMS queues, and Topics. These resources may not be present in the runtime environment where you want to deploy your composite. This means that you may not be able to successfully execute any instances of your composite, for example to run test cases.

While it is possible to manually create these resources through the WebLogic console, this would not be appropriate for an automated build environment. To address this issue, you can create WLST scripts and execute them as part of the build to ensure that any necessary resources are created and configured on the runtime environment. You can execute the WLST scripts at the appropriate time in your build using the weblogic-maven-plugin:wlst goal.

The following is an example of a WLST script to create a data source. You could add it to your project as misc/create-datasource.py:

# Copyright 2012, 2014 Oracle Corporation.
# All Rights Reserved.
#
# Provided on an 'as is' basis, without warranties or conditions of any kind,
# either express or implied, including, without limitation, any warranties or
# conditions of title, non-infringement, merchantability, or fitness for a
# particular purpose. You are solely responsible for determining the
# appropriateness of using and assume any risks. You may not redistribute.
#
# This WLST script can be used as part of a continuous integration build process
# before deploying a SCA composite, to create any necessary Java EE data sources
# on the WebLogic Server.
#
# In addition to creating the data source, this script will also update the
# resource adapter and redeploy it.

import time

#
# These are the parameters that you need to edit before running this script
#

# admin server url
url                  = 't3://localhost:7001'
# username to connect to the admin server
username             = 'weblogic'
# password to connect to the admin server
password             = 'mypassword'
# the name for the EIS - as defined in the DB Adapter wizard in JDEV
eisName              = 'eis/db/myDS'
# the admin or managed server to target where the DbAdapter is deployed
serverName           = 'soa_server1'
# the name for the data source
dsName               = 'myDS'
# the JNDI name for the data source
jndiName             = 'jbdc/myDS'
# the database url for the data source
dbUrl                = 'jdbc:oracle:thin:@localhost:1521:orcl'
# the database user
dbUser               = 'mark'
# the database password
dbPassword           = 'mypassword'
# the database driver to use
dbDriver             = 'oracle.jdbc.xa.client.OracleXADataSource'
# the host where node manager is running
nmHost               = 'localhost'
# the port to connect to node manager (5556 is default for plain mode)
nmPort               = '5556'
# the user to connect to node manager
nmUser               = 'weblogic'
# the password to connection to node manager
nmPassword           = 'mypassword'
# the name of the weblogic domain
domain               = 'base_domain'

# don't change these ones
uniqueString         = ''
appName = 'DbAdapter'
moduleOverrideName   = appName+'.rar'
moduleDescriptorName = 'META-INF/weblogic-ra.xml'

#
# method definitions
#
def makeDeploymentPlanVariable(wlstPlan, name, value, xpath, origin='planbased'):
  """Create a variable in the Plan.
  This method is used to create the variables that are needed in the Plan in order
  to add an entry for the outbound connection pool for the new data source.
  """

  try:
    variableAssignment = wlstPlan.createVariableAssignment(name, moduleOverrideName, moduleDescriptorName)
    variableAssignment.setXpath(xpath)
    variableAssignment.setOrigin(origin)
    wlstPlan.createVariable(name, value)

  except:
    print('--> was not able to create deployment plan variables successfully')

def main():

  print ' Copyright 2012, 2014 Oracle Corporation. '
  print ' All Rights Reserved. '
  print ''
  print ' Provided on an ''as is'' basis, without warranties or conditions of any kind, '
  print ' either express or implied, including, without limitation, any warranties or '
  print ' conditions of title, non-infringement, merchantability, or fitness for a '
  print ' particular purpose. You are solely responsible for determining the '
  print ' appropriateness of using and assume any risks. You may not redistribute.'
  print ''
  print ' This WLST script can be used as part of a continuous integration build process'
  print ' before deploying a SCA composite, to create any necessary Java EE data sources'
  print ' on the WebLogic Server.'
  print ''
  print ' In addition to creating the data source, this script will also update the '
  print ' resource adapter and redeploy it.'
  print ''
  print ' !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!'
  print ''
  print ' This script will make changes to your WebLogic domain.  Make sure you know '
  print ' what you are doing.  There is no support for this script.  If something bad '
  print ' happens, you are on your own!  You have been warned.'

  #
  # generate a unique string to use in the names
  #

  uniqueString = str(int(time.time()))


  #
  # Create a JDBC Data Source.
  #
  try:
    print('--> about to connect to weblogic')
    connect(username, password, url)
    print('--> about to create a data source ' + dsName)
    edit()
    startEdit()
    cmo.createJDBCSystemResource(dsName)
    cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName)
    cmo.setName(dsName)
    cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName + '/JDBCDataSourceParams/' + dsName)
    set('JNDINames',jarray.array([String(jndiName)], String))
    cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName + '/JDBCDriverParams/' + dsName)
    cmo.setUrl(dbUrl)
    cmo.setDriverName(dbDriver)
    cmo.setPassword(dbPassword)
    cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName + '/JDBCConnectionPoolParams/' + dsName)
    cmo.setTestTableName('DUAL')
    cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName + '/JDBCDriverParams/' + dsName + '/Properties/' + dsName)
    cmo.createProperty('user')
    cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName + '/JDBCDriverParams/' + dsName + '/Properties/' + dsName + '/Properties/user')
    cmo.setValue(dbUser)
    cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName + '/JDBCDataSourceParams/' + dsName)
    cmo.setGlobalTransactionsProtocol('TwoPhaseCommit')
    cd('/JDBCSystemResources/' + dsName)
    set('Targets',jarray.array([ObjectName('com.bea:Name=' + serverName + ',Type=Server')], ObjectName))
    save()
    print('--> activating changes')
    activate()
    print('--> done')

#
# update the deployment plan
#
    print('--> about to update the deployment plan for the DbAdapter')
    startEdit()
    planPath = get('/AppDeployments/DbAdapter/PlanPath')
    appPath = get('/AppDeployments/DbAdapter/SourcePath')
    print('--> Using plan ' + planPath)
    plan = loadApplication(appPath, planPath)
    print('--> adding variables to plan')
    makeDeploymentPlanVariable(plan, 'ConnectionInstance_eis/DB/' + dsName + '_JNDIName_' + uniqueString, eisName, '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="' + eisName + '"]/jndi-name')
    makeDeploymentPlanVariable(plan, 'ConfigProperty_xADataSourceName_Value_' + uniqueString, eisName, '/weblogic-connector/outbound-resource-adapter/connection-definition-group/[connection-factory-interface="javax.resource.cci.ConnectionFactory"]/connection-instance/[jndi-name="' + eisName + '"]/connection-properties/properties/property/[name="xADataSourceName"]/value')
    print('--> saving plan')
    plan.save();
    save();
    print('--> activating changes')
    activate(block='true');
    cd('/AppDeployments/DbAdapter/Targets');
    print('--> redeploying the DbAdapter')
    redeploy(appName, planPath, targets=cmo.getTargets());
    print('--> done')

  except:
    print('--> something went wrong, bailing out')
    stopEdit('y')
    raise SystemExit

  #
  # disconnect from the admin server
  #

  print('--> disconnecting from admin server now')
  disconnect()

#
#  this is the main entry point

main()

To execute this script during the pre-integration-test phase of your build, you would include a plugin section similar to the following in your SOA Project POM:

<plugin>
  <groupId>com.oracle.weblogic</groupId>
  <artifactId>weblogic-maven-plugin</artifactId>
  <version>12.2.1-0-0</version>
  <executions>
    <execution>
      <id>wlst-create-datasource</id>
      <phase>pre-integration-test</phase>
      <goals>
        <goal>wlst</goal>
      </goals>
      <configuration>
        <middlewareHome>c:/wls1212</middlewareHome>
        <fileName>${project.basedir}/misc/create-datasource.py</fileName>
      </configuration>
    </execution>
  </executions>
</plugin>

13.10 What You May Need to Know About ADF Human Task User Interface Projects

If you add an ADF Human Task User Interface project to your SOA Application in JDeveloper, the application level POM is updated to add the new ADF project as a module and some <plugin> definitions are added to the <build> section to build the ADF project.

When you create an ADF Human Task project, some JDeveloper libraries are added to the build path for that project in JDeveloper. Additionally, JDeveloper checks to see if there are matching POMs for those libraries in your local Maven repository. If not, it creates those POMs for you. These new library POMs (if any are needed) are created with the Maven groupId = com.oracle.adf.library.

Note that the Maven repository used by JDeveloper can be specified in Tools/Preferences/Maven/Repository; it may not be the default repository in $HOME/.m2.

Note the following:

  • If you want to build these ADF Human Task projects on another machine, for example, a build server, which is using a different Maven repository (local or remote), copy these new POMs to that Maven repository.

  • The server on which you build the ADF Human Task projects must have access to a JDeveloper installation, because the ojdeploy Maven plug-in, which is used to package the ADF project into an EAR file, depends on the JDeveloper Oracle Home being present.

  • If you want to deploy the EAR file as part of the application build, you need to add a new <plugin> section to invoke the weblogic-maven-plugin:deploy goal in the appropriate phase of your build, most likely pre-integration-test. Note that the EAR file is located in the appHome/deploy directory, not in the ADF project's directory. This is due to the fact that a single EAR file may contain multiple ADF Human Task project WAR files.

  • If you target the deployment to the SOA server (as shown in the following example), the ADF URI is automatically registered in the appropriate MBean so that the SOA or BPM Workspace application can find it.

    <plugin>
      <groupId>com.oracle.weblogic</groupId>
      <artifactId>weblogic-maven-plugin</artifactId>
      <version>12.2.1-0-0</version>
      <executions>
        <execution>
          <goals>
            <goal>deploy</goal>
          </goals>
          <phase>pre-integration-test</phase>
          <configuration>
            <adminurl>t3://localhost:7001</adminurl>
            <user>weblogic</user> 
            <password>password</password>
            <source>${project.basedir}/deploy/adf1.ear</source>
            <verbose>true</verbose> 
            <name>${project.build.finalName}</name>
            <targets>soa_server1</targets>
          </configuration>
        </execution>
      </executions>
    </plugin>
    
  • To be able to deploy the EAR file, you also need to set up the appropriate MDS configuration in appHome/.adf/META-INF/adf-config.xml. This is most likely a database-based MDS store, as shown in What You May Need to Know About Building SOA Projects. For the build to work correctly, and the deployed application to function correctly, this database must be accessible from both the build server and the runtime server. This may not be practical in production environments, so you may need to define multiple deployment profiles for the ADF project.

13.11 Undeploying Your SOA Project

You can undeploy your composite using the undeploy goal.

Table 13-7 describes the parameters for the undeploy command:

Table 13-7 Parameters for the Undeploy Goal

Parameters Purpose

composite.name

The name of the composite you want to undeploy.

composite.revision

The revision of the composite you want to undeploy.

composite.partition

The partition that holds the composite you want to undeploy.

user

User name to be used for undeployment.

password

Password to be used for undeployment.

To undeploy a SAR file, execute the following command, specifying the appropriate values for your environment. Enter this command on one line.

mvn com.oracle.soa.plugin:oracle-soa-plugin:undeploy
    -DserverURL=http://test.server:7001
    -Dcomposite.name=my-project
    -Dcomposite.revision=1.0
    -Dcomposite.partition=test
    -Duser=weblogic
    -Dpassword=welcome1

You should run the undeploy goal against a SOA Project, not a SOA Application.

13.12 What You May Need to Know About the SOA Parent POM

The SOA Parent POM is provided as a point of customization. It has Maven coordinates com.oracle.soa:sar-common:12.2.1-0-0. If you want to set some environment-wide defaults, for example, the URL, user name, and password for your test server, then you can put these in the SOA Parent POM. The SOA Parent POM is provided as a point of customization. It has Maven coordinates com.oracle.soa:sar-common:12.2.1-0-0. If you want to set some environment-wide defaults, for example, the URL, user name, and password for your test server, then you can put these in the SOA Parent POM.

The SOA Parent POM contains the following properties:

<properties>
  <!--
  These two properties are defined in com.oracle.maven:oracle-common, you can overwrite them here.
  Users who do not want to add plain text password in their properties or pom
  file, should use the userConfigFile and userKeyFile options for deployment.
  <oracleUsername>USERNAME</oracleUsername>
  <oraclePassword>PASSWORD</oraclePassword>
  -->

  <!-- Change the default values according to your environment -->
  <oracleServerUrl>http://localhost:8001</oracleServerUrl>
  <oracleServerName>soa_server1</oracleServerName>
  <oracleMiddlewareHome>/home/myhome/Oracle/Middleware</oracleMiddlewareHome>
</properties>

You can set these properties, or define any other properties that you want to have available to SOA Projects. To refer to a property in your SOA Project POM, use the syntax $propertyName, for example. $oracleServerName would be replaced with soa_server1 in the previous example.