开发者

Problem with merging WARs using uberwar (cargo-maven2-plugin)

I've just started using cargo-maven2-plugin to merge WAR artifacts during build process and I encountered problem with uberwar mojo. Merging works fine but resulting web.xml file contains extra "xmlns" attributes that cause error when deploying on Jboss.

For example original context-par开发者_开发百科am element looks like this:

<context-param>
  <param-name>contextConfigLocation</param-name>
  <param-value>/WEB-INF/config/web-application-config.xml</param-value>
</context-param>

and after merging it has extra "xmlns" attribute:

<context-param xmlns="">
  <param-name>contextConfigLocation</param-name>
  <param-value>/WEB-INF/config/web-application-config.xml</param-value>
</context-param>

I have found the following Jira issue but suggested solution is not clear to me: http://jira.codehaus.org/browse/CARGO-639

Anybody faced similar problem and could share the solution? If you use other tools (that work) to merge WARs please let me know.

My configuration is: Mac OS X

Java 1.6

Maven 2.1

cargo-maven2-plugin 1.1.0-SNAPSHOT

Servlets spec 2.5 (web.xml)


We had issues using cargo uberwar feature since we not only had common xml files, but also property files.

We overcame the issue (albeit in an ugly way) using war overlay. We ensured that the master war file had the superset of configurations that we wanted in the application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜