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



我有一个在 JAVA 7 上运行流畅的 maven 项目,但最近我想将所有内容从 1.7 迁移到 JDK 1.8,但由于 JIBX 库,我开始收到错误跟踪。在一个类似的线程上:[检查这个StackOverflow链接][1]- 我发现只有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,如错误所示:

[INFO]
[INFO] maven-jibx-plugin:1.2.2-AMADEUS-3:bind (default) connectors-verbhandler-1axml
Downloading from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-tools/1.2.2/jibx-tools-1.2.2.pom
Downloaded from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-tools/1.2.2/jibx-tools-1.2.2.pom (2.1 kB at 4.7 kB/s)
Downloading from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-schema/1.2.2/jibx-schema-1.2.2.pom
Downloaded from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-schema/1.2.2/jibx-schema-1.2.2.pom (1.8 kB at 4.2 kB/s)
Downloading from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-run/1.2.2/jibx-run-1.2.2.pom
Downloaded from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-run/1.2.2/jibx-run-1.2.2.pom (1.7 kB at 3.9 kB/s)
Downloading from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-bind/1.2.2/jibx-bind-1.2.2.pom
Downloaded from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-bind/1.2.2/jibx-bind-1.2.2.pom (1.8 kB at 4.1 kB/s)
Downloading from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-extras/1.2.2/jibx-extras-1.2.2.pom
Downloaded from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-extras/1.2.2/jibx-extras-1.2.2.pom (1.7 kB at 3.9 kB/s)   
Downloading from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-tools/1.2.2/jibx-tools-1.2.2.jar
Downloading from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-extras/1.2.2/jibx-extras-1.2.2.jar
Downloading from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-run/1.2.2/jibx-run-1.2.2.jar
Downloading from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-bind/1.2.2/jibx-bind-1.2.2.jar
Downloading from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-schema/1.2.2/jibx-schema-1.2.2.jar
Downloaded from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-extras/1.2.2/jibx-extras-1.2.2.jar (49 kB at 40 kB/s)
Downloaded from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-run/1.2.2/jibx-run-1.2.2.jar (136 kB at 107 kB/s)
Downloaded from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-schema/1.2.2/jibx-schema-1.2.2.jar (271 kB at 112 kB/s)
Downloaded from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-tools/1.2.2/jibx-tools-1.2.2.jar (470 kB at 145 kB/s)
Downloaded from artifact.repository: http://repository.rnd.amadeus.net/mvn-public/org/jibx/jibx-bind/1.2.2/jibx-bind-1.2.2.jar (435 kB at 106 kB/s)
[INFO] Running JiBX binding compiler (single-module mode) on 1 binding file(s)
[INFO] ----------------------------------
[INFO] BUILD FAILURE
[INFO] ----------------------------------
[INFO] Total time: 33.787 s
[INFO] Finished at: 2018-09-10T12:41:15+05:30
[INFO] ----------------------------------
[ERROR] Failed to execute goal org.jibx:maven-jibx-plugin:1.2.2-AMADEUS-3:bind (default) on project connectors-verbhandler-1axml: Error
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [HELP 1] htto:/cwiki.apache.org/confluence/displav/MAVEN/MoToExecutionException
[ERROR] After correcting the problems, you can resume the build with the command

我还在我的工作区中搜索了 1.2.2 声明,但找不到任何东西,在 .m2 文件夹的设置中尝试.xml但仍然没有帮助。任何人都可以在这里提供任何线索吗? 谢谢

由于问题字符限制,这里是POM完整链接的链接.xml - https://ideone.com/IfN9FK

声明 jib 依赖项时未指定 jibx 版本:

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

对于 Java 1.8+,请使用以下依赖项。它会正常工作。我验证了它。

<plugin>
<groupId>org.jibx</groupId>
<artifactId>maven-jibx-plugin</artifactId>
<version>1.3.1</version>
<executions>
<execution>
<goals>
<goal>bind</goal>
</goals>
</execution>
</executions>
<configuration>
<directory>src/main/jibx-bindings</directory>
<includes>
<include>*binding*.xml</include>
</includes>
<verbose>true</verbose>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.bcel</groupId>
<artifactId>bcel</artifactId>
<version>6.3</version>
</dependency>
</dependencies>
</plugin>

最新更新