And of course, you then just do: ant clean deploy
from the top level directory and that will then run those targets for all sub-projects.
-Jaikiran On 28/11/20 9:34 pm, Jaikiran Pai wrote:
It's a bit too late here, so I'll keep this short for now. In one of the projects that we have, which has a similar structure, we use Ivy's buildlist task[1] to first create the ordered list of projects that need to be built and then invoke on that ordered list. So the top level build.xml will have something like ("clean" and "deploy" are just example common targets in all these projects):<target name="build-modules-list"> <ivy:buildlist reference="modules"> <fileset dir="${basedir}" includes="*/**/build.xml"/> </ivy:buildlist> </target> <target name="clean" depends="build-modules-list"> </target> <target name="deploy" depends="build-modules-list"> <!-- invoke on each sub-project, in the "modules" reference --> <subant buildpathref="modules"> <target name="clean"/> <target name="deploy"/> </subant> </target> [1] https://ant.apache.org/ivy/history/2.5.0/use/buildlist.html -Jaikiran On 28/11/20 9:27 pm, Robert 'Bobby' Zenz wrote:Can somebody give me a quick rundown regarding the usage of Ant+Icy when having multiple projects in the same repository. I'm a little bit confusing regarding how to define the dependency. Let's assume that Project AB has the two modules A and B: Parent AB |-Project A | |-src | |-build.xml | \-ivy.xml |-Project B | |-src | |-build.xml | \-ivy.xml \-build.xml I'm unsure how to make B depending on A, and how to correctly declare that dependency in the ivy.xml of B. Do I need to define a custom resolver which is checking the other project? Can somebody give me a quick rundown on what is the best way to do this? Or should I structure my project differently?
