In this small post I will show you how to deploy automatically some artifacts of your build into
Weblogic 10.3 by using the weblogic-maven-plugin
This plugin will support various tasks within the Weblogic 8.1 and 9.x environment. Such tasks as deploy, undeploy,clientgen,servicegen, and appc are supported as well as many others. The plugin uses exposed API's that are subject to change but have been tested in 8.1 SP 4-6 and 9.0 - 9.2 MP3. There are two versions of the plugin to support the two environments based on differences in the JDK. The 9.x version is currently being refactored to support the standard JSR supported deployment interface
In the protocols section of your Admin server settings page verify that Enable Tunneling is checked (Environment – Server - Protocols).
In a Weblogic 10.3 JDK 1.6 environment the weblogic-maven-plugin requires 17 dependencies!
but this can be reduced to just two by creating an uber jar wlfullclient.jar.
Use the following steps to create a wlfullclient.jar file for a JDK 1.6 client application:
server/lib directory.
cd WL_HOME/server/lib
wlfullclient.jar in the server/lib directory:
java -jar wljarbuilder.jar
You can now deploy this huge jar file wlfullclient.jar (59 MB) to either your Artifactory/Nexus/Archiva repository.
<dependency>
<groupId>weblogic</groupId>
<artifactId>wlfullclient</artifactId>
<version>${weblogic.version}</version>
</dependency>
We need another jar file, this one can be find in bea/modules directory. Install also com.bea.core.descriptor.wl_1.1.0.0.jar into your local maven repository
<dependency>
<groupId>weblogic</groupId>
<artifactId>com.bea.core.descriptor.wl</artifactId>
<version>1.1.0.0</version>
<scope>provided</scope>
</dependency>
We are nearly ready, just add your deployment in a profile that is not active by default. This will allow you to deploy only in some special build with –P{profileName} in your continuous server (Hudson/Teamcity/Bamboo)
<profiles>
<profile>
<id>deploy_weblogic_dev</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties> </properties>
<build>
<plugins> </plugins>
</build>
</profile>
</profiles>
Here is the whole plugin configuration that you have to put between
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>weblogic-maven-plugin</artifactId>
<version>2.9.1</version>
<executions>
<execution>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
<goal>start</goal>
</goals>
</execution>
</executions>
<configuration>
<name>${webappname}</name>
<adminServerHostName>${wls.adminServerHostName}</adminServerHostName>
<adminServerPort>${wls.adminServerPort}</adminServerPort>
<adminServerProtocol>t3</adminServerProtocol>
<userId>${wls.userId}</userId>
<password>${wls.password}</password>
<upload>true</upload>
<remote>true</remote>
<verbose>false</verbose>
<debug>false</debug>
<targetNames>${wls.targetname}</targetNames>
<noExit>true</noExit>
</configuration>
<dependencies>
<dependency>
<groupId>weblogic</groupId>
<artifactId>wlfullclient</artifactId>
<version>${weblogic.version}</version>
</dependency>
<dependency>
<groupId>weblogic</groupId>
<artifactId>com.bea.core.descriptor.wl</artifactId>
<version>1.1.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</plugin>
Good luck! Feel free to ask below if you have any questions.
http://download.oracle.com/docs/cd/E12840_01/wls/docs103/client/jarbuilder.html
Privacy Statement | Copyright Notice | Licenses
© 1999-2012 Waltercedric.com. Designed by Cédric Walter. Sitemap
Reproduction without explicit permission is prohibited. All Rights Reserved. All photos remain copyright © their rightful owners. No copyright infringement is intended.
Disclaimer: The editor(s) reserve the right to edit any comments that are found to be abusive, offensive, contain profanity, serves as spam, is largely self-promotional, or displaying attempts to harbour irrelevant text links for any purpose.