Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JiBX 1.2.3
-
Fix Version/s: JiBX 1.2.3
-
Component/s: BindGen, maven plugin
-
Labels:None
-
Number of attachments :1
Description
A maven project contains two modules (module1 and module2). Module1 contains some bindings. Module2 contains some extra bindings, that build upon those of module1.
In a multi-module build, one should only reference the bindings of module1. However, it appears as if one must repeat them.
To reproduce, run "mvn process-classes" for the attached sample project.
-
Hide
- prj.zip
- 13/May/11 2:48 PM
- 9 kB
- Alexandros Karypidis
-
- prj/.project 0.4 kB
- prj/.../org.maven.ide.eclipse.prefs 0.2 kB
- prj/module1/.classpath 0.7 kB
- prj/module1/.project 0.5 kB
- prj/module1/.../org.eclipse.jdt.core.prefs 0.3 kB
- prj/module1/.../org.maven.ide.eclipse.prefs 0.2 kB
- prj/module1/pom.xml 0.9 kB
- prj/module1/src/main/config/binding.xml 0.1 kB
- prj/module1/src/.../module1/BaseType.java 0.2 kB
- prj/module2/.classpath 0.7 kB
- prj/module2/.project 0.5 kB
- prj/module2/.../org.eclipse.jdt.core.prefs 0.3 kB
- prj/module2/.../org.maven.ide.eclipse.prefs 0.2 kB
- prj/module2/pom.xml 1 kB
- prj/module2/src/main/config/binding.xml 0.4 kB
- prj/module2/src/.../module2/ComplexType.java 0.3 kB
- prj/pom.xml 1 kB
Activity
Hi Don,
The behavior from command line is identical. Specifically, even though JiBX reports "using binding XXX" for both files, it appears as if the first one is not taken into account while processing the second:
D:\ade\ws\prj>java -jar D:\ade\jibx\lib\jibx-bind.jar -v module1\src\main\config\binding.xml module2\src\main\config\binding.xml
Using paths:
D:\ade\jibx\lib\jibx-bind.jar
D:\ade\jibx\lib\bcel.jar
D:\ade\jibx\lib\jibx-run.jar
D:\ade\jibx\lib\xpp3.jar
D:\ade\jibx\lib\stax-api.jar
D:\ade\jibx\lib\wstx-asl.jar
.
Using bindings:
module1\src\main\config\binding.xml
module2\src\main\config\binding.xml
Running binding compiler version jibx_1_2_3_SNAPSHOT
Error: Cannot find information for class module1.BaseType; on mapping element at (line 2, col 52, in binding.xml)
Error running binding compiler
org.jibx.runtime.JiBXException: Binding binding.xml is unusable because of validation errors
at org.jibx.binding.Utility.loadBinding(Utility.java:358)
at org.jibx.binding.Utility.loadFileBinding(Utility.java:420)
at org.jibx.binding.Compile.compile(Compile.java:217)
at org.jibx.binding.Compile.main(Compile.java:384)
Alexandros,
First, thank you very much for spending the time to include an example.
Since you are getting an error on the command line, you probably have an error in your binding file.
I looked through the JiBX examples and the documentation and I can't seem to find a sample with a pre-compiled base class.
Sorry, but I'm not an expert on JiBX bindings, I maintain the maven plugin. I was assigned your bug since the description seemed like the problem was with the maven plug-in.
Can you repost your question in the JiBX user list. You can ask for the correct binding file syntax to include a pre-compiled jibx binding class.
Include the example that you posted for me.
I'm sure somebody here can help you.
Don
Alexandros,
Does this project work when you execute from the command line?
(ie., java -jar jibx-bind.jar ...)
Don