如何与一般蚂蚁懒洋洋配置或增量构建? [英] How to configure lazy or incremental build in general with Ant?

查看:120
本文介绍了如何与一般蚂蚁懒洋洋配置或增量构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Java编译器提供了增量编译,所以的的javac 的Ant任务为好。但大多数其他进程没有。

Java compiler provides incremental build, so javac ant task as well. But most other processes don't.

考虑建造过程中,他们改变一组文件(源)到另一个文件集(目标)。

Considering build processes, they transform some set of files (source) into another set of files (target).

我可以在这里不同的两种情况:

I can distinct two cases here:


  1. 变压器厂的不能取源文件的一个子集,只能是整个集。在这里,我们只能懒构建 - 如果不从源文件进行了修改 - 我们跳过处理

  2. 变压器厂的可以取源文件的子集,并产生部分结果 - 增量编译

  1. Transformator cannot take a subset of source files, only the whole set. Here we can only make lazy build - if no files from source was modified - we skip processing.
  2. Transformator can take a subset of sources files and produce a partial result - incremental build.

什么是蚂蚁内部,第三方扩展或其他工具来实现懒惰和增量构建?
你能否提供一些wides $ P $垫构建文件的例子吗?

What are ant internal, third-party extensions or other tools to implement lazy and incremental build? Can you provide some widespread buildfile examples?

我有兴趣这与GWT编译器在具体工作。

I am interested this to work with GWT compiler in particular.

推荐答案

借助 UPTODATE 任务是Ant的通用的解决这个问题。它足够灵活,在大多数情况下工作,其中懒惰或渐进式编译是可取的。

The uptodate task is Ant's generic solution to this problem. It's flexible enough to work in most situations where lazy or incremental compilation is desirable.

我有同样的问题,因为你:我有一个GWT模块作为我的code的一部分,我不想支付重新编译的(重的!)费用时,我不需要。在我的情况该解决方案看起来是这样的:

I had the same problem as you: I have a GWT module as part of my code, and I don't want to pay the (hefty!) cost of recompiling it when I don't need to. The solution in my case looked something like this:

<uptodate property="gwtCompile.mymodule.notRequired"
  targetfile="www/com.example.MyGwtModule/com.example.MyGwtModule.nocache.js">
    <srcfiles dir="src" includes="**"/>
</uptodate>

<target name="compile-mymodule-gwt" unless="gwtCompile.mymodule.notRequired">
    <compile-gwt-module module="com.example.MyGwtModule"/>
</target>

这篇关于如何与一般蚂蚁懒洋洋配置或增量构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆