SOA 12c – Using Maven for Service Bus deployment

In this post, we will see creation of Service Bus application and projects using maven archetypes. And we will use local Maven Repository for demonstration.

Generate Service Bus Application and Project as shown below.

mvn archetype:generate -DarchetypeArtifactId=oracle-servicebus-application -DarchetypeVersion=12.1.3-0-0 -DartifactId=test-servicebus-application -DprojectName=test-servicebus-project -Dversion=1.0-SNAPSHOT

Import this maven project in JDeveloper using the steps mentioned below. Select File –> Import and select Maven Project option and click OK.





Open application level POM file in Application Resources directory as shown below and observe the details.



Open project level POM file and observe the details.


Open System level POM file and observe the details.


Add plugin and other server details in project level POM files (both System and Service Bus Project) as shown below. Remember using the Admin Server port as the server url.


You can generate the sbar file for your Service Bus Projects using mvn package (from directory of Service Bus Application) and can be found in <<project>>/.data/ maven.


Deploy your Service Bus projects using mvn pre-integration-test (from Service Bus application directory).


You can execute Service Bus Plugin goals in following manner from directory containing project POM file.



You can observe goal prefix as servicebus, when you describe Service Bus Plugin as shown below.


so you can execute all goals simply using this goal prefix as below.

mvn servicebus:package

mvn servicebus:deploy**


**Currently facing issue with deploy goal.



  • Use double quotes in the maven commands like below if you are seeing the error mentioned in think link.

mvn install:install-file “-DpomFile=oracle-maven-sync-12.1.3.pom” “-Dfile=oracle-maven-sync-12.1.3.jar” “-DoracleHome=C:/Oracle/Middleware/FMW1213New”

  • Seems to be OSB maven functionality is broken in 12.2.1. Refer to following blog talking about this.


10 Responses to “SOA 12c – Using Maven for Service Bus deployment”

  1. 1 Yang Yang August 17, 2018 at 6:11 PM

    Hi Siva,

    Thank you for the informative post. If we want to put a description as part of the deployment of OSB project so that it shows in the change center, are we able to do that with Maven? Thank you.


  2. 2 Adrian MP July 22, 2017 at 1:34 AM


    Thanks for the great post.
    Is it possible to use maven to set some values using typical maven profile? I mean values like values of DVM.


  3. 3 srikanthreddykv May 5, 2017 at 5:25 PM

    Hi Siva, nice post. I am able to package the application but unable to deploy it and getting below error.

    Failed to execute goal nl.whitehorses.servicebus:servicebus-plugin:1.1:deploy-assembly (deploy-assembly) on project Assembly: Unable to read artifact [C:\JDeveloper\maven-archetypes\mywork\OIDXExtensions\Assembly\target\sbconfig.sbar]: failed to unmarshal class java.lang.Object; nested exception is: java.lang.ClassNotFoundException: Failed to load class

    Tried too many ways and followed below approach too.

    I don’t know, where I am missing? Unable to figure it out. Any alternate suggestion is much appreciated. Thanks…

    • 4 svgonugu May 8, 2017 at 9:35 AM

      whats the command you are using?

      • 5 srikanthreddykv May 25, 2017 at 3:42 PM

        Thanks for your time.
        I have used “mvn clean pre-integration-test” command to deploy artifacts to sbconsole.
        By the way, now, I am able to deploy it successfully.
        The problem is with my Middleware Home. Something missed from there. I have tested on another machine. Now I am able to deploy it.

        But I am unable to undeploy it. Is there any way to do it. Thanks in advance.

      • 6 srikanthreddykv June 16, 2017 at 2:23 PM

        Hi Shiva, I could not find “undeploy” goal anywhere. Could you please provide scripts for UNDEPLOY the servicebus application? Thanks in advance.

        When I tried with below command, I got error message like:
        Could not find goal ‘undeploy’ in plugin among available goals deploy, package -> [Help 1]

        Command: mvn -DoracleServerUrl=t3://localhost::7001 -DoracleUsername=weblogic -DoraclePassword=password -DconfigJar=/target/sbconfig.sbar

  4. 7 Sheerish Tanwar May 13, 2016 at 3:57 PM

    Hi Siva,

    Did you get any fix for mvn servicebus:deploy goal.
    I am able to run package goal but it is failing while executing the deploy goal.

  5. 9 Raj April 18, 2016 at 3:26 AM


    Using Maven can we create jar for individual components like only selected proxy service and few XQueries?


  1. 1 SOA 12c – Maven Articles | Siva's Blog Trackback on September 1, 2015 at 11:36 AM

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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


Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 379 other subscribers

Enter your email address to follow this blog and receive notifications of new posts by email.

%d bloggers like this: