Details
-
Type:
New Feature
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JiBX 1.1.5, JiBX 1.2.2
-
Fix Version/s: JiBX 1.2.3
-
Component/s: maven plugin
-
Labels:None
-
Environment:windows xp, maven 2.2.1, maven-jibx-plugin 1.2.2
-
Number of attachments :
Description
JIBX is nicely divided up into JARs, each of which serves a precise purpose and is required in different phases of the code life cycle.
For example, the jibx-run.jar is the only one which is required at run-time, and you do not need to include it at compile-time (Maven terms).
This is great stuff, which unfortunately is broken by maven-jibx-plugin, which requires (AFAIKT) the jibx-run JAR to be included as a compile-time dependency.
I have tried:
1) Only including jibx-run.jar as a run-time dependency (not listed in the attached file): I get an error when running "mvn jibx:bind" because classes from jibx-run.jar are not available.
2) Including jibx-run.jar as a build extension (this is (A) in the attached file): Same error as 1.
3) Including jibx-run.jar as a plugin dependency (this is (B) in the attached file): Same error as 1.
There is of course the workaround of simply changing the scope of the dependency ("C" in the attached file) to "compile", but this would make jibx-run.jar classes available in my code, which is undesirable.
Why isn't the jibx-run.jar included in maven-jibx-plugin - the other jibx JARs seem to be?
Morton,
The maven-jibx-plugin has been re-written for version 1.2.3 (which should be out within the next few weeks).
It now uses includes the jibx-run module.
To use the new code, please check it out of the cvs dev repository and build it. ie., type:
cvs -z3 -d:pserver:anonymous@jibx.cvs.sourceforge.net:/cvsroot/jibx co -P maven-jibx-plugin
cd maven-jibx-plugin (or dir maven-jibx-plugin if you are using windows)
mvn install
mvn site (this will install the new documentation on your hard disk at target/site
(ignore any warnings)
This will overwrite your maven-jibx-plugin version 1.2.2 with the new code.
Now try to build your maven project. I believe that you
will still need to include the jibx-run (and possibly the jibx-extra and joda-time
modules in your project dependencies). The plugin dependencies are
only relevant while the plugin is running. This should not be a problem, just include
the following dependencies in your project:
<dependencies>
{jibx-version}</version><dependency>
<groupId>org.jibx</groupId>
<artifactId>jibx-run</artifactId>
<version>$
</dependency>
<dependency> <!-- You may need this module depending on what you are doing -->
<groupId>org.jibx</groupId>
<artifactId>jibx-extras</artifactId>
<version>${jibx-version}
</version>
{joda-time-version}</dependency>
<dependency> <!-- If you are using joda-time you will need this -->
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>$
</version>
</dependency>
</dependencies>
For your program to work, you will need jibx-run.jar in the classpath. This dependency declaration will insure that the jibx-run.jar (and others) are included in your runtime distribution.
I am marking this bug as fixed, but I'll wait for the 1.2.3 release to close it.
Thanks,
Don