When issuing "ant war" from the SDK /ext directory, the wrong module.name property is used.
This can be shown by adding:
to build-common-ext.xml and have the "war" target depend on "showModuleName,compile".
If we assume we have an ext-project named "webshop-ext", building directly in /ext/webshop-ext will work fine, but building in the ext directory will use module.name=webshop-ext when the build descends into the submodules of the webshop-ext project. I.e. module.name would be expected to be "ext-service" in that submodule.
The problem possibly relates to passing params to ant tasks. This will have the param be sent as a command line parameter and not inhibited by subsequent inheritAll="false". So when the first level of "loop-modules" in "build-common-plugins.xml" is executed, the inheritAll="false" of the "war-module" task will not inhibit the outer module.name (= webshop-ext) to be sent. When the "compile" target of build-common-ext.xml subsequently is called, sending a module.name as param in compilation antcalls will be overriden by the module.name sent as command line parameter and module.name will thus still be "webshop-ext" instead of the expected "service" etc.