X

The Integration blog covers the latest in product updates, best practices, customer stories, and more.

  • October 8, 2015

SOACS plus DevCS - Chapter 12

In this series of posts and videos, we will explore creating and deploying a SOA composite using Oracle Developer Cloud Service.


< Previous Chapter | Next Chapter >


Chapter 12 - Populating Remote Maven Repository

If you followed a previous chapter, you should have your local Maven repository populated with the necessary SOA binaries. In order to build on the cloud, the project's remote Maven repository needs to be seeded with the same binaries. We can use the same sync plugin to achieve this.

First, in a pom.xml or preferably settings.xml, configure a repository and a server. An example of this is shown at 0:25 of the video. The important part is that the child "id" tag of the "server" tag match the reference of the child "id" tag of the "repository" tag. Secondly, if you put the "repository" tag inside a profile tag, make note of the child "id" tag.

Now we are ready to deploy the plugin to the remote repository (the red text denotes the values that must match in your pom.xml or settings.xml):

mvn deploy:deploy-file \

-DpomFile=${MW_HOME}/oracle_common/plugins/maven/com/oracle/maven/oracle-maven-sync/12.1.3/oracle-maven-sync-12.1.3.pom \

-Dfile=${MW_HOME}/oracle_common/plugins/maven/com/oracle/maven/oracle-maven-sync/12.1.3/oracle-maven-sync-12.1.3.jar \

-DrepositoryId=MavenRepositoryForStoreBackendProject \

-Durl=https://oracle-cloud-url/your-project/maven/

Finally, we use the "push" goal of the sync plugin to push the changes to the remote Maven repository (again, the red text denotes the values that must match in your pom.xml or settings.xml.  The -P is because I put the repository tag in a profile.  Just note that there are other ways to get the repository information to Maven; in fact, we will use a different way in the next chapter.  The reason I used settings.xml here is to avoid editing multiple files in the video):

mvn com.oracle.maven:oracle-maven-sync:push \

-Doracle-maven-sync.oracleHome=${MW_HOME} \

-Doracle-maven-sync.serverId=MavenRepositoryForStoreBackendProject \

-P ProfileForStoreBackendProject

Windows:

mvn com.oracle.maven:oracle-maven-sync:push 

-Doracle-maven-sync.oracleHome=%MW_HOME%

-Doracle-maven-sync.serverId=MavenRepositoryForStoreBackendProject 

-P ProfileForStoreBackendProject

While Linux is used in the video series, all mvn and git commands are applicable to Windows.  Any variations will be called out in the accompanying blog.



Helpful links:

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.