Ant to add workspace folder in classpath as a dependent project -
i have 1 ant project xyz, want, when put project 1 random workspace, , when build xyz automatically add workspace folder config (already present in workspace) , task (already present in workspace) classpath dependent project.
well, if projects in workspace follow same standard classfile folder, let's project/build
:
project1/ build/ class files... project2/ build/ class files... project3/ build/ class files... xyz/ build.xml
.. set classpath in xyz/build.xml
this:
<project basedir="."> <path id="my.classpath"> <dirset dir=".." includes="**/build"/> </path> <javac classpathref="my.classpath"> ... </javac> </project>
in way, of .class files produced in every project else in workspace included in compilation of xyz.
in case know projects want include in xyz's classpath, have set this:
<project basedir="."> <path id="my.classpath"> <pathelement location="../project1/build"/> <pathelement location="../project2/build"/> </path> <javac classpathref="my.classpath"> ... </javac> </project>
Comments
Post a Comment