In my continuing journey with TeamCity, I’ve discovered something highly annoying… not with TeamCity but with Adobe.

I’m trying to build a master configuration with an Ant script that will automatically build several child modules. First thing I realize is that I have to override the path properties of the child Ant script with relatives paths from the parent script. Ok, that makes sense since it’s a subtask being called from the scope of the parent, so the paths have to be from that directory.

Then I try to call COMPC in the child Ant script. It chokes hard with:

[compc] command line: Error: unable to open 'api/src/Manifest.xml'

“That’s odd,” I think. I know I’m passing it the right path (contained in the ${src.dir} property). However, just to check, let’s echo out the contents of the path I’m sending to the child script.

<fileset id="dir.contents" dir="${src.dir}" includes="*"/>
<property name="file.name" refid="dir.contents"/>
<echo>${file.name}</echo>

I run the script again, and lo and behold, guess what echoes out?

 [echo] Manifest.xml

wtf?

Ant says that the file exists in the path contained in the ${src.dir} property, but the COMPC task says it doesn’t exist?

<compc output="${build.dir}/${build.file}" debug="false">
	<include-namespaces uri="${namespace}" />
	<namespace uri="${namespace}" manifest="${src.dir}/${manifest.filename}" />
   ...

Still haven’t figured this one out, because I’m now stuck in the process of throwing darts with a blindfold on, simply guessing which directory COMPC thinks it’s starting from, because, of course, there’s no way to output anything from inside the COMPC task.

ARGH!!!