We are using jboss 7 and the jboss-as-maven-plugin to autodeploy our war files. We have a web.xml with the contextRoot set to our application name. In the plugin we configured our fileName to be ${project.build.finalName}.${project.packaging}. It deploys fine but the issue is when our war file name changes when we change our release number.
So for example The war changes from myproject-v1.0.1.war to myproject-v1.0.2.war when we get ready to release our next version. Issue is when the maven jboss plugin runs and tries to deploy the war file. Note We have force set to true so it should un-deploy the old application and deploy the new one.
The issue is it seems to key off of the war file name and not the webContext when determine if the application is currently deployed. So the new version fails to deploy because the old one is still running. We have to go in and manually un-deploy the previous version then re-depoly. It seems that the force un-deploy of the old app is based on the war name and since the version number changes it doesn't think its deployed and leaves the old version running. Which cause it to fail because the webContext is already used.
We attempted to change the config in the plugin to be generic and that works (the runtime name and name show this name and no longer the war file name). But the only issue is that seems to affect something on jboss and though it says its deployed the webContext isn't valid and we can't get to our application. Which is stranges since the webContext is set in the web.xml but it seems that the config in the plugin some how breaks it.
There is a name configuration attribute you can define. That should override the deployment name. If it's not set it does use the name of the file.
<project>
...
<build>
...
<plugins>
...
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.3.Final</version>
<configuration>
<name>your-app</name>
</configuration>
</plugin>
...
</plugins>
...
</build>
...
</project>
So after playing with this for a while, we couldn't find any reason as to why when we used the config it would deploy but the webContext was not set. But when we manually deployed the same WAR it set the webContext.
So in the end. What we ended up doing was changing the name of the war to a generic name. So rather then myapp_v_1_0_1.war we made it myapp.war. This is a pain because now we don't know what version is deployed by just looking in the console. We need to hit the application which display the version number. But by doing this it solved our issue with un-deploying the old app, but created a new issue where its not as easy to determine the version deployed via the console.
This article seems to answer your question.
https://community.jboss.org/wiki/HowdoIoverridethewebcontextroot
I tried it on my own project and it works! Basically, create a jboss-web.xml (now your project is specific, so much for write once deploy anywhere). Make the jboss-web.xml look like...
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<context-root>/rmbMavenCounter</context-root>
</jboss-web>
Remove the configuration from the pom.xml for the jboss-as-plugin. My plugin now looks like
<build>
<plugins>
.....
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.4.Final</version>
</plugin>
</plugins>
</build>
It will deploy with the snapshot name in the jboss admin console, but you can use the text string to access your application. For example, I used the following link to access the above application.
http://localhost:8080/rmbMavenCounter/
Here is the deployment from my jboss web server console...
08:12:42,413 INFO [org.jboss.as.server.deployment] (MSC service thread 1-16) JBAS015876: Starting deployment of "mavenCounter2-0.0.1-SNAPSHOT.war"
08:12:42,606 INFO [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-4) Initializing Mojarra 2.1.5 (SNAPSHOT 20111202) for context '/rmbMavenCounter'
08:12:42,663 INFO [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-4) Monitoring jndi:/default-host/rmbMavenCounter/WEB-INF/faces-config.xml for modifications
08:12:42,665 INFO [org.jboss.web] (MSC service thread 1-4) JBAS018210: Registering web context: /rmbMavenCounter
08:12:42,678 INFO [org.jboss.as.server] (management-handler-threads - 30) JBAS018559: Deployed "mavenCounter2-0.0.1-SNAPSHOT.war"
Same problem I faced: I wanted to upload the war using the version and build number for easy identification but at the same time to overwrite the previous service based on its name (with no version/build number).
This seems to be a limitation in the maven Jboss plugin: http://docs.jboss.org/jbossas/7/plugins/maven/latest/deploy-mojo.html. Currently only the 'name' parameter is supported which overwrites both the Name and the Runtime Name in the JBoss management console.
I would say long-term the plugin needs to support the 'runtimeName' as well in the list of parameters to the maven 'deploy' goal.
What you can do though, is to undeploy the service first using the 'undeploy' goal and use the 'matchPattern' parameter to find you previous service even if it included the version/build name.
Of course the disadvantage is that you have to undeploy; which is not well suited for a production environment.
For you example:
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<configuration>
<port>${JBOSS_PORT}</port>
<username>${JBOSS_USERNAME}</username>
<password>${JBOSS_PASSWORD}</password>
<force>true</force>
<ignoreMissingDeployment>true</ignoreMissingDeployment>
</configuration>
<executions>
<execution>
<id>undeploy-MyProject</id>
<phase>install</phase>
<goals>
<goal>undeploy</goal>
</goals>
<configuration>
<hostname>${HOSTNAME}</hostname>
<matchPattern>myproject.*\.war</matchPattern>
</configuration>
</execution>
<execution>
<id>deploy-MyProject</id>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<hostname>${HOSTNAME}</hostname>
<name>myproject-${project.version}.war</name>
<filename>target/myproject-${project.version}.war</filename>
</configuration>
</execution>
</executions>
</plugin>
Related
I am having a "404 Not found" error message when visiting at:
http://localhost:8080/bword in Eclipse.
This application is served in Wildfly. In POM.xml, it defines:
<artifactId>bword</artifactId>
<packaging>war</packaging>
<name>bword</name>
However, strange enough, when I run the application in Eclipse with Wildfly 9.0 configured as the server, what's deployed into wildfly/standone/deployments/ is bbword.war, as below:
[abigail#localhost wildfly-9.0.2.Final]$ ls standalone/deployments/
bbword.war/ bbword.war.deployed
Which is wrong, it should be "bword.war/" and "bword.war.deployed".
Outside of Eclipse, if I "mvn clean package" under the project "bword", I can get the "bword.war" under the target/ directory.
Please see the attachment screenshot for reference. I suspect somewhere in my pom, or eclipse, or whatever place, there is a misconfiguration of "bbword", instead of "bword", but I can't really find it. I can't find any trace of "bbword". What dictates the name of the deployed war file under deployments?
See attached.
Edited (Part of the POM.xml):
<build>
<!-- Set the name of the war, used as the context root when the app
is deployed -->
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>${version.war.plugin}</version>
<configuration>
<!-- Java EE 7 doesn't require web.xml, Maven needs to catch up! -->
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<!-- WildFly plugin to deploy war -->
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>${version.wildfly.maven.plugin}</version>
</plugin>
<!-- Compiler plugin enforces Java 1.6 compatibility and activates
annotation processors -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${version.compiler.plugin}</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
</plugins>
</build>
One more addition:
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
17:32:35,508 INFO [org.jboss.modules] (main) JBoss Modules version 1.4.3.Final
17:32:35,702 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
17:32:35,761 INFO [org.jboss.as] (MSC service thread 1-6) WFLYSRV0049: WildFly Full 9.0.2.Final (WildFly Core 1.0.2.Final) starting
17:32:36,573 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 22) WFLYCTL0028: Attribute 'job-repository-type' in the resource at address '/subsystem=batch' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
17:32:36,594 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found bbword.war in deployment directory. To trigger deployment create a file called bbword.war.dodeploy
17:32:36,625 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
17:32:36,647 INFO [org.xnio] (MSC service thread 1-5) XNIO version 3.3.1.Final
......
This is the very initial section of the console message after I click "Run as Server" on Wildfly. It seems that it shows "Found bbword.war in deployment directory." Before I run it, I delete all in standalone/deployments/*. It start with an empty directory. It seems the "bbword.war" is copied to this directory whenever I run the server. I can't figure out. I use "find / -name bbword.war" on my computer but can't find this file. Really puzzled.
Update on this:
Eventually found out the problem: under the project 'bword', there is a ".setting" directory, which contains this file:
bword/.settings/org.eclipse.wst.common.component
And there is a line in it: , where "bbword" was the previous deploy name I used. Remove this directory and in Maven, run "update" seems fixing this problem. In particular, I need to do both, first delete this dirctory, .setting, then update maven.
Several days wasted on this, but it's good to know about this.
Had the same issue and fixed it by having corrected those 2 files :
.settings/org.eclipse.wst.common.component
=>deploy-name, etc
.project
=>name
First, try deploying the maven-built artifact (bword.war) on your server(Do not forget to completely clean-up any Eclipse deployed artifacts first).
You can do this by simply moving the bword.war from your /target folder to your path_to_wildfly/standalone/deployments folder.
Check the server log file for message: Registered web context: <web_context_name> that should appear once your war is deployed.
If it says /bbword - which is not what you expect, check whether you have a jboss-web.xml file in src/main/webapp/WEB-INF that specifies this as a web-context value.
If the maven artifact results in correct webcontext - /bword, then it must be an Eclipse configuration issue. Have you tried updating the Eclipse project from Maven? :
right click on your project
select Maven
select Update Project
remove your project from Wildfly server, and add it again. If that does not help, try adding a new server runtime and add your project there. Last resort would be to create a new Eclipse workspace.
Good luck.
The listed solutions didnt work for me.
I had to create a completely new project in eclipse:
File->New->Project
named it correctly, and then copy-pasted the necessary code from the old project.
Now the server name is correct.
If you'e running from intellij idea config then checkout artifact name in project structure. I had to rename it manually after fixing finalname tag in pom.xml. Better avoid any timestamp in artifact name.
I'm trying to automatically deploy a Maven webapp from Eclipse Java EE to my local Tomcat server. I'm using Windows XP. This is the error:
[ERROR] Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:deploy (default-cli) on project practicaIW: Cannot invoke Tomcat manager: Server returned HTTP response code: 403 for URL: http://127.0.0.1:8080/manager/deploy?path=%2Fpractica-3&war= -> [Help 1]
I think I know the reason of this error:
If I run the Tomcat server inside eclipse, 127.0.0.1:8080 is my workspace/target. There is any manager folder and rest of classes on it, so it does not work. Possible botched solution: copy this folder and files inside my project.
If I run the Tomcat server outside eclipse, 127.0.0.1:8080 is tomcat_location/webapps. It does not work because Eclipse creates the war file in my workspace so Tomcat cannot find it. Possible solution: configure the maven-war-plugin to create the war file into 127.0.0.1:8080. How could I do it? Is it the best way to procceed?
pom.xml extract:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<url>http://127.0.0.1:8080/manager</url>
<username>admin</username>
<password>password</password>
<server>TomcatServer</server>
<path>/practica-3</path>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
tomcat-users.xml extract:
<tomcat-users>
<role rolename="manager"/>
<role rolename="manager-gui"/>
<role rolename="admin"/>
<role rolename="manager-script"/>
<user password="password" roles="admin,manager,manager-gui,manager-script" username="admin"/>
</tomcat-users>
UPDATE:
pvm14 answered the question. But previously you have to open the file: Tomcat v7.0 Server at localhost.server. Here is how:
Properties
Clicking on Switch location, the file that the arrow 3 indicate will appear.
Open the file
The Tomcat server you start from inside Eclipse isn't going to have a 'Tomcat Manager' console available (localhost:8080/manager) unless you configure it with this option:
This means that the Tomcat you start from Eclipse is exactly the one you provided when defining the Tomcat server in the IDE. Otherwise Eclipse runs a pruned version, without manager available, in a directory located inside the workspace:
{workspace_dir}\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
If you don't have a tomcat manager available in the instance you're running tomcat-maven-plugin won't be able to deploy anything
Best regards
I am developing a webapp in Eclipse Juno as a Maven multi-module project using Spring MVC and the Jetty Maven plugin version 8.1.7.v20120910 with HSQL as in-memory DB during development. I want to start Jetty from within the IDE using the jetty:run goal. The problem is that I cannot see any log outputs from Spring, but I suspect the context is indeed being loaded since console log outputs stop briefly - just as long as it would take to load my yet so small Spring context - before throwing an NPE on an Autowired bean. So my suspicion is that something went wrong while starting up the Spring context.
This is the log output just before it "stops" briefly:
[INFO] web.xml file = file:/F:/projects/matching/template/template-app/src/main/webapp/WEB-INF/web.xml
[INFO] Webapp directory = F:\projects\matching\template\template-app\src\main\webapp
2013-01-26 11:09:18.130:INFO:oejs.Server:jetty-8.1.7.v20120910
2013-01-26 11:09:20.704:INFO:oejpw.PlusConfiguration:No Transaction manager found - if your webapp requires one, please configure one.
Which after the pause is followed by:
2013-01-26 11:09:35.884:INFO:/:No Spring WebApplicationInitializer types detected on classpath
2013-01-26 11:09:36.742:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,file:/F:/projects/matching/template/template-app/src/main/webapp/},file:/F:/projects/matching/template/template-app/src/main/webapp/
2013-01-26 11:09:36.742:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,file:/F:/projects/matching/template/template-app/src/main/webapp/},file:/F:/projects/matching/template/template-app/src/main/webapp/
2013-01-26 11:09:36.742:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,file:/F:/projects/matching/template/template-app/src/main/webapp/},file:/F:/projects/matching/template/template-app/src/main/webapp/
2013-01-26 11:09:36.743:WARN:oejw.WebAppContext:Failed startup of context o.m.j.p.JettyWebAppContext{/,file:/F:/projects/matching/template/template-app/src/main/webapp/},file:/F:/projects/matching/template/template-app/src/main/webapp/
java.lang.NullPointerException
Now I am confident that I will be able to fix whatever is causing the NPE, but for that I need to see what is happening to my Spring context. I used to work on the same constellation of tools last year, when a colleague had set it up with what I believe was the same configuration as I am using now.
I have searched the web all morning and couldn't find anything useful about it, only the vague suggestion to run Jetty externally and assemble the war and deploy the app, which is exactly not what I want.
This is my pom's build configuration:
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>src\main\webapp\WEB-INF\web.xml</webXml>
<warName>template</warName>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<configuration>
<webXml>src\main\webapp\WEB-INF\web.xml</webXml>
<webApp>
<jettyEnvXml>${jettyEnvXml-file}</jettyEnvXml>
</webApp>
<contextPath>template</contextPath>
<systemProperties>
<systemProperty>
<name>log4j.configuration</name>
<value>file:jetty/log4j-jetty.properties</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
And this is my log4j configuration for Jetty:
log4j.debug=true
log4j.threshold=ALL
log4j.rootLogger=DEBUG, consoleLogger
log4j.appender.consoleLogger=org.apache.log4j.ConsoleAppender
log4j.appender.consoleLogger.layout=org.apache.log4j.PatternLayout
log4j.appender.consoleLogger.layout.ConversionPattern=%-5p [%t]: %m%n
log4j.appender.consoleLogger.Threshold=TRACE
Could it have to do with this line at the beginning of my log?
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
But as far as I know it's just an m2e bug that can be ignored. I have slf4j in my classpath though.
When I run my unit tests with HSQL in the SpringJPA module, it works nicely, so I suspect it's a Jetty issue or something with my log4j configuration is just bogus.
Any ideas, hints, helps are greatly appreciated.
You have slf4j in your classpath, then Jetty will use slf4j.
Make sure you setup/configure for slf4j.
You can even setup slf4j to have its log events route to log4j for actual writing to disk or presenting to your console.
I am new to maven. So I have a project with pom.xml file. So I ran that with maven and the build was successful. I have glassfish. Glassfish is already running separately. So now what is the next step to run the project with Glassfish? My IDE is eclipse.
You have to first tell Maven to build the WAR, check out this plugin for that: http://maven.apache.org/plugins/maven-war-plugin/.
Then you need to tell maven how to deploy to glassfish, you can either configure a Maven execution plugin to do this (see here: https://www.mojohaus.org/exec-maven-plugin/). Or you can look around for a custom plugin devoted to integrating maven with glassfish. This one looks promising, but I have not used it: http://maven-glassfish-plugin.java.net/.
Maven provides a lot of basic functionality out of the box, but most of the cooler stuff with build automation is done through plugins.
Update
Just updating to add a very simple Pom that will do a auto-deployment. Note: if you just run a "mvn clean install", with the packaging set to 'war', maven will build the .war file for you and place it in the target/ folder. You can take this and deploy it to glassfish manually if you just want to get started.
Below is part of a very simple pom that uses the Maven execution plugin to auto-deploy to glassfish as a function of the build:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
<phase>install</phase>
</execution>
</executions>
<configuration>
<executable>${path-to-asadmin-util}</executable>
<arguments>
<argument>deploy</argument>
<argument>--user=${username}]</argument>
<argument>--passwordfile=${password-file}</argument>
<argument>--host=localhost</argument>
<argument>--port=4848</argument>
<argument>target/${project.name}</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
This basically just calls the deploy command on the glassfish asadmin utility[1]. You need to fill in the following variables:
${path-to-asadmin-util} --> this is the path to your asadmin utility
(normally in the glassfish_home/bin)
${username} --> glassfish admin username
${password-file} --> password file for logging into glassfish
admin[2]
${project.name} --> name of your war
If you want to get more complicated I suggest taking a look at this thread: GlassFish v3 and glassfish-maven-plugin (Mac).
[1] - http://docs.oracle.com/cd/E18930_01/html/821-2433/deploy-1.html#SJSASEEREFMANdeploy-1
[2] - http://docs.oracle.com/cd/E18930_01/html/821-2435/ghgrp.html#ghytn
Additonnaly, you should have a glance at this StackOverflow thread, dealing with maven deployement in glassifsh : https://stackoverflow.com/a/1836691/1047365.
For further understanding of Maven, you should REALLY read this (free) book : http://www.sonatype.com/books/mvnref-book/reference/. This is THE reference for Maven.
We can explain you what Maven is doing, producing, etc ... but Sonatype made a great work and you'll probably learn more reading it than we could ever do !
Regards.
I found this tutorial useful: http://tshikatshikaaa.blogspot.com/2012/05/introduction-to-maven-concepts-crash.html
I am now trying to use oracle weblogic maven plugin to deploy an application to an admin server with administration port.
I am using t3s protocol to connect but I am wondering whether I can set my custom keystore and certs in the maven plugin/parameters
in pom.xml or command line.
I cannot find the solution on the internet.
Help would greatly be appreciated.
In theory you can set the weblogic ssl headers in maven opts - like so
-Dweblogic.security.TrustKeyStore=CustomTrust -Dweblogic.security.CustomTrustKeyStoreFileName=
But the plugin doesn't seem to pick these up where as the weblogic.Deployer will. This is a little odd since the maven plugin just runs the deployer anyway.
I've also tried setting the java keystore to a custom one (also with no luck)
well the question is like "old" :) - but it seems there is no conclusive answer around and since this question pops up at google in the top10 here is what I did to make the maven -> weblogic deployment work
Using: maven 3.2.3 to deploy to WLS 12.1.3 and the WLS 12.1.3 DEV (Do not forget to execute the configure script prior to starting - well - anything)
Setup (done once)
Follow the Oracle Docs for the Maven Plugin to setup the plugin. In short:
Mainly you will install a maven plugin from the WLS DEV zip to install another maven plugin:
cd %WL_HOME%\oracle_common\plugins\maven\com\oracle\maven\oracle-maven-sync\12.1.3
mvn install:install-file -DpomFile=oracle-maven-sync-12.1.3.pom -Dfile=oracle-maven-sync-12.1.3.jar
install the plugin to be used to deploy:
mvn com.oracle.maven:oracle-maven-sync:push -DoracleHome=%WL_HOME%
Verify the plugin is ok:
mvn help:describe -DgroupId=com.oracle.weblogic -DartifactId=weblogic-maven-plugin -Dversion=12.1.3-0-0
If you need this to be added to a Maven repository proxy you can temporarily change the path to your local repository, executes those commands and that's what will be required (around 230MB in my case). I would add another thirdparty repository on the maven proxy and put everything in there in case you need to clean up later.
Then use the InstallCert tool to import the SSL certificate into a new keystore. We will place this keystore in the maven module that creates the EAR file and executes the deployment.
Deployment
Once you have your EAR file ready you need to add this to your build section:
(not the SSL / keystore messing around is only required when using t3s, you obviously skip the property setting if there is no self-signed certificate involved)
The "TrustKeyStore=CustomStore" parameter is somehow required! The name must not be changed.
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<configuration>
<properties>
<weblogic.security.TrustKeyStore>CustomTrust</weblogic.security.TrustKeyStore>
<weblogic.security.CustomTrustKeyStoreFileName>${basedir}/src/main/keystore/cacerts.dev.jks</weblogic.security.CustomTrustKeyStoreFileName>
<weblogic.security.TrustKeystoreType>JKS</weblogic.security.TrustKeystoreType>
<weblogic.security.CustomTrustKeyStorePassPhrase>changeit</weblogic.security.CustomTrustKeyStorePassPhrase>
</properties>
</configuration>
<executions>
<execution>
<goals>
<goal>set-system-properties</goal>
</goals>
<phase>initialize</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.oracle.weblogic</groupId>
<artifactId>weblogic-maven-plugin</artifactId>
<version>12.1.3-0-0</version>
<configuration>
<adminurl>t3s://HOSTNAME_HERE:7101</adminurl>
<user>WLS-USER-IN-DEPLYOERS-GROUP</user>
<password>WLS-USER-PASSWORD</password>
<source>${project.build.directory}/${project.build.finalName}.${project.packaging}</source>
<targets>TARGET_SERVERNAME_IN_WLS_TO_DEPLOY_TO</targets>
<verbose>true</verbose>
<name>YouApplicationName</name>
<remote>true</remote>
<upload>true</upload>
</configuration>
<executions>
<execution>
<id>wls-deploy-dev</id>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
The above configuration will deploy the EAR during install phase - feel free to change to phase of the weblogic-maven-plugin. It could also be in a profile I guess.
Happy Deploying :)
Links:
weblogic.Deployer command line reference
Docummentation of the WLS maven plugin
Properties Maven Plugin
InstallCert Tool