Maven incorrect version of JIBX getting picked from POM.xml

491 views Asked by At

I have a maven project that is running smoothly on JAVA 7 but recently I wanted to migrate everything from 1.7 to JDK 1.8 but I've started getting error traces because of JIBX libraries. On a similar thread : [Check this StackOverflow link][1]- I found that only JIBX version 1.3.0 or higher is compatible with JDK 8.

So I made the following changes in my 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>

But I'm getting the following stack trace and I have no idea from where it is picking jibx 1.2.2 as is seen in the error :

[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

I also searched for 1.2.2 declaration in my workspace but couldn't find anything, tried in .m2 folder's settings.xml but still no help. Can anybody please provide any leads here? Thanks

Due to the question character limit, here is a link to the full Link of POM.xml - https://ideone.com/IfN9FK

2

There are 2 answers

2
Mureinik On BEST ANSWER

You aren't specifying the jibx version when you declare the jib dependency:

<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>
0
Manjunatha B On

For Java 1.8+, use the below dependency. It will work fine. I verified it.

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