and thanks in advance for the help.
I am trying to get the oracle weblogic mvn plugin to run properly on my machine, but I am ultimately having difficulty with the connection to the admin server, and the plugins error message is not very useful in tracking the issue.
Overview: I have essentially followed the following two pages to: (a) install the plugin on my local repository: http://docs.oracle.com/cd/E24329_01/web.1211/e24443/maven_deployer.htm#DEPGD383 (b) configure the maven plugin http://www.oracle.com/technetwork/articles/soa/eisele-weblogic-netbeans-2193786.html
So my configuration looks as follows:
<profiles>
<profile>
<id>weblogicDeploy</id>
<properties>
<weblogic.server.version>12.1.2.0</weblogic.server.version>
<weblogic.server.adminurl>t3://127.0.0.1:7001</weblogic.server.adminurl>
<weblogic.server.middlewareHome>D:/appservers/weblogic</weblogic.server.middlewareHome>
<weblogic.server.serverName>AdminServer</weblogic.server.serverName>
<weblogic.server.userName>weblogic</weblogic.server.userName>
<weblogic.server.password>welcome1</weblogic.server.password>
</properties>
<dependencies>
<!--dependency>
<groupId>com.oracle.weblogic</groupId>
<artifactId>weblogic-server-pom</artifactId>
<version>${weblogic.server.version}</version>
<type>pom</type>
<scope>provided</scope>
</dependency-->
</dependencies>
<build>
<plugins>
<!--
To have access to this plugin one must follow this guide:
http://docs.oracle.com/cd/E24329_01/web.1211/e24443/maven_deployer.htm#DEPGD383
The plugin is bundled with the web logic server - we cannot get it from the web unless we install it
into our nexus ...
(1) D:\weblogic\wlserver\server\lib>java -jar wljarbuilder.jar -profile weblogic-maven-plugin
(2) jar xvf c:\tmp\weblogic-maven-plugin.jar META-INF/maven/com.oracle.weblogic/weblogic-maven-plugin/pom.xml
(3) mvn install:install-file -Dfile=weblogic-maven-plugin.jar -DpomFile=META-INF/maven/com.oracle.weblogic/weblogic-maven-plugin/pom.xml
-->
<plugin>
<!-- This is the configuration for the weblogic-maven-plugin -->
<groupId>com.oracle.weblogic</groupId>
<artifactId>weblogic-maven-plugin</artifactId>
<version>${weblogic.server.version}</version>
<configuration>
<middlewareHome>${weblogic.server.middlewareHome}</middlewareHome>
</configuration>
<executions>
<!-- Deploy the application to the WebLogic Server in the pre-integration-test phase -->
<execution>
<id>wls-deploy</id>
<!-- Summary Of phase:
process and deploy the package if necessary into an environment where integration tests can be run
-->
<phase>pre-integration-test</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<!--The admin URL where the app is deployed.
Here use the plugin's default value t3://localhost:7001-->
<adminurl>${weblogic.server.adminurl}</adminurl>
<user>${weblogic.server.userName}</user>
<password>${weblogic.server.password}</password>
<!--The location of the file or directory to be deployed-->
<source>${project.build.directory}/${project.build.finalName}.${project.packaging}</source>
<!--The target servers where the application is deployed. -->
<!--targets>${weblogic.server.serverName}</targets-->
<verbose>true</verbose>
<name>${project.build.finalName}</name>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
There is nothing in the above configuration that appears to be wrong: (a) The ( t3Url x userName x password) i can very easily validate that these are valid
$ netstat -an | grep "LISTEN" | grep "7001"
TCP 0.0.0.0:7001 0.0.0.0:0 LISTENING
TCP 0.0.0.0:7001 0.0.0.0:0 LISTENING
TCP 0.0.0.0:7001 0.0.0.0:0 LISTENING
TCP 0.0.0.0:7001 0.0.0.0:0 LISTENING
TCP 0.0.0.0:7001 0.0.0.0:0 LISTENING
TCP 0.0.0.0:7001 0.0.0.0:0 LISTENING
TCP 0.0.0.0:7001 0.0.0.0:0 LISTENING
TCP 0.0.0.0:7001 0.0.0.0:0 LISTENING
TCP 127.0.0.1:7001 0.0.0.0:0 LISTENING
....
I can also use WLST to connect to the server: Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline> connect('weblogic','welcome1','t3://127.0.0.1:7001')
Connecting to t3://127.0.0.1:7001 with userid weblogic ...
Successfully connected to Admin Server "AdminServer" that belongs to domain "whateverdomain".
Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.
(c) The previous point shows (a) the url, (b) the user name, (c) the password, (d) the target admin server... essentially everything.
But in mvn, running the mvn plugin, I ultimately always end up with the following exception.
Failed to execute goal com.oracle.weblogic:weblogic-maven-plugin:12.1.2.0:deploy (wls-deploy) on project whatevermy-war: weblogic.deploy.api.tools.deployer.DeployerException: Unable to connect to 't3://127.0.0.1:7001': weblogic.security.utils.KeyStoreConfiguration. Ensure the url represents a running admin server and that the credentials are correct. If using http protocol, tunneling must be enabled on the admin server. -> [Help 1]
The exception message above is a very clumnsy one: (a) the plugin knows the url it was given, it knows it was not told to use http it is the t3 protocl (b) if a play with the url port and setup an invalid port, i do get a socket exception and the exception message from the plugin is exactly the same thing...
there ought to be a configuraiton aspect that i have wrong, admin server name, hidden security policies ... something, but I am at this point not seing what it may be.
By th way, I have commented the dependency on the server pom, since this onther of those dependencies that you cannot fetch from a remote repository and I do not know which jar in the web logic server is hiding the pom. Otherwise, i would have installed also in my local repository. I doubt this is relevant though, since the plugin seems to be satisfied with trying to connect to weblogic.
Many thanks.