Created attachment 28923 [details] enhanced extension-point-test.xml to reproduce the use case with nested include/import ExtensionPoint doesn't work when using nested import/include and fails with a message "referenced target XXXX is not an extension-point". Example : Say we have three distinct build file : * abstract-compile.xml defining an extension point named "compile" * compile-java.xml imports abstract-compile.xml and define a concrete target "compile-java" referenced as an extension-of "compile" * build.xml (the main script) including compile-java.xml with a prefix "myprefix". When project helper try to handle this use case, the build fail with the following message : "referenced target 'compile' is not an extension-point".
Created attachment 28924 [details] patch to add support of extensionpoint with nested import and include The problems seems to come when ProjectHelper duplicate the extension point while importing a build file. ProjectHelper2 implementation is cloning the extension point as if it was a Target (using Target clone constructor). Then, implementation check instanceof extension point and fails with the message mentioned in original description as it is a Target instance and not an ExtensionPoint instance. I attached a patch to fix this.
Patch applied. Thanks!