Oracle Fusion Middleware 12C: Deploy the MDS using Maven

In two previous posts here and here, I demonstrated how you can setup CI for OFM 12C projects. One of the things I hadn’t figured out yet was how I could deploy the MDS using Maven. After a vague hint on the internet, Oracle’s response that this feature wasn’t officially supported yet and some trial and error I came across the solution. It is actually quite simple.

Basically it comes down to this:

  • Create a zip file of the files you want to stick into the MDS
  • Use the maven goal to deploy it

That wasn’t that hard as you can see πŸ™‚ Let’s go into a bit more detail. You can use a command line to create the zip or use the maven-assembly-plugin to give you a bit more flexibility. I used the last option because I wanted to filter certain files. Within my Jenkins job, I checked out my MDS files and zipped them using the package goal into a file called sca-MDS_rev1.0.jar. Look in the plugin section in the pom file down below to see about the configuration of the assembly plugin. The pom file is just a copy of a normal soa composite project.

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="" xmlns="" xmlns:xsi="">
           This POM was automatically generated during SOA project creation.           
           This POM relates to this SOA Composite, i.e. the one in this same directory.
           There is another POM in the SOA Application directory which handles
           the whole SOA Application, which may contain additional projects. 
           The parent points to the common SOA parent POM.  That is a special POM that is
           shipped by Oracle as a point of customization (only). You can add default values
           for properties like serverUrl, etc. to the SOA common parent POM, so that you
           do not have to specify them over and over in every project POM.
        <!-- These parameters are used by the compile goal -->
        <!-- if you are using a config plan, uncomment the following line and update to point
             to your config plan -->
        <!-- These parameters are used by the deploy and undeploy goals --> 
        <!-- 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 file. --> 
        <!--  input is the name of the composite to run test suties against -->
                    <!-- Note: compositeRevision is needed to package, revision is needed to undeploy -->
                <!-- extensions=true is needed to use the custom sar packaging type -->
	    <!-- plugin om te zorgen dat de apps directory gezipt wordt voor de MDS -->

Here is the zip-assembly-descriptor.xml

<assembly xmlns="" xmlns:xsi=""

As you can see I create a jar which includes my services and dvm directory. One thing to take in account is that you don’t need an apps directory in the zip. At first I created an apps directory as a top directory but when I deployed this, my MDS had a apps/apps structure so I removed this. My sca-MDS_rev1.0.jar has the following structure:


The only now left to do is to point the ${scac.output.dir}/sca-${project.artifactId}_rev${composite.revision}.jar in the pom to the right location where your jar file is located.

When you run the goal, maven will deploy you MDS jar like this:

[INFO] --- maven-assembly-plugin:2.4.1:single (make-assembly) @ MDS ---
[INFO] Reading assembly descriptor: zip-assembly-descriptor.xml
[INFO] Building jar: D:\tomcatfiles\.jenkins\jobs\SOA - MDS\workspace\MDS\soa\MDS\target\sca-MDS_rev1.0.jar
[INFO] --- oracle-soa-plugin:12.1.3-0-0:deploy (default-cli) @ MDS ---
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] setting user/password..., user=weblogic
Processing sar=D:\tomcatfiles\.jenkins\jobs\SOA - MDS\workspace\MDS\soa\MDS/target/sca-MDS_rev1.0.jar
Adding shared data file - D:\tomcatfiles\.jenkins\jobs\SOA - MDS\workspace\MDS\soa\MDS\target\sca-MDS_rev1.0.jar
INFO: Creating HTTP connection to host:MY_SERVER, port:7010
INFO: Received HTTP response from the server, response code=200
---->Deploying composite success.
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.313 s

[INFO] Finished at: 2015-05-23T02:59:22+02:00
[INFO] Final Memory: 36M/360M
[INFO] ------------------------------------------------------------------------
[workspace] $ cmd /c call D:\ProgramFiles\Apache\Tomcat8.0\temp\hudson4288153212971789360.bat
channel stopped

10 Replies to “Oracle Fusion Middleware 12C: Deploy the MDS using Maven”

  1. Pingback: SOA & BPM Community Newsletter June 2015 | SOA Community Blog

  2. Pingback: Fusion Middleware 12C: Deploy the MDS using Maven by Hugo Hendriks | SOA Community Blog

  3. This step is not clear. could you please explain
    ${scac.output.dir}/sca-${project.artifactId}_rev${composite.revision}.jar in the pom to the right location where your jar file is located.

    • If you look at the properties in the pom file, you can see that scac.output.dir equals ${project.basedir}/target. So it basically points to the target directory where your compiled jar has to be created. Next you have to define a name for the jar. That is done by stating sca-${project.artifactId}_rev${composite.revision}.jar. This creates a name sca-MDS_rev1.0.jar in my case as my project.artifactId = MDS and composite.revision = 1.0.

      • Hi Hugo,
        Is there any way to verify this deployed MDS jar.
        If possible can you share the video of this blog, because i followed the same steps with success response, but i am not able to see the MDS artifacts in my local host. Here are the steps i followed
        1. create an empty soa project
        2. generate the maven – project pom.xml
        3. modify the project pom by adding the maven-assembly-plugin
        4.created a new file zip-assembly-descriptor.xml in the same place of pom.xml
        5. now ran the mvn package from the project directory which creates the Jar file
        6. ran the “mvn oracle-soa:deploy -DoracleServerUrl=http://localhost:8101 -Duser=Weblogic -Dpassword=welcome1 -DsarLocation=target/sca-MDS_rev1.0.jar” for which build is shown success
        But when i try to export the MDS to verify this in my local host its been errored out.


  4. Hi Hugo,

    Sorry to revive an old blog post.

    Does this approach still work with newer releases – say – of FMW? I generated a jar as described but deployment fails with the server complaining that there is no composite.xml in the jar.

    • Hi Bijesh,

      I don’t know tbh….we are currently starting the upgrade to and going to find out what we need to change for our build pipeline….so if you find a solution. Let me know. Ill also post it if we find one.

      • I am raising an SR with Oracle to see if they can help – although I doubt it given the official position is that you cannot deploy to MDS using Maven.

        Also an off-topic note: SOA no longer deploys any SCA archives that don’t have the “sca_” prefix. πŸ™‚ . It’s a bit weird because Maven gets back a HTTP 200 status although the server completely ignores the jar. Deploying through EM throws an invalid archive error.

        • Seems there is still some work to do πŸ™‚ Thanks voor de heads-up on the SCA’s. If we get any progress on this, I will post it here.

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.