Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: JiBX 1.1.6
-
Fix Version/s: None
-
Component/s: core
-
Labels:None
-
Environment:windows
-
Number of attachments :
Description
Sorry not sure if this is core or generation tool, but it is ant ant compiler.
I think that the 2 examples are equivalent but they produce significantly different class output files.
When they are separate, my application complains that it can't find the bind files.
<bind verbose="true" load="false">
<classpath>
<pathelement path="$
<pathelement location="${jibx-lib}/jibx-run.jar"/>
</classpath>
<bindingfileset dir="${root}/Java/dino/src/main/java/com/mycom/dino/config/jibx">
<include name="*.jibx.xml"/>
</bindingfileset>
</bind>
gives:
bus_dino:
[bind] Using the following paths:
[bind] c:\dino_build\dino
[bind] Z:\Quentin\ManagerLibs\jibx\latest\lib\jibx-run.jar
[bind] Using the following binding paths:
[bind] Z:\Quentin\Java\dino\src\main\java\com\mycom\dino\config\jibx\clipproperties.jibx.xml
[bind] Z:\Quentin\Java\dino\src\main\java\com\mycom\dino\config\jibx\clippropertieslist.jibx.xml
[bind] Z:\Quentin\Java\dino\src\main\java\com\mycom\dino\config\jibx\cliprushparts.jibx.xml
[bind] Running binding compiler version jibx_1_1_6a
[bind] binding clipproperties:
[bind] context (mp#=2) (cv#=1) (fm#=0)
[bind] mapping direct java.util.Map
[bind] mapping class com.mycom.dino.web.buckets.ClipProperties to element clipproperties (#1)
[bind] context (cv#=0) (fm#=0)
[bind] element wrapper clipproperties
[bind] object binding for com.mycom.dino.web.buckets.ClipProperties create class com.mycom.dino.web.buckets.ClipProperties
[bind] structure ordered
[bind] element id from property id (java.util.UUID)
[bind] mapping reference to java.util.Map using property properties (java.util.Map)
[bind] binding clippropertieslist:
[bind] context (mp#=2) (cv#=1) (fm#=0)
[bind] mapping direct java.util.Map
[bind] mapping class com.mycom.dino.web.buckets.ClipPropertiesList to element clippropertieslist (#2)
[bind] context (cv#=0) (fm#=0)
[bind] element wrapper clippropertieslist
[bind] object binding for com.mycom.dino.web.buckets.ClipPropertiesList create class com.mycom.dino.web.buckets.ClipPropertiesList
[bind] structure ordered
[bind] component property list (java.util.List)
[bind] object binding for java.util.List create class java.util.List
[bind] collection ordered (java.lang.Object)
[bind] element wrapper clipproperties direct
[bind] component property from collection (com.mycom.dino.web.buckets.ClipProperties)
[bind] object binding for com.mycom.dino.web.buckets.ClipProperties create class com.mycom.dino.web.buckets.ClipProperties
[bind] structure ordered
[bind] element id from property id (java.util.UUID)
[bind] mapping reference to java.util.Map using property properties (java.util.Map)
[bind] binding cliprushparts:
[bind] context (mp#=1) (cv#=4) (fm#=0)
[bind] mapping class com.mycom.dino.web.buckets.ClipRushParts to element rushparts (#3)
[bind] context (cv#=0) (fm#=0)
[bind] element wrapper rushparts
[bind] object binding for com.mycom.dino.web.buckets.ClipRushParts create class com.mycom.dino.web.buckets.ClipRushParts
[bind] structure ordered
[bind] element id from property id (java.util.UUID)
[bind] component property rushparts (java.util.Collection)
[bind] object binding for java.util.Collection create class java.util.Collection
[bind] collection ordered (java.lang.Object)
[bind] element wrapper rushpart direct
[bind] component property from collection (com.mycom.dino.bus.RushPart)
[bind] object binding for com.mycom.dino.bus.RushPart create class com.mycom.dino.bus.RushPart
[bind] structure ordered
[bind] element clipid from property clip (com.mycom.dino.bus.Clip)
[bind] element rushid from property rushId (java.util.UUID)
[bind] element start from property start (int)
[bind] element finish from property finish (int)
[bind] element trackno from property trackNo (int)
[bind] element tracktype from property trackType (int)
[bind] element clipstart from property clipStart (int)
[bind] element format from property format (com.mycom.dino.bus.Format)
[bind] Generating code for mapping java.util.Map
[bind] Generating code for mapping com.mycom.dino.web.buckets.ClipProperties
[bind] Generating code for mapping java.util.Map
[bind] Generating code for mapping com.mycom.dino.web.buckets.ClipPropertiesList
[bind] Generating code for mapping com.mycom.dino.web.buckets.ClipRushParts
[bind]
[bind] Wrote 9 files
[bind]
[bind] com.mycom.dino.web.buckets.JiBX_MungeAdapter output file size is 3241 bytes
[bind]
[bind] com.mycom.dino.web.buckets.JiBX_clippropertiesClipProperties_access output file size is 1959 bytes
[bind]
[bind] com.mycom.dino.web.buckets.JiBX_clippropertiesHashMapper_0 output file size is 473 bytes
[bind]
[bind] com.mycom.dino.web.buckets.JiBX_clippropertiesFactory output file size is 2788 bytes
[bind]
[bind] com.mycom.dino.web.buckets.JiBX_clippropertieslistClipPropertiesList_access output file size is 1999 bytes
[bind]
[bind] com.mycom.dino.web.buckets.JiBX_clippropertieslistHashMapper_0 output file size is 481 bytes
[bind]
[bind] com.mycom.dino.web.buckets.JiBX_clippropertieslistFactory output file size is 2808 bytes
[bind]
[bind] com.mycom.dino.web.buckets.JiBX_cliprushpartsClipRushParts_access output file size is 1945 bytes
[bind]
[bind] com.mycom.dino.web.buckets.JiBX_cliprushpartsFactory output file size is 2740 bytes
[bind]
[bind] Kept 4 files unchanged:
[bind] com.mycom.dino.web.buckets.ClipProperties
[bind] com.mycom.dino.web.buckets.ClipPropertiesList
[bind] com.mycom.dino.web.buckets.ClipRushParts
[bind] com.mycom.dino.bus.RushPart
[bind]
[bind] Deleted 0 files:
files:
24/02/2009 11:33 4,149 ClipProperties.class
24/02/2009 11:33 4,010 ClipPropertiesList.class
24/02/2009 11:33 3,788 ClipRushParts.class
24/02/2009 13:01 3,241 JiBX_MungeAdapter.class
24/02/2009 13:01 473 JiBX_clippropertiesHashMapper_0.class
24/02/2009 13:01 1,959 JiBX_clippropertiesClipProperties_access.class
24/02/2009 13:01 481 JiBX_clippropertieslistHashMapper_0.class
24/02/2009 13:01 1,999 JiBX_clippropertieslistClipPropertiesList_access.class
24/02/2009 13:01 2,788 JiBX_clippropertiesFactory.class
24/02/2009 13:01 2,808 JiBX_clippropertieslistFactory.class
24/02/2009 13:01 1,945 JiBX_cliprushpartsClipRushParts_access.class
24/02/2009 13:01 2,740 JiBX_cliprushpartsFactory.class
==================
Using:
<bind verbose="true" load="false" binding="${root}/Java/dino/src/main/java/com/mycom/dino/config/jibx/clipproperties.jibx.xml">
<classpath>
<pathelement path="${output-dir}
/dino"/>
<pathelement location="$
</classpath>
</bind>
<bind verbose="true" load="false" binding="${root}/Java/dino/src/main/java/com/mycom/dino/config/jibx/clippropertieslist.jibx.xml">
<classpath>
<pathelement path="${output-dir}/dino"/>
<pathelement location="${jibx-lib}
/jibx-run.jar"/>
</classpath>
</bind>
<bind verbose="true" load="false" binding="$
{root}/Java/dino/src/main/java/com/mycom/dino/config/jibx/cliprushparts.jibx.xml">
<classpath>
<pathelement path="$
/dino"/>
<pathelement location="$
/jibx-run.jar"/>
</classpath>
</bind>
gives:
bus_dino:
[bind] Using the following paths:
[bind] c:\dino_build\dino
[bind] Z:\Quentin\ManagerLibs\jibx\latest\lib\jibx-run.jar
[bind] Using the following binding paths:
[bind] /Quentin/Java/dino/src/main/java/com/mycom/dino/config/jibx/clipproperties.jibx.xml
[bind] Running binding compiler version jibx_1_1_6a
[bind] binding _Quentin_Java_dino_src_main_java_com_mycom_dino_config_jibx_clipproperties:
[bind] context (mp#=2) (cv#=1) (fm#=0)
[bind] mapping direct java.util.Map
[bind] mapping class com.mycom.dino.web.buckets.ClipProperties to element clipproperties (#1)
[bind] context (cv#=0) (fm#=0)
[bind] element wrapper clipproperties
[bind] object binding for com.mycom.dino.web.buckets.ClipProperties create class com.mycom.dino.web.buckets.ClipProperties
[bind] structure ordered
[bind] element id from property id (java.util.UUID)
[bind] mapping reference to java.util.Map using property properties (java.util.Map)
[bind] Generating code for mapping java.util.Map
[bind] Generating code for mapping com.mycom.dino.web.buckets.ClipProperties
[bind]
[bind] Wrote 5 files
[bind]
[bind] com.mycom.dino.web.buckets.JiBX_MungeAdapter output file size is 300 bytes
[bind]
[bind] com.mycom.dino.web.buckets.ClipProperties output file size is 4874 bytes
[bind]
[bind] com.mycom.dino.web.buckets.JiBX__Quentin_Java_dino_src_main_java_com_mycom_dino_config_jibx_clippropertiesClipProperties_access output file size is 2083 bytes
[bind]
[bind] com.mycom.dino.web.buckets.JiBX__Quentin_Java_dino_src_main_java_com_mycom_dino_config_jibx_clippropertiesHashMapper_0 output file size is 597 bytes
[bind]
[bind] com.mycom.dino.web.buckets.JiBX__Quentin_Java_dino_src_main_java_com_mycom_dino_config_jibx_clippropertiesFactory output file size is 2987 bytes
[bind]
[bind] Kept 0 files unchanged:
[bind]
[bind] Deleted 0 files:
[bind] Using the following paths:
[bind] c:\dino_build\dino
[bind] Z:\Quentin\ManagerLibs\jibx\latest\lib\jibx-run.jar
[bind] Using the following binding paths:
[bind] /Quentin/Java/dino/src/main/java/com/mycom/dino/config/jibx/clippropertieslist.jibx.xml
[bind] Running binding compiler version jibx_1_1_6a
[bind] binding _Quentin_Java_dino_src_main_java_com_mycom_dino_config_jibx_clippropertieslist:
[bind] context (mp#=2) (cv#=1) (fm#=0)
[bind] mapping direct java.util.Map
[bind] mapping class com.mycom.dino.web.buckets.ClipPropertiesList to element clippropertieslist (#1)
[bind] context (cv#=0) (fm#=0)
[bind] element wrapper clippropertieslist
[bind] object binding for com.mycom.dino.web.buckets.ClipPropertiesList create class com.mycom.dino.web.buckets.ClipPropertiesList
[bind] structure ordered
[bind] component property list (java.util.List)
[bind] object binding for java.util.List create class java.util.List
[bind] collection ordered (java.lang.Object)
[bind] element wrapper clipproperties direct
[bind] component property from collection (com.mycom.dino.web.buckets.ClipProperties)
[bind] object binding for com.mycom.dino.web.buckets.ClipProperties create class com.mycom.dino.web.buckets.ClipProperties
[bind] structure ordered
[bind] element id from property id (java.util.UUID)
[bind] mapping reference to java.util.Map using property properties (java.util.Map)
[bind] Generating code for mapping java.util.Map
[bind] Generating code for mapping com.mycom.dino.web.buckets.ClipPropertiesList
[bind]
[bind] Wrote 5 files
[bind]
[bind] com.mycom.dino.web.buckets.JiBX_MungeAdapter output file size is 2489 bytes
[bind]
[bind] com.mycom.dino.web.buckets.ClipProperties output file size is 4668 bytes
[bind]
[bind] com.mycom.dino.web.buckets.JiBX__Quentin_Java_dino_src_main_java_com_mycom_dino_config_jibx_clippropertieslistClipPropertiesList_access output file size is 2247 bytes
[bind]
[bind] com.mycom.dino.web.buckets.JiBX__Quentin_Java_dino_src_main_java_com_mycom_dino_config_jibx_clippropertieslistHashMapper_0 output file size is 605 bytes
[bind]
[bind] com.mycom.dino.web.buckets.JiBX__Quentin_Java_dino_src_main_java_com_mycom_dino_config_jibx_clippropertieslistFactory output file size is 3011 bytes
[bind]
[bind] Kept 2 files unchanged:
[bind] com.mycom.dino.web.buckets.JiBX__Quentin_Java_dino_src_main_java_com_mycom_dino_config_jibx_clippropertiesHashMapper_0
[bind] com.mycom.dino.web.buckets.ClipPropertiesList
[bind]
[bind] Deleted 3 files:
[bind] com.mycom.dino.web.buckets.JiBX_MungeAdapter
[bind] com.mycom.dino.web.buckets.JiBX__Quentin_Java_dino_src_main_java_com_mycom_dino_config_jibx_clippropertiesClipProperties_access
[bind] com.mycom.dino.web.buckets.JiBX__Quentin_Java_dino_src_main_java_com_mycom_dino_config_jibx_clippropertiesFactory
[bind] Using the following paths:
[bind] c:\dino_build\dino
[bind] Z:\Quentin\ManagerLibs\jibx\latest\lib\jibx-run.jar
[bind] Using the following binding paths:
[bind] /Quentin/Java/dino/src/main/java/com/mycom/dino/config/jibx/cliprushparts.jibx.xml
[bind] Running binding compiler version jibx_1_1_6a
[bind] binding _Quentin_Java_dino_src_main_java_com_mycom_dino_config_jibx_cliprushparts:
[bind] context (mp#=1) (cv#=4) (fm#=0)
[bind] mapping class com.mycom.dino.web.buckets.ClipRushParts to element rushparts (#0)
[bind] context (cv#=0) (fm#=0)
[bind] element wrapper rushparts
[bind] object binding for com.mycom.dino.web.buckets.ClipRushParts create class com.mycom.dino.web.buckets.ClipRushParts
[bind] structure ordered
[bind] element id from property id (java.util.UUID)
[bind] component property rushparts (java.util.Collection)
[bind] object binding for java.util.Collection create class java.util.Collection
[bind] collection ordered (java.lang.Object)
[bind] element wrapper rushpart direct
[bind] component property from collection (com.mycom.dino.bus.RushPart)
[bind] object binding for com.mycom.dino.bus.RushPart create class com.mycom.dino.bus.RushPart
[bind] structure ordered
[bind] element clipid from property clip (com.mycom.dino.bus.Clip)
[bind] element rushid from property rushId (java.util.UUID)
[bind] element start from property start (int)
[bind] element finish from property finish (int)
[bind] element trackno from property trackNo (int)
[bind] element tracktype from property trackType (int)
[bind] element clipstart from property clipStart (int)
[bind] element format from property format (com.mycom.dino.bus.Format)
[bind] Generating code for mapping com.mycom.dino.web.buckets.ClipRushParts
[bind]
[bind] Wrote 3 files
[bind]
[bind] com.mycom.dino.web.buckets.JiBX_MungeAdapter output file size is 2463 bytes
[bind]
[bind] com.mycom.dino.web.buckets.JiBX__Quentin_Java_dino_src_main_java_com_mycom_dino_config_jibx_cliprushpartsClipRushParts_access output file size is 2193 bytes
[bind]
[bind] com.mycom.dino.web.buckets.JiBX__Quentin_Java_dino_src_main_java_com_mycom_dino_config_jibx_cliprushpartsFactory output file size is 2859 bytes
[bind]
[bind] Kept 2 files unchanged:
[bind] com.mycom.dino.web.buckets.ClipRushParts
[bind] com.mycom.dino.bus.RushPart
[bind]
[bind] Deleted 5 files:
[bind] com.mycom.dino.web.buckets.JiBX_MungeAdapter
[bind] com.mycom.dino.web.buckets.JiBX__Quentin_Java_dino_src_main_java_com_mycom_dino_config_jibx_clippropertiesHashMapper_0
[bind] com.mycom.dino.web.buckets.JiBX__Quentin_Java_dino_src_main_java_com_mycom_dino_config_jibx_clippropertieslistClipPropertiesList_access
[bind] com.mycom.dino.web.buckets.JiBX__Quentin_Java_dino_src_main_java_com_mycom_dino_config_jibx_clippropertieslistFactory
[bind] com.mycom.dino.web.buckets.JiBX__Quentin_Java_dino_src_main_java_com_mycom_dino_config_jibx_clippropertieslistHashMapper_0
files:
24/02/2009 13:04 4,475 ClipPropertiesList.class
24/02/2009 13:04 4,233 ClipRushParts.class
24/02/2009 13:11 4,668 ClipProperties.class
24/02/2009 13:11 2,463 JiBX_MungeAdapter.class
24/02/2009 13:11 2,193 JiBX__Quentin_Java_dino_src_main_java_com_mycom_dino_config_jibx_cliprushpartsClipRushParts_access.class
24/02/2009 13:11 2,859 JiBX__Quentin_Java_dino_src_main_java_com_mycom_dino_config_jibx_cliprushpartsFactory.class
Same problem here. Seems that If I have two separate projects that each are compiled independently of one another – each project has its own JiBX compilation task (using the binding attribute in the bind task since these are separate). When the build steps for the two independent projects are executed as part of a larger build script, the compilation for the first project encountered executes fine – the compiler updates/generates any needed classes for the first project. When the compilation for the second project executes, the compiler updates/generates any needed classes for the second project, but also deletes one or more generated JiBX classes that were written by the first compilation – for the first project – which is unexpected. My experience is exactly what David illustrates in his second scenario.