[opencms-dev] error in build-single.xml file for modules with additional libraries, fix
Andras Balogh
abalogh at gmail.com
Thu Oct 13 16:38:00 CEST 2005
Hello,
What You describe it was noticed also by me when trying to build the
sources and opencms-modules inside Eclipse.
I thought it was my IDE that is different than other people's.
My environment was Windows XP pro with Eclipse 3.1 (ant emmbedded in
Eclipse i think)
Best regards,
Andras.
Christof Dallermassl wrote:
>hi!
>
>I develop a new module, but did not want the source inside the opencms directory tree.
>So I used the build-single.xml file with slight modifications as my build.xml.
>
>My module needs some external jar files that are located in the
>${module-name}/resources/system/modules/${module-name}/lib
>directory (=${module.input.lib})
>
>The compile target in the build-single.xml file collects all jar files in the
>${module.input.libs} directory and concatenates them to a classpath.
>
>The code used (lines 289-296) are:
><for param="archive">
> <path>
> <fileset dir="${module.input.lib}" includes="*.jar"/>
> </path>
> <sequential>
> <var name="module.libs.path" value="${module.libs.path}:${module.input.lib}/@{archive}" />
> </sequential>
></for>
>
>The problem is that @{archive} already holds the path and therefore
>${module.input.lib}/@{archive} has the path twice. The solution is simple:
>
> <sequential>
> <var name="module.libs.path" value="${module.libs.path}:@{archive}" />
> </sequential>
>
>Although my module is built a little different than the modules that come with opencms, the error
>described above would also be a problem with opencms-modules. But as none of them seems to bring
>additional libraries in the ${module.input.lib} path, no one noticed before :-)
>
>my ant version is
>"Apache Ant version 1.6.5 compiled on June 2 2005"
>working on Linux, Kubuntu 5.10 (maybe this is linux/windows bug)
>
>Thanks for the great work you all did on opencms! This is just my very small approach to
>make it even better.
>
>regards
>Christof
>
>
More information about the opencms-dev
mailing list