Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install weblogic maven plugin for weblogic v12.1.2 (12c)?

To install weblogic application server I decompressed 2 files I got from or oracle using these links:

http://download.oracle.com/otn/nt/middleware/12c/wls/1212/wls1212_dev.zip http://download.oracle.com/otn/nt/middleware/12c/wls/1212/wls1212_dev_supplemental.zip

..found on this page.

I simply decompressed both files and they automatically decompress to the same folder. setting the MW_HOME and JAVA_HOME environment variables to point to the decompressed folder and Java 7 JDK locations respectively, I ran the configure.cmd file and it ended successfully.

The problem is that I can't reach the same result this page shows if I follow the instructions on it. I summarized these instructions here: (ORACLE_HOME is identical to MW_HOME, they both point to the installation folder.)

%ORACLE_HOME%/wlserver/server/bin/setWLSEnv
cd %ORACLE_HOME%/oracle_common/plugins/maven/com/oracle/maven/oracle-maven-sync/12.1.2
mvn install:install-file -DpomFile=oracle-maven-sync.12.1.2.pom -Dfile=oracle-maven-sync.12.1.2.jar
mvn com.oracle.maven:oracle-maven-sync:push -Doracle-maven-sync.oracleHome=D:/oracle_home
mvn help:describe -DgroupId=com.oracle.weblogic -DartifactId=weblogic-maven-plugin -Dversion=12.1.2-0-0

Where oracle-maven-sync.oracleHome is The path to the Oracle home that you wish to populate the Maven repository from.. Its basically the Weblogic directory having wlserver directory in it.

The problem is that the last line (the line that asks the installed plugin for description), shows the following error message (Ignore the masked IPs, I masked them manually in this question):

[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-help-plugin:2.2:describe (default-cli) @ standalone-pom ---
[WARNING] The POM for com.oracle.weblogic:weblogic-maven-plugin:jar:12.1.2-0-0 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.775 s
[INFO] Finished at: 2014-05-04T13:00:03+02:00
[INFO] Final Memory: 7M/152M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-help-plugin:2.2:describe (default-cli) on project standalone-pom: Plugin does not exist: Plugin could not be found, please check its coordinates fo
 typos and ensure the required plugin repositories are defined in the POM
[ERROR] com.oracle.weblogic:weblogic-maven-plugin:maven-plugin:12.1.2-0-0
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] central (http://x.x.x.x:xxxx/artifactory/plugins-release, releases=true, snapshots=false),
[ERROR] snapshots (http://x.x.x.x:xxxx/artifactory/plugins-snapshot, releases=true, snapshots=true),
[ERROR] central-se (http://x.x.x.x:xxxx/artifactory/plugins-release, releases=true, snapshots=false),
[ERROR] snapshots-se (http://x.x.x.x:xxxx/artifactory/plugins-snapshot, releases=true, snapshots=true)
[ERROR] -> [Help 1]
[ERROR]
[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]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

What makes me think that this is NOT a network problem, is that I've successfully installed this plugin before, but I can't remember how exactly so may be I'm missing some steps ?

How can I resolve this please ? My goal is to be able to refer to weblogic's libraries from maven as a dependency in the following way:

<dependency>
    <groupId>com.oracle.weblogic</groupId>
    <artifactId>weblogic-server-pom</artifactId>
    <version>12.1.2-0-0</version>
    <type>pom</type>
    <scope>provided</scope>
</dependency>
like image 392
Muhammad Gelbana Avatar asked May 04 '14 11:05

Muhammad Gelbana


People also ask

What is WebLogic Maven plugin?

Apache Maven is a software tool for building and managing Java-based projects. WebLogic Server provides support for Maven through the provisioning of plug-ins that enable you to perform various operations on WebLogic Server from within a Maven environment.

How do I download WebLogic 12c?

In the web browser navigate to the Oracle Fusion Middleware Software Downloads: http://www.oracle.com/technetwork/middleware/weblogic/downloads/index.html. Click In the Accept License Agreement. Select the Generic Installer. Click Download File.


1 Answers

The answer is on this page which mentions how to install weblogic's maven dependencies in the local repository. For installing them on the remote repository, follow the instructions in this section.

For quick reference, I had to run this command (Please read the comments after the command before running it):

mvn com.oracle.maven:oracle-maven-sync:push -Doracle-maven-sync.oracleHome=%ORACLE_HOME% -Doracle-maven-sync.testingOnly=false

Where -Doracle-maven-sync.oracleHome represents weblogic's installation folder. Its a folder that should hold directories like and not only:

  • oracle_common
  • user_projects
  • wlserver

In my question I already ran the plugin mvn com.oracle.maven:oracle-maven-sync:push but I didn't specify the parameters mentioned here.

like image 148
Muhammad Gelbana Avatar answered Oct 03 '22 22:10

Muhammad Gelbana