[WebLogic] How to import WebLogic jars into maven local repository
If you are developing the the java web application based-on maven and WebLogic application server you possibly need to import some WebLogic libraries or API into your local maven repository. WebLogic provides this feature and even more than it. WebLogic Server provides support for Maven through the provisioning of plug-ins that enable you to perform various operations on WebLogic Server from within a Maven environment and runtime libraries.
I’ll take WebLogic 12.2.1.3 as an example to demonstrate how to do this.
An important location
First go to
cd <wls_home>\oracle_common\plugins\maven\com\oracle\maven\oracle-maven-sync\12.2.1
ls -l
oracle-maven-sync-12.2.1.jar
oracle-maven-sync-12.2.1.pom
Maven install
In the directory, continue executing mvn install
mvn install:install-file -DpomFile=oracle-maven-sync-12.2.1.pom -Dfile=oracle-maven-sync-12.2.1.jar
mvn com.oracle.maven:oracle-maven-sync:push -DoracleHome=<wls_home>
To test install result
mvn help:describe -DgroupId=com.oracle.weblogic -DartifactId=weblogic-maven-plugin -Dversion=12.2.1-3-0
What you have
Now what you have in local maven repository,
- WebLogic runtime libraries or API
- WebLogic Maven Plug-in
- The weblogic-maven-plugin provides enhanced functionality to install, start and stop servers, create domains, execute WLST scripts, and compile and deploy applications. With the weblogic-maven-plugin, you can install WebLogic Server from within your Maven environment to fulfill the local WebLogic Server requirement when needed.
Reference
https://docs.oracle.com/middleware/12213/wls/WLPRG/maven.htm#WLPRG585