【问题标题】:Maven dependency using xml file使用xml文件的Maven依赖
【发布时间】:2016-01-29 09:15:12
【问题描述】:

我在 pom.xml 中添加了一个依赖,比如:

<dependency>
  <groupId>org.opendaylight.controller</groupId>
  <artifactId>features-restconf</artifactId>
  <version>1.2.1-Lithium-SR1</version>
  <classifier>features</classifier>
  <type>xml</type>
  <scope>runtime</scope>
</dependency>

这个依赖是一个xml文件,它类似于:(为简单起见)

<feature name ='odl-mdsal-apidocs' version='1.2.1-Lithium-SR1' description="OpenDaylight :: MDSAL :: APIDOCS">
        <feature version='1.2.1-Lithium-SR1'>odl-restconf</feature>
        <bundle>mvn:org.opendaylight.controller/sal-rest-docgen/1.2.1-Lithium-SR1</bundle>
        <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/2.3.2</bundle>
        <bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.3.2</bundle>
        <bundle>mvn:com.fasterxml.jackson.core/jackson-databind/2.3.2</bundle>
        <bundle>mvn:com.fasterxml.jackson.datatype/jackson-datatype-json-org/2.3.2</bundle>
        <bundle>mvn:com.fasterxml.jackson.module/jackson-module-jaxb-annotations/2.3.2</bundle>
        <bundle>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/2.3.2</bundle>
</feature>

我发现 xml 文件中描述为 的所有依赖项都将下载到本地存储库中。所以我认为这是处理项目依赖的另一种方式。但是我在 pom.xml 中找不到任何关于这种依赖使用的信息。

在哪里可以找到有关 Maven 的这一部分的资料?有没有文档或教程?

【问题讨论】:

    标签: java maven-3


    【解决方案1】:

    似乎捆绑功能已被贬低。这可能就是为什么你找不到太多关于它的信息的原因。另一篇文章显示了有关它被弃用的信息以及另一种捆绑方式。请参阅下面的链接。

    Why (and in favor of what) are maven-bundle-plugin's wrap/bundleall goals deprecated?

    希望对你有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-05-05
      • 2021-09-01
      • 1970-01-01
      • 2012-06-30
      • 1970-01-01
      相关资源
      最近更新 更多