Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Mina JAR dependencies instead of bundles?

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?

like image 806
Naftuli Kay Avatar asked Aug 03 '12 20:08

Naftuli Kay


1 Answers

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>
like image 151
khmarbaise Avatar answered Sep 30 '22 06:09

khmarbaise