Ant dependency management

后端 未结 5 421
挽巷
挽巷 2021-01-02 00:03

It seems that ant dependency management isn\'t great to say the least... But, is there hope? Today there are better choices for build or project management such as maven, iv

相关标签:
5条回答
  • 2021-01-02 00:14

    I've been using Ivy for the last 4 years (way before it joined Apache) and haven't had any regret.

    Without knowing much about your Ant files, it's a little bit difficult to give a definitive answer but I guess that the projects are build in one go. This means that they can't individually publish their artifacts (or jar files) into a central repository.

    The solution is to use both a central (for common libraries) and local (for your project) repositories. You can take a look at my public projects and especially the ivysettings.xml file because they use exactly this very principle.

    0 讨论(0)
  • 2021-01-02 00:15

    Just to disillusion you: dependency management in combination with a build system is hard! Unless you have a really simple example, this is not a no-brainer, and you will have to invest some work.

    If you want to or have to use Ant, Ivy is definitely a good choice. Being an official sub-project of Ant, it integrates relatively smoothly.

    0 讨论(0)
  • 2021-01-02 00:26

    Here's my take: use the best of both worlds: Maven just for dependencies and Ant for your day-to-day build heavy-lifting:

    Why you should use the Maven Ant Tasks instead of Maven or Ivy

    0 讨论(0)
  • 2021-01-02 00:32

    There's a new open source build system for Java called EBuild (features) that is a great alternative to Ant/Ivy as it is especially good at dependency management.

    There's some detailed articles on the deficiencies of Ant and also Maven on the site.

    0 讨论(0)
  • 2021-01-02 00:36

    If you already use Ant, then your best bet is to use Ivy for dependency management.

    http://ant.apache.org/ivy/

    It provides a rich set of ant tasks for dependency manipulation.

    0 讨论(0)
提交回复
热议问题