Creating Composites with Maven

Submitted by code_admin on Wed, 07/25/2018 - 10:35

Create example repo file on machine with SOA installed

Reference: https://docs.oracle.com/middleware/1212/core/MAVEN/config_maven.htm#MAV…

I used the VM to install it.
The VM has maven installed on it in this directory:
/u01/fmw/soa/oracle_common/modules/org.apache.maven_3.0.5/bin

I added the following to ~/.bash_profile
export M2_HOME=/u01/fmw/soa/oracle_common/modules/org.apache.maven_3.0.5
export PATH=${M2_HOME}/bin:$PATH

(Java home was already set)
Reboot VM
test:
mvn --version

Maven wasn't working because of proxy setup in VM.
renaming /home/oracle/.m2/settings.xml to settings.xml.old fixed this (it removed the proxy)

cd /u01/fmw/soa/oracle_common/plugins/maven/com/oracle/maven/oracle-maven-sync/12.1.3
mvn install:install-file -DpomFile=oracle-maven-sync-12.1.3.pom -Dfile=oracle-maven-sync-12.1.3.jar
mvn com.oracle.maven:oracle-maven-sync:push -Doracle-maven-sync.oracleHome=/u01/fmw/soa
mvn archetype:crawl -Dcatalog=$HOME/.m2/archetype-catalog.xml

Test:
mkdir ~/tmp
cd ~/tmp
mvn archetype:generate -DarchetypeGroupId=com.oracle.soa.archetype -DarchetypeArtifactId=oracle-soa-application -DarchetypeVersion=12.1.3-0-0 -DarchetypeRepository=local

It works. Now I need to move this repository to my local machine
cd ~/.m2
tar -cvpzf repo_with_soa_artifacts.tar.gz repository

Add artifacts to local repository

Download the file repo_with_soa_artifacts.tar.gz

copy files into c:\users\<>.m2\repository - overwriting and creating as required

Create a test SOA Composite:

cd C:\JDev_12_1_3_0_0\mywork

mvn archetype:generate -DarchetypeGroupId=com.oracle.soa.archetype -DarchetypeArtifactId=oracle-soa-application -DarchetypeVersion=12.1.3-0-0 -DarchetypeRepository=local

RJM Article Type
Work Notes