如何为weblogic v12.1.2 (12c)安装weblogic maven插件?

时间:2021-04-15 21:38:28

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

为了安装weblogic应用服务器,我使用以下链接对来自或oracle的两个文件进行解压:

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

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.

我简单地将两个文件解压,然后它们自动解压到同一个文件夹。将MW_HOME和JAVA_HOME环境变量分别设置为指向解压缩文件夹和Java 7 JDK位置,我运行了configure。cmd文件并顺利结束。

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与MW_HOME相同,它们都指向安装文件夹)。

%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.

oracle-maven-sync的地方。oracleHome是您希望填充Maven存储库的Oracle home的路径。它基本上是Weblogic目录,其中包含wlserver目录。

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):

问题是,最后一行(请求已安装插件进行描述的那一行)显示了以下错误消息(忽略隐藏的IPs,我在这个问题中手动屏蔽它们):

[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:

我怎么解决这个问题?我的目标是通过以下方式将weblogic的库作为maven的依赖项引用:

<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>

2 个解决方案

#1


7  

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.

答案在这个页面上,其中提到了如何在本地存储库中安装weblogic的maven依赖项。要在远程存储库上安装它们,请遵循本节中的说明。

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:

-Doracle-maven-sync的地方。oracleHome代表weblogic的安装文件夹。它是一个文件夹,应该包含目录,而不仅仅是:

  • oracle_common
  • oracle_common
  • user_projects
  • user_projects
  • wlserver
  • 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.

在我的问题中,我已经运行了插件mvn com.oracle。maven:oracle-maven-sync:push,但我没有指定这里提到的参数。

#2


0  

As per the WebLogic 12.1.2 documentation page, follow these instructions:

根据WebLogic 12.1.2文档页面,请遵循以下说明:

  1. Install the Oracle Maven sync plug-in and run the push goal:

    安装Oracle Maven同步插件并运行push目标:

    • Change directory to ORACLE_HOME\oracle_common\plugins\maven\com\oracle\maven\oracle-maven-sync\12.1.2.

      改变目录ORACLE_HOME maven \ \ oracle_common \ plugins \ com \甲骨文\ \ oracle-maven-sync \ 12.1.2 maven。

    • mvn install:install-file -DpomFile=oracle-maven-sync.12.1.2.pom -Dfile=oracle-maven-sync.12.1.2.jar.

      mvn安装:安装文件-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=c:\oracle\middleware\oracle_home.

      mvn com.oracle。maven:oracle-maven-sync:推动-Doracle-maven-sync.oracleHome = c:\ oracle中间件\ \ oracle_home。

  2. You can validate whether you have successfully installed the plug-in using the Maven help:describe goal. See the Apache help plug-in describe goal documentation for additional information.

    您可以使用Maven help:describe goal验证是否成功安装了插件。有关更多信息,请参见Apache帮助插件描述目标文档。

    • mvn help:describe -DgroupId=com.oracle.weblogic -DartifactId=weblogic-maven-plugin -Dversion=12.1.2-0-0
    • mvn帮助:描述-DgroupId = com.oracle。weblogic -DartifactId = weblogic-maven-plugin -Dversion = 12.1.2-0-0

#1


7  

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.

答案在这个页面上,其中提到了如何在本地存储库中安装weblogic的maven依赖项。要在远程存储库上安装它们,请遵循本节中的说明。

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:

-Doracle-maven-sync的地方。oracleHome代表weblogic的安装文件夹。它是一个文件夹,应该包含目录,而不仅仅是:

  • oracle_common
  • oracle_common
  • user_projects
  • user_projects
  • wlserver
  • 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.

在我的问题中,我已经运行了插件mvn com.oracle。maven:oracle-maven-sync:push,但我没有指定这里提到的参数。

#2


0  

As per the WebLogic 12.1.2 documentation page, follow these instructions:

根据WebLogic 12.1.2文档页面,请遵循以下说明:

  1. Install the Oracle Maven sync plug-in and run the push goal:

    安装Oracle Maven同步插件并运行push目标:

    • Change directory to ORACLE_HOME\oracle_common\plugins\maven\com\oracle\maven\oracle-maven-sync\12.1.2.

      改变目录ORACLE_HOME maven \ \ oracle_common \ plugins \ com \甲骨文\ \ oracle-maven-sync \ 12.1.2 maven。

    • mvn install:install-file -DpomFile=oracle-maven-sync.12.1.2.pom -Dfile=oracle-maven-sync.12.1.2.jar.

      mvn安装:安装文件-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=c:\oracle\middleware\oracle_home.

      mvn com.oracle。maven:oracle-maven-sync:推动-Doracle-maven-sync.oracleHome = c:\ oracle中间件\ \ oracle_home。

  2. You can validate whether you have successfully installed the plug-in using the Maven help:describe goal. See the Apache help plug-in describe goal documentation for additional information.

    您可以使用Maven help:describe goal验证是否成功安装了插件。有关更多信息,请参见Apache帮助插件描述目标文档。

    • mvn help:describe -DgroupId=com.oracle.weblogic -DartifactId=weblogic-maven-plugin -Dversion=12.1.2-0-0
    • mvn帮助:描述-DgroupId = com.oracle。weblogic -DartifactId = weblogic-maven-plugin -Dversion = 12.1.2-0-0