October 10 2017

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%\osb\plugins\maven\com\oracle\servicebus\sbar-project-common\12.2.1.2\sbar-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.

   <parent>
        <groupId>com.oracle.maven</groupId>
        <artifactId>oracle-common</artifactId>
        <version>12.2.1-2-0</version>
    </parent>

oracle-servicebus-plugin-12.2.1.2.pom

This POM can be found in: "%ORACLE_HOME%\osb\plugins\maven\com\oracle\servicebus\plugin\oracle-servicebus-plugin\12.2.1.2\oracle-servicebus-plugin-12.2.1.2.pom".  Change the client artifact dependency versionId, as shown below.

    <dependency>
        <groupId>com.oracle.servicebus</groupId>
        <artifactId>client</artifactId>
        <version>12.2.1-2-0</version>
        <type>pom</type>
    </dependency>

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 

 

About the Author

Greg Hughlett

Greg has more than twenty-five years of experience in all phases of design, development, and implementation of software applications.  He has developed and architected BPM/SOA technologies for more than ten of those years from Fuego BPM to BEA AquaLogic BPM to Oracle BPM/SOA 11g.  He has worked for clients within banking, financial services, Life Insurance,  Health Care, public sector and telecommunications industries.  His areas of expertise include Oracle SOA and Oracle BPM (formerly AquaLo

Join the Conversation

Enter your first name. It will only be used to display with your comment.
Enter your email. This will be used to validate you as a real user but will NOT be displayed with the comment.
By submitting this form, you accept the Mollom privacy policy.