Deploying to Weblogic using Maven
From Kb
Contact Article Author | Blog of Article Author | FirstPartners.net Home | LinkedIn profile of Author
- Note that there is an alternative method of Deploying to Weblogic using HotDeploy
Contents |
Installation - Maven
- Maven Weblogic Plugin homepage: http://mojo.codehaus.org/weblogic-maven-plugin/
- Ensure you have the proxy set in your Maven conf directory (if required)
- Add the following to the Maven Projects pom.xml (within the plugins tag)
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>weblogic-maven-plugin</artifactId> <version>2.8.0-SNAPSHOT</version> <configuration> <adminServerHostName>localhost</adminServerHostName> <adminServerPort>7001</adminServerPort> <adminServerProtocol>http</adminServerProtocol> <userId>weblogic</userId> <password>weblogic</password> <upload>false</upload> <remote>false</remote> <verbose>false</verbose> <debug>false</debug> <targetNames>myserver</targetNames> </configuration> </plugin>
- try an mvn clean on the project to see if it picks it up ok.
- if not , ensure that the following link to the plugin repository is your maven\conf\settings.xml
within the profile' tag
<pluginRepositories> <pluginRepository> <id>Maven Snapshots</id> <url>http://snapshots.maven.codehaus.org/maven2/</url> <snapshots> <enabled>true</enabled> </snapshots> <releases> <enabled>false</enabled> </releases> </pluginRepository> </pluginRepositories>
Installation - additional weblogic Jars
- Install the following Jars manually. Change the path to the jar files to suit your system (the paths given are default install for Weblogic 81 on Windows)
mvn install:install-file -DgroupId=weblogic -DartifactId=weblogic -Dversion=8.1 -Dpackaging=jar -Dfile=C:\bea\weblogic81\server\lib\weblogic.jar mvn install:install-file -DgroupId=weblogic -DartifactId=webservices -Dversion=8.1 -Dpackaging=jar -Dfile=C:\bea\weblogic81\server\lib\webservices.jar
Usage
- more information on goals at http://mojo.codehaus.org/weblogic-maven-plugin/plugin-info.html
- List deployed application - useful to check that setup is working
mvn weblogic:listapps
- Typical - deploy a built ear application to weblogic
mvn weblogic:deploy
See Also
Weblogic | Maven Information | Windows Proxy to Use tools such as Lynx, Deploy on Corporate Network

