We have a large amount of apps. They all have a build.xml
file located in the projects base directory. I am trying to create an ant script that will go through and call a specific target on each of the build.xml
files in all the projects.
Here are the issues:
- Some of the projects are in deeper directories than others.
- Only some of the projects need to be built at a time.
I was trying to use subant
+ antfile
and defining a CSV of file paths in a properties file, but this did not work. Below is what i have and the error i am getting.
If there is a better way to do this or you know what my problem is, please let me know! Thanks!
This is the property defined in a property file. I am wanting the person running the script to add the file paths in here that are relative to the current location of the script they are running.
projects.to.build=
This is the subant task i am trying to use in the main build script.
<filelist
id="projectNames"
dir="${basedir}"
files="${projects.to.build}"
/>
<target name="debugAll" description="Builds all the projects listed in the projectNames.properties file.">
<subant target="debug" antfile="${projects.to.build}">
</subant>
</target>
Here is the error i get when i try to run the build script when there are projects defined in the properties file. I am using the relative path. For example: ..AppsAnApp1uild.xml,..AppsAnApp2uild.xml,..OtherAppsfooAnotherApp1uild.xml
"No Build Path Specified" (at my subant task)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…