Wednesday, October 2, 2024

Maven script to deploy MDS (Metadata Services) artifacts in a SOA 12.2.1.4

To create a Maven script to deploy MDS (Metadata Services) artifacts in a SOA 12.2.1.4 environment, you need to use the oracle-maven-sync configuration and Oracle's oracle-maven-plugin to manage the deployment. Below is a sample pom.xml setup and a script to achieve this.

Click here for the above step which is a prerequisite

Prerequisites

  1. Make sure the Oracle SOA 12.2.1.4 Maven plugin is installed in your local repository or is accessible through a corporate repository.
  2. Your environment should have Oracle WebLogic and SOA Suite 12.2.1.4 configured properly.
  3. Oracle MDS repository should be set up and accessible.

Maven pom.xml Configuration

Here’s a sample pom.xml file for deploying an MDS artifact using Maven:

xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.example</groupId> <artifactId>soa-mds-deployment</artifactId> <version>1.0-SNAPSHOT</version> <packaging>pom</packaging> <properties> <!-- Update with your SOA and WebLogic version --> <oracle.soa.version>12.2.1.4</oracle.soa.version> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> </properties> <dependencies> <dependency> <groupId>oracle.soa.common</groupId> <artifactId>oracle-soa-maven-plugin</artifactId> <version>${oracle.soa.version}</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>oracle.soa.common</groupId> <artifactId>oracle-soa-maven-plugin</artifactId> <version>${oracle.soa.version}</version> <configuration> <!-- Configuration for the SOA MDS deployment --> <action>deploy</action> <repositoryName>mds-soa</repositoryName> <sourcePath>src/main/resources/mds/</sourcePath> <serverURL>t3://<admin-server-host>:<admin-server-port></serverURL> <username>weblogic</username> <password>your_weblogic_password</password> <partition>soa-infra</partition> </configuration> </plugin> </plugins> </build> <profiles> <profile> <id>soa-mds-deploy</id> <build> <plugins> <plugin> <groupId>oracle.soa.common</groupId> <artifactId>oracle-soa-maven-plugin</artifactId> <executions> <execution> <goals> <goal>deploy</goal> </goals> </execution> </executions> <configuration> <!-- MDS repository configuration --> <repositoryName>mds-soa</repositoryName> <serverURL>t3://<admin-server-host>:<admin-server-port></serverURL> <username>weblogic</username> <password>your_weblogic_password</password> <partition>soa-infra</partition> <sourcePath>src/main/resources/mds/</sourcePath> </configuration> </plugin> </plugins> </build> </profile> </profiles> </project>

Folder Structure

Ensure your project directory is structured like this:

css
. ├── pom.xml └── src └── main └── resources └── mds └── your_mds_artifacts

Place your MDS artifacts (e.g., .xml or .wsdl files) in the src/main/resources/mds/ folder.

Maven Command

To deploy the MDS artifacts, use the following command:

bash
mvn clean install -Psoa-mds-deploy

Key Points

  1. repositoryName: The MDS repository name (mds-soa) should match the target repository configured in your SOA environment.
  2. serverURL: Replace <admin-server-host> and <admin-server-port> with your WebLogic Admin server’s host and port.
  3. username/password: Use the WebLogic Admin credentials to authenticate the deployment.
  4. sourcePath: Specify the folder containing your MDS artifacts.

This script configures a Maven build to deploy MDS artifacts to your SOA 12.2.1.4 environment. If you encounter specific errors during deployment, check the logs on the Admin server to ensure correct configurations.

Maven script to deploy MDS (Metadata Services) artifacts in a SOA 12.2.1.4

To create a Maven script to deploy MDS (Metadata Services) artifacts in a SOA 12.2.1.4 environment, you need to use the oracle-maven-sync c...