开发者

how to use a macro in ant tasks not supporting "alien" nested elements

What I am trying to do is to reduce redundancy in my build files. Unfortunately, I cannot figure out a way to circumvent ant's restrictions on nested elements.

One example is externalizing the filling of the MANIFEST, which is the same for all .jars and .ears.

I define a macro, encapsulating the manifest task with a sequential, but trying to use it in a jar task obviously results in a

开发者_高级运维

jar doesn't support the nested "createManifest" element".

Is there a sane way around these restrictions?

Thank you


Could you instead write a macrodef to template your required jar task, including your standardized manifest section there, rather than in its own macrodef.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜