从POM.xml中选取的Maven JIBX版本不正确

时间:2018-09-10 08:45:54

标签: java maven jibx maven-jibx

我有一个可以在JAVA 7上顺利运行的maven项目,但是最近我想将所有内容从1.7迁移到JDK 1.8,但是由于JIBX库的缘故,我已经开始获取错误跟踪。在类似的线程上:Check this StackOverflow link-我发现只有JIBX 1.3.0或更高版本与JDK 8兼容。

因此,我在POM.xml中进行了以下更改:

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<ejb-compile.dependency.ant-nodeps.version>1.6.5</ejb-compile.dependency.ant-nodeps.version>
<jdk-home>${jdk16.home}</jdk-home>
<maven.ejb.skip>true</maven.ejb.skip>
<jaxp.version>1.3</jaxp.version>
<jibx.version>1.3.1</jibx.version>
<distributed.context.api.version>1.1.12</distributed.context.api.version>
<distributed.context.impl.version>1.1.12</distributed.context.impl.version>
<generic.context.version>0.1.2</generic.context.version>
<something.uf.version>2.5.9</something.uf.version>
<!-- JConnect -->
<jconnect.version>0.11.1</jconnect.version>
<jconnect.majorversion>0.11</jconnect.majorversion>

但是我得到以下堆栈跟踪信息,我不知道从哪里选择jibx 1.2.2,如错误所示: enter image description here enter image description here enter image description here   我还在工作区中搜索了1.2.2声明,但找不到任何东西,尝试在.m2文件夹的settings.xml中尝试,但仍然没有帮助。有人可以在这里提供任何线索吗? 谢谢

编辑:POM.xml的完整链接-https://ideone.com/IfN9FK (有字符限制,所以我必须提供ideone链接,它以文本形式存在)

1 个答案:

答案 0 :(得分:1)

在声明臂架依赖项时,您没有指定臂架版本:

<plugin>
  <groupId>org.jibx</groupId>
  <artifactId>maven-jibx-plugin</artifactId>
  <version>1.3.0</version> <!-- Here! -->
  <configuration>
    <directory>src/main/jibx</directory>
    <includes>
      <includes>*.xml</includes>
    </includes>
    <verbose>${jibx.verbose}</verbose>
  </configuration>
  <executions>
    <execution>
      <goals>
        <goal>bind</goal>
      </goals>
    </execution>
  </executions>
</plugin>