Overview

Although the SOA and OSB Maven artifacts provided in the 12.2.1.2 release are much improved from what was released in 12.2.1.1, this topic provides some additional tweeks needed to get an OSB project to build and deploy with Maven.

There are two OSB 12.2.1.2 POM’s in the installed FMW Middleware home that need to be corrected.  The changes described here will be made in the Middleware home and not in the local Maven repository, in the event you have not run the Oracle Sync:Push yet.  However, if you have already run Sync:Push then the deploy-file section at then end of the blog will correct the faulty POMs in your managed Maven repo.  (If you’re using a local Maven repository then simply change the POMs in the local repo and you’re done.) 

Note: The ORACLE_HOME environment variable is set in the examples below to the installed FMW Middleware home.  The POM files to be corrected have periods in the file name and don’t reflect the files deployed to the Maven repo, which contain hyphenated minor release and revision numbers.   

sbar-project-common-12.2.1.2.pom

Modify the POM in: “%ORACLE_HOME%osbpluginsmavencomoracleservicebussbar-project-common12.2.1.2sbar-project-common-12.2.1.2.pom”.  

The POM parent element was referencing 12.2.1-1-0 but needs to be changed to 12.2.1-2-0, as shown below.

   
        com.oracle.maven
        oracle-common
        12.2.1-2-0
    

oracle-servicebus-plugin-12.2.1.2.pom

This POM can be found in: “%ORACLE_HOME%osbpluginsmavencomoracleservicebuspluginoracle-servicebus-plugin12.2.1.2oracle-servicebus-plugin-12.2.1.2.pom”.  Change the client artifact dependency versionId, as shown below.

    com.oracle.servicebusclient12.2.1-2-0pom

Deploy-File Maven Scripts

If you’ve made the  above changes before running the Sync:Push tool then you’re done.  However, if you have already run Sync:Push then the deploy-file commands below (formatted for Windows) can be run after the fact, to correct the POMs on the managed Maven repo.   

sbar-project-common-12.2.1-2-0.pom

  • In the directory where you changed the POM, make a copy of the POM: “copy sbar-project-common-12.2.1.2.pom sbar-project-common-12.2.1-2-0.pom” to create a version with the hyphenated POM name.

  • Change the “url” element to your managed repository.

  • There is no JAR file associated with this deploy so the generatePom is set and the file references the copied POM.
mvn deploy:deploy-file ^
  -Durl=http://your-server:8081/artifactory/FmwRepository ^
  -Dfile=%ORACLE_HOME%/osb/plugins/maven/com/oracle/servicebus/sbar-project-common/12.2.1.2/sbar-project-common-12.2.1-2-0.pom ^
  -DgroupId=com.oracle.servicebus ^
  -DartifactId=sbar-project-common ^
  -DgeneratePom=false ^
  -Dversion=12.2.1-2-0

 

oracle-servicebus-plugin-12.2.1-2-0.pom

  • In the directory where you changed the POM, make a copy of the POM, to create a file with the hyphenated file name to be deployed: “copy oracle-servicebus-plugin-12.2.1.2.pom oracle-servicebus-plugin-12.2.1-2-0.pom“. 
  • Change the “url” element to your managed repository.
  • There is a JAR file associated with the POM but it should be good to go, so the generatePom is set and the file references the copied POM. 
mvn deploy:deploy-file ^
  -Durl=http://your-server:8081/artifactory/FmwRepository ^
  -Dfile=%ORACLE_HOME%/osb/plugins/maven/com/oracle/servicebus/plugin/oracle-servicebus-plugin/12.2.1.2/oracle-servicebus-plugin-12.2.1-2-0.pom ^
  -DgroupId=oracle-servicebus-plugin ^
  -DartifactId=oracle-servicebus-plugin ^
  -DgeneratePom=false ^
  -Dversion=12.2.1-2-0 

 

Join the Conversation

About the Author