5

Mina 最近似乎将他们的工件部署为*.bundle文件,这至少是令人讨厌的,充其量是彻头彻尾的邪恶。

如果我像这样在 Maven 中依赖 Mina:

<dependency>
    <groupId>org.apache.mina</groupId>
    <artifactId>mina-core</artifactId>
    <version>${mina.version}</version>
    <type>jar</type>
</dependency>
<dependency>
    <groupId>org.apache.mina</groupId>
    <artifactId>mina-integration-beans</artifactId>
    <version>${mina.version}</version>
    <type>jar</type>
</dependency>
<dependency>
    <groupId>org.apache.mina</groupId>
    <artifactId>mina-integration-jmx</artifactId>
    <version>${mina.version}</version>
    <type>jar</type>
</dependency>

...然后我收到以下错误:

Multiple annotations found at this line:
- Missing artifact org.apache.mina:mina-integration-ognl:bundle:2.0.4
- Missing artifact org.apache.mina:mina-core:bundle:2.0.4
- Missing artifact org.apache.mina:mina-integration-beans:bundle:2.0.4

我不确定为什么它仍在寻找*.bundle文件而不是*.jar文件。为什么它不查找和查找 JAR 文件?

这尤其令人沮丧,因为我有一些依赖于这个项目的项目,而且如果没有 Mina JAR,它们都会失败。旧的 Java JAR 发生了什么?

4

1 回答 1

11

首先我发现只使用核心它没有任何问题,但如果你开始使用 mina-integration-bean 或 mina-integration-jmx 你会遇到问题。此外,我在 Mina 项目的 JIRA 跟踪器中发现了以下问题,它准确地说明了您的问题。

另一方面,您可以像这样在 Maven 中排除这些捆绑包依赖项:

  <dependencies>
    <dependency>
      <groupId>org.apache.mina</groupId>
      <artifactId>mina-core</artifactId>
      <version>2.0.4</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.apache.mina</groupId>
      <artifactId>mina-integration-beans</artifactId>
      <version>2.0.4</version>
      <type>jar</type>
      <exclusions>
        <exclusion>
          <groupId>org.apache.mina</groupId>
          <artifactId>mina-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.mina</groupId>
      <artifactId>mina-integration-ognl</artifactId>
      <version>2.0.4</version>
      <type>jar</type>
      <exclusions>
        <exclusion>
          <groupId>org.apache.mina</groupId>
          <artifactId>mina-core</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.mina</groupId>
          <artifactId>mina-integration-beans</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.mina</groupId>
      <artifactId>mina-integration-jmx</artifactId>
      <version>2.0.4</version>
      <type>jar</type>
      <exclusions>
        <exclusion>
          <groupId>org.apache.mina</groupId>
          <artifactId>mina-core</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.mina</groupId>
          <artifactId>mina-integration-beans</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.mina</groupId>
          <artifactId>mina-integration-ognl</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
于 2012-08-04T17:40:15.760 回答