Recently a acustomer asked me to Build a Continuous Integration Environment step by step.
In the past I've done something similar using ant and maven but this time I'd like to produce a guide.
Installation
Maven is a Java based tool, so the very first requirement is to have JDK installed on your machine.JDK Installation
Maven Installation
- MAVEN_HOME = <path to the installation folder (/opt/apache/maven/3.6.3)>
- MAVEN = $MAVEN_HOME\bin
- PATH = $PATH:$MAVEN
- MAVEN_REPO = <reposiroty path (/opt/apache/maven/repository)>
- MAVEN_OPS = -Xmx2048m -Xms1024m -XX:MaxPermSize=512m -Djava.awt.headless=true
<settings ....> <localRepository>/opt/apache/maven/repository</localRepository> ... ... </settings>
Configuration
ORACLE_HOME
ORACLE_HOME = /opt/oracle/Middleware/jdeveloper/12.2.1.2Access the Oracle Maven Repository
Adding the Oracle Maven Repository
<repositories> <repository> <id>maven.oracle.com</id> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> <url>https://maven.oracle.com</url> <layout>default</layout> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>maven.oracle.com</id> <url>https://maven.oracle.com</url> </pluginRepository> </pluginRepositories>
Configuring the HTTP Wagon
<servers> <server> <id>maven.oracle.com</id> <username>YOUR Oracle OTP User</username> <password>YOUR Oracle OTP password</password>
<configuration> <basicAuthScope> <host>ANY</host> <port>ANY</port> <realm>OAM 11g</realm> </basicAuthScope> <httpConfiguration> <all> <params> <property> <name>http.protocol.allow-circular-redirects</name> <value>%b,true</value> </property> </params> </all> </httpConfiguration> </configuration> </server>
</servers> Add a profile
<profiles> <profile> <id>maven.oracle.com</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>maven.oracle.com</id> <url>https://maven.oracle.com</url> <layout>default</layout> <releases> <enabled>true</enabled> </releases> </repository> </repositories> </profile> </profiles>
Setup Proxy (if you need)
<proxies> <proxy> <id>MyProxy</id> <active>true</active> <protocol>http</protocol> <username>YOUR PROXY USER</username> <password>YOUR PROXY USER PASSWORD</password> <host>PROXY HOST</host> <port>PROXY PORT</port> <nonProxyHosts>127.0.0.1|localhost| OTHER PROXY EXCLUSIONS</nonProxyHosts> </proxy> </proxies>
Synchronization Plug-In
The plug-in is located in your Oracle WebLogic Server 12c home and consists of two files:
The Maven Project Object Model (POM) file, which describes the plug-in. It is located at:
ORACLE_HOME/oracle_common/plugins/maven/com/oracle/maven/oracle-maven-sync/12.2.1/oracle-maven-sync-12.2.1.pom
The JAR file, which contains the plug-in. It is located at:
ORACLE_HOME/oracle_common/plugins/maven/com/oracle/maven/oracle-maven-sync/12.2.1/oracle-maven-sync-12.2.1.jar
Install and deploy the plug-in
mvn install:install-file -DpomFile=oracle-mave n-sync-12.2.1.pom -Dfile=oracle-maven-sync-12.2.1.jar
Oracle Maven Synchronization Plug-In
mvn help:describe -Dplugin=com.oracle.maven:oracle-maven-sync -Ddetail