开发者

How to re-use a dependent project in ant?

We have a project that includes all of our re-usable classes, third-party library JARs and what not. This project is basically just where ALL of the dependencies for every project we are working on. We may only use ant and we may not use Ivy unfortunately. So for example:

./Common-Project (includes all dependencies
  -build.xml (will build this project, the dependencies, and package them all into 1 jar)

./Actual-Project (just one of many projects)
  -build.xml (will call the build.xml in common and ensure it gets the latest jar and then copy that jar into its own deployment EAR)

The problem with this is that when we build all of the actual projects (say all 10 of them, or 40, or whatever it grows to) we end up building the common-project each time.

So, here is what I want to开发者_如何学运维 know.... how can I package this dependency and make sure it is in fact up to date, but without constantly rebuilding it? I'm open to any suggestions (as long as it is just ant we are doing).


By default, javac ant task is executed only for updated/new sources. IIRC, there's a similar principle for building jars. So, normally it shouldn't be a problem for you.

But the problem may arise if you remove existing jar or .class files before each build. In this case, it will be repeated from scratch.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜