现在,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发生了什么?
答案 0 :(得分:11)
首先我发现只使用它没有任何问题的核心,但如果你开始使用mina-integration-bean或mina-integration-jmx,你就会遇到问题。此外,我发现following issue in the JIRA tracker of Mina project确切地说明了你的问题。
另一方面,您可以在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>