I created a little framework for myself which I want to use in multiple projects. I also want the distributed jar-file to include all external libraries so that my projects just need to include my library to access all external libraries.
I need this to simplify updating the external libraries.
So I placed this in my build.xml which adds all libraries from dist/lib into my own jar-file.
<target name="-post-jar">
<!-- Include all java libraries -->
<fileset dir="dist/lib" id="extern.libs">
<include name="*.jar" />
</fileset>
<!-- Add the libraries from the fileset to the project.jar -->
<jar jarfile="${dist.jar}" update="true">
<zipgroupfileset refid="extern.libs"/>
</jar>
</target>
But when I try to use external libraries like "org.zkoss.zk.ui.Component" I get the error that this library could not be found.
Is there a better way to include the external libraries into my own library so that my project can use them?