[
http://jira.codehaus.org/browse/JIBX-208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dennis Sosnoski resolved JIBX-208.
----------------------------------
Assignee: Dennis Sosnoski
Resolution: Fixed
Fix Version/s: JiBX 1.1.6
I've verified this behavior on Linux, so it's not a platform-specific issue. It
doesn't appear to be anything to do with JiBX per se, though. The problem
instead appears to be with either Ant or the actual JVM's handling of jar
references within jar files.
The old documentation says that users should define their Ant "bind" task in
this way:
<!-- JiBX binding compiler task definition -->
<taskdef name="bind" classname="org.jibx.binding.ant.CompileTask"
classpath="${jibx-lib}/jibx-bind.jar"/>
The referenced jibx-bind.jar internally references the other jar files needed
by the binding compiler, by way of the META-INF/manifest.mf file, which
includes this line:
Class-Path: bcel.jar jibx-run.jar xpp3.jar stax-api.jar wstx-asl.jar
It appears that if the path to the jars contains a space, these jar references
are not resolved.
I've updated the documentation to instead show the Ant "bind" task definition
as:
<!-- JiBX binding compiler task definition -->
<taskdef name="bind" classname="org.jibx.binding.ant.CompileTask">
<classpath>
<fileset dir="${jibx-lib}" includes="*.jar"/>
</classpath>
</taskdef>
This form of task definition works correctly, even with spaces in the path.
> CompileTask fails when directory has a space in it
> --------------------------------------------------
>
> Key: JIBX-208
> URL: http://jira.codehaus.org/browse/JIBX-208
> Project: JiBX
> Issue Type: Bug
> Components: core
> Affects Versions: JiBX 1.1.5
> Environment: Windows XP, Java 1.5.0_07, Ant 1.6.5
> Reporter: Brian Sperlongano
> Assignee: Dennis Sosnoski
> Fix For: JiBX 1.1.6
>
>
> When the ant CompileTask is called from within a directory which contains a
> space in the path, the compile fails with the following error:
> BUILD FAILED
> C:\lis bon\build.xml:148: The following error occurred while executing this
> line:
> C:\lis bon\lisbon-sm\build.xml:18: taskdef A class needed by class
> org.jibx.binding.ant.CompileTask cannot be found:
> org/jibx/runtime/JiBXException
> Notice the spaces in the path name.
> This particular build works when run from a directory which does not contain
> a space.
> I am using the compile task via
> <!-- JiBX binding compiler task definition -->
> <taskdef name="bind" classname="org.jibx.binding.ant.CompileTask"
> classpath="lib/jibx-bind.jar" />
> and then later in the script
> <bind verbose="true" load="true"
> binding="${basedir}/conf/jibx-bindings.xml">
> <classpathset dir="classes" />
> </bind>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs