Getting started with Weblogic Maven Plugin
What is Weblogic Maven Plugin ?
Weblogic Maven Plugin is a plugin (just a single jar) that comes bundled with Weblogic Application Server which helps to manage the Weblogic server through Maven commands. When I say manage, I mean following actions on Weblogic server -
- Create/Modify/Delete weblogic domain
- Start server/Stop server/Restart server
- Deploy/Undeploy applications
So, let's gets started with using weblogic-maven-plugin.
Installing the weblogic-maven-plugin
For this tutorial, my machine setup is as follows:
Weblogic Server Version :12.2.1 (can be downloaded from here)
Weblogic Server Installation directory : D:\Oracle_home\
OS : Windows 7
Java Version : 1.8.0_121 (As weblogic 12.2.1 requires Java 8 to run)
Maven version : 3.0.4
You can find the plugin's jar file & pom.xml file in following directory :
D:\Oracle_home\wlserver\plugins\maven\com\oracle\weblogic\weblogic-maven-plugin\12.2.1
Now, we are ready to install this plugin in our local maven repository.
- Navigate to this directory in command prompt.
- Fire below command :
mvn install:install-file -Dfile=weblogic-maven-plugin-12.2.1.jar -DpomFile=weblogic-maven-plugin-12.2.1.pom
- You can invoke plugin lifecycles, as following :
To make any deployment :
mvn com.oracle.weblogic:weblogic-maven-plugin:deploy
To Start the application:
mvn com.oracle.weblogic:weblogic-maven-plugin:start-app
To Stop the application:
mvn com.oracle.weblogic:weblogic-maven-plugin:stop-app
If you want to know more in details about each goal, please check this. Its'a bit old but you should be able to get an idea on how powerful this plugin is.
Hope this post helped. :-)
Comments
Post a Comment