开发者

Add behavior in imported ant task?

I'm setting up a common ant file (build-common.xml) for my team, which will开发者_StackOverflow中文版 be imported from each sub-project's build.xml file. Is there a way to define a "clean" task (for example) in build-common.xml such that individual build.xml files can either leave it unchanged or add behavior to it? The equivalent in Java would be:

@Override
void clean()
{
    super.clean();
    /* do something additional */
}

I am using the latest release of ant: 1.8.2.


I found an answer to my question at http://wiki.apache.org/ant/NewAntFeaturesInDetail/Import:

    <project name="main">
      <import file="config/common.xml" />

      <target name="build" depends="common.build">
        ...
      </target>
      ...
   </project>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜