• <legend id='YCDuX'><style id='YCDuX'><dir id='YCDuX'><q id='YCDuX'></q></dir></style></legend>

      <small id='YCDuX'></small><noframes id='YCDuX'>

    1. <i id='YCDuX'><tr id='YCDuX'><dt id='YCDuX'><q id='YCDuX'><span id='YCDuX'><b id='YCDuX'><form id='YCDuX'><ins id='YCDuX'></ins><ul id='YCDuX'></ul><sub id='YCDuX'></sub></form><legend id='YCDuX'></legend><bdo id='YCDuX'><pre id='YCDuX'><center id='YCDuX'></center></pre></bdo></b><th id='YCDuX'></th></span></q></dt></tr></i><div id='YCDuX'><tfoot id='YCDuX'></tfoot><dl id='YCDuX'><fieldset id='YCDuX'></fieldset></dl></div>
    2. <tfoot id='YCDuX'></tfoot>
        <bdo id='YCDuX'></bdo><ul id='YCDuX'></ul>

        Maven中相同依赖项的不同版本

        Different versions of the same dependency in Maven(Maven中相同依赖项的不同版本)

          <i id='QlkXN'><tr id='QlkXN'><dt id='QlkXN'><q id='QlkXN'><span id='QlkXN'><b id='QlkXN'><form id='QlkXN'><ins id='QlkXN'></ins><ul id='QlkXN'></ul><sub id='QlkXN'></sub></form><legend id='QlkXN'></legend><bdo id='QlkXN'><pre id='QlkXN'><center id='QlkXN'></center></pre></bdo></b><th id='QlkXN'></th></span></q></dt></tr></i><div id='QlkXN'><tfoot id='QlkXN'></tfoot><dl id='QlkXN'><fieldset id='QlkXN'></fieldset></dl></div>
            <tbody id='QlkXN'></tbody>

          1. <legend id='QlkXN'><style id='QlkXN'><dir id='QlkXN'><q id='QlkXN'></q></dir></style></legend>
          2. <tfoot id='QlkXN'></tfoot>

            <small id='QlkXN'></small><noframes id='QlkXN'>

              <bdo id='QlkXN'></bdo><ul id='QlkXN'></ul>
                1. 本文介绍了Maven中相同依赖项的不同版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个依赖于 Woodstox 和 XStream 的 maven 项目.不幸的是,XStream 也依赖于 Woodstox,但版本比我需要的稍旧.但与此同时,Woodstox 库的工件名称发生了变化,因此 maven 不会将它们视为同一工件的多个版本.但是包名和类名是一样的,就是运行时有冲突.

                  I have a maven project that depends on both Woodstox and XStream. Unfortunately XStream also depends on Woodstox, but a version slightly older than what I need. In the meantime though, the artifact names of the Woodstox libs changed, so maven won't consider them multiple versions of the same artifact. But the package and class names are the same, which means there is a conflict at runtime.

                  现在,我显然可以以某种方式从构建中破解旧的woodstox jar(在我们的例子中是 war 文件),但是解决此类问题的正确方法是什么?

                  Now, I could obviously hack the old woodstox jar out of the build (a war file in our case) somehow but what is the proper way of solving this type of problem?

                  推荐答案

                  您可以在 xstream 的 dependency 声明中尝试 exclude woodstox 依赖.

                  You could try excluding woodstox dependency in your dependency declaration for xstream.

                    <dependency>
                          <groupId>xstream.group</groupId>
                          <artifactId>xstream</artifactId>
                          <version>a.b.c</version>
                          <exclusions>
                              <exclusion>
                                  <groupId>woodstox.group</groupId>
                                  <artifactId>woodstox</artifactId>
                              </exclusion>
                          </exclusions>
                    </dependency>
                  

                  这篇关于Maven中相同依赖项的不同版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)
                      <tbody id='DWbhS'></tbody>

                      • <legend id='DWbhS'><style id='DWbhS'><dir id='DWbhS'><q id='DWbhS'></q></dir></style></legend>
                        • <bdo id='DWbhS'></bdo><ul id='DWbhS'></ul>
                        • <tfoot id='DWbhS'></tfoot>

                          <i id='DWbhS'><tr id='DWbhS'><dt id='DWbhS'><q id='DWbhS'><span id='DWbhS'><b id='DWbhS'><form id='DWbhS'><ins id='DWbhS'></ins><ul id='DWbhS'></ul><sub id='DWbhS'></sub></form><legend id='DWbhS'></legend><bdo id='DWbhS'><pre id='DWbhS'><center id='DWbhS'></center></pre></bdo></b><th id='DWbhS'></th></span></q></dt></tr></i><div id='DWbhS'><tfoot id='DWbhS'></tfoot><dl id='DWbhS'><fieldset id='DWbhS'></fieldset></dl></div>

                            <small id='DWbhS'></small><noframes id='DWbhS'>