I have created an EAR project in Eclipse to be deployed on JBoss. In there I have created 4 projects, One EAR, under it one Hibernate project(data tier), one EJB project(bussiness tier) and Dyanamic Web Project(web project).
MBS(EAR)
-MBSData
-MBSEjb
-MBSWeb
I am creating ANT build.xml for this project. I have created individual build.xml from every project. I will be creating build.xml for MBS(EAR) project and in this build.xml, I will be calling child build.xml like
<target name="build" description="build all projects in reference to this project">
<ant antfile="build.xml" dir="${MBSData.location}" inheritAll="true" target="build"/>
</target>
Since in every build.xml the jboss_runtime_classpath is duplicated, I want to put it at one place. So I want to know how this classpath can be propagated to child build.xml?
One option to define classpath in build.xml and import it every where. This is available in ant 1.8. (Probably available in earlier version. See comment from @ Oers )
I would not suggest the idea of defining a single classpath and use it every where. Each project should have well defined compile time dependency and runtime dependency(say for tests or running app using ant). Having a big class path that is reused everywhere will lead to code from one area (say GUI) using code from another(say persistence)