Using Maven to Deploy to Weblogic Clusters
- by Mark Sailes
org.codehaus.mojo
weblogic-maven-plugin
2.9.1
We're currently using the weblogic maven plugin successfully to deploy to our local WebLogic 9.2 instances.
When we try to deploy to a remote environment we have a problem. We use a two machine cluster, with the admin server and managed server on one machine, and another managed server on a seperate machine.
When your plugin uploads the application to the admin server, it doesn't copy it to the second managed server on the seperate machine. This then causes the second managed server a problem, as it cannot find the application in the location where the admin server saved it on its own machine.
Config below
<configuration>
<adminServerHostName>${weblogic.adminServerHostName}</adminServerHostName>
<adminServerPort>${weblogic.adminServerPort}</adminServerPort>
<adminServerProtocol>${weblogic.adminServerProtocol}</adminServerProtocol>
<userId>${weblogic.userId}</userId>
<password>${weblogic.password}</password>
<upload>${weblogic.upload}</upload>
<remote>${weblogic.remote}</remote>
<verbose>${weblogic.verbose}</verbose>
<debug>${weblogic.debug}</debug>
<stage>${weblogic.stage}</stage>
<targetNames>${weblogic.targetNames}</targetNames>
<exploded>${weblogic.exploded}</exploded>
</configuration>
<profile>
<id>localhost</id>
<properties>
<weblogic.adminServerHostName>localhost</weblogic.adminServerHostName>
<weblogic.adminServerPort>7001</weblogic.adminServerPort>
<weblogic.adminServerProtocol>t3</weblogic.adminServerProtocol>
<weblogic.userId>weblogic</weblogic.userId>
<weblogic.password>weblogic</weblogic.password>
<weblogic.upload>false</weblogic.upload>
<weblogic.remote>false</weblogic.remote>
<weblogic.verbose>true</weblogic.verbose>
<weblogic.debug>true</weblogic.debug>
<weblogic.stage>false</weblogic.stage>
<weblogic.targetNames>AdminServer</weblogic.targetNames>
<weblogic.exploded>false</weblogic.exploded>
</properties>
</profile>
<profile>
<id>dev</id>
<properties>
<weblogic.adminServerHostName>******</weblogic.adminServerHostName>
<weblogic.adminServerPort>9141</weblogic.adminServerPort>
<weblogic.adminServerProtocol>t3</weblogic.adminServerProtocol>
<weblogic.userId>******</weblogic.userId>
<weblogic.password>******</weblogic.password>
<weblogic.upload>true</weblogic.upload>
<weblogic.remote>true</weblogic.remote>
<weblogic.verbose>true</weblogic.verbose>
<weblogic.debug>true</weblogic.debug>
<weblogic.stage>true</weblogic.stage>
<weblogic.targetNames>dev_cluster01</weblogic.targetNames>
<weblogic.exploded>false</weblogic.exploded>
</properties>
</profile>