Maven and WebLogic 12c

Today, I tried to use Maven with WebLogic 12c. The documentation for installation is straight forward. I was able to execute mvn wls:help without any difficulty.

However, using the WebLogic plugin wasn’t as easy. In order to run commands such as mvn wls:start-server, I needed to configure various parameters, such as middlewareHome, domainHOme, user, password, and name. Instead of specifying these parameters every time I run the command, I added the following config to pom.xml:

<!-- WebLogic Server 12c Maven Plugin -->

After that, I was able to run the following commands without manually entering additional parameters. 🙂

mvn wls:start-server
mvn wls:deploy
mvn wls:list-apps
mvn wls:undeploy
mvn wls:stop-server

Initially, I noticed the following error when attempting to deploy/undeploy the web app. This appears to go away after I restarted the server.

[ERROR] Unknown lifecycle phase "applicationName". You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy, pre-clean, clean, post-clean. -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]

4 thoughts on “Maven and WebLogic 12c

    1. I tried your solution but got this error:
      Cannot locate ‘modules\features’ folder under MW_HOME directory

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s