【发布时间】:2013-05-01 17:41:54
【问题描述】:
我们正在从 Weblogic 10g 升级到 12c。我们的代码库的一部分是网络服务,所以我们使用weblogic-maven-plugin:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>weblogic-maven-plugin</artifactId>
<version>2.9.5</version>
<configuration>
<contextPath>ws</contextPath>
<keepGenerated>true</keepGenerated>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>jwsc</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.5</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
<dependency>
<groupId>weblogic</groupId>
<artifactId>weblogic</artifactId>
<version>${weblogic.version}</version>
<scope>system</scope>
<systemPath>${bea.lib}/weblogic.jar</systemPath>
</dependency>
</dependencies>
</plugin>
我看到的构建错误是
[ERROR] Failed to execute goal org.codehaus.mojo:weblogic-maven-plugin:2.9.5:jwsc (default) on project webService: Execution default of goal org.codehaus.mojo:weblogic-maven-plugin:2.9.5:jwsc failed: Plugin org.codehaus.mojo:weblogic-maven-plugin:2.9.5 or one of its dependencies could not be resolved: Failure to find weblogic:webservices:jar:10.3.6 in http://ccicusbuild1/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
深入检查表明该插件依赖于weblogic:weblogic:10.3.6 和weblogic:webservices:10.3.6。如前面的代码所示,我可以用weblogic:weblogic:12.1.1 覆盖weblogic:weblogic:10.3.6。问题是 webservices.jar 不再是 weblogic 12c 的一部分,所以我没有什么可以覆盖依赖项,也不能排除它。
weblogic-maven-plugin (http://mojo.codehaus.org/weblogic-maven-plugin/) 的页面提到了对 12c 的支持,但没有提供任何详细信息。
目标是能够通过 maven 运行 JWSC。是否可以对插件配置进行调整以使其工作,或者是否有其他插件,或者我需要硬着头皮使用 ant 插件运行代码?
【问题讨论】:
-
如果排除 webservices jar 会发生什么?
-
我不知道排除它的方法。您可以排除依赖项的依赖项(传递依赖项),但不能排除插件的依赖项。
-
您是否尝试过这里提到的 wls-maven-plugin docs.oracle.com/cd/E24329_01/web.1211/e24368/maven.htm
-
我看到了
wls-maven-plugin,但我在文档中没有看到任何关于 JWSC 的内容。它似乎更适合部署和服务器维护。也许,我只是错过了,我会再检查一次。
标签: web-services maven weblogic weblogic12c