Use Mina JAR dependencies instead of bundles?
Asked Answered
Q

1

5

Mina seems to be deploying their artifacts as *.bundle files these days, which, at the very least, is annoying and at best downright evil.

If I depend on Mina in Maven like this:

<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>

...then I get the following error:

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

I'm not sure why it's still looking for *.bundle files instead of *.jar files. Why is it not looking for and finding the JAR files?

This is especially frustrating because I have projects which depend on this project and they all fail without the Mina JARs. Whatever happened to good-old Java JARs?

Quadri answered 3/8, 2012 at 20:1 Comment(0)
G
11

First i have found out that using only the core it works without any problem, but if you start to use mina-integration-bean or mina-integration-jmx you will get the problem. Furthermore i have found the following issue in the JIRA tracker of Mina project which exactly states your problem.

On the other hand you can exclude those bundle dependencies in maven like this:

  <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>
Grainger answered 4/8, 2012 at 17:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.