Why is no one using make for Java?

前端 未结 17 1439
生来不讨喜
生来不讨喜 2020-12-12 09:09

Just about every Java project that I\'ve seen either uses Maven or Ant. They are fine tools and I think just about any project can use them. But what ever happened to make

相关标签:
17条回答
  • 2020-12-12 09:35

    ApacheAnt isn't anything like Make. Make is about describing dependencies between files, and how to build files. Ant is about dependencies between "tasks", and is really more of a way of gluing build scripts together.

    it may helps you AntVsMake

    0 讨论(0)
  • 2020-12-12 09:36

    I think the most likely explanation is that several factors discouraged the use of make within the Java community in a critical period of time (the late 1990s):

    1. Because Java encompasses multiple platforms, Java programmers in general were not as adept at Unix tools as were programmers generally confined to a Unix environment (e.g., C and Perl programmers). Note that this is IN GENERAL. Without a doubt there are and were gifted Java programmers with a deep understanding of Unix.
    2. Consequently they were less adept at make and didn't know how to use make effectively.
    3. While it is possible to write a short and simple Makefile that compiles Java efficiently, extra care is required to do so in a platform-independent way.
    4. Consequently there was an appetite for an intrinsically platform-independent build tool.
    5. It was in this environment that Ant and later Maven were created.

    In short, while make most certainly can be used for Java projects, there was a moment of opportunity to make it the de facto Java build tool. That moment has passed.

    0 讨论(0)
  • 2020-12-12 09:39

    Ant is an XML configuration oriented improvement over Makefiles and Maven is a dependency build tool improvement over Ant. Some projects use all three. I think the JDK projects used to use a mix of makefiles and ant.

    0 讨论(0)
  • 2020-12-12 09:39

    One big reason is that both Ant and Maven (and most java targeted SCM, CI and IDE tools) are written in java by/for java developers. This makes it simpler to integrate into your development environment and allows other tools such as the IDE and CI servers to integrate portions of the ant/maven libraries within the build/deployment infrastructure.

    0 讨论(0)
  • 2020-12-12 09:41

    One of the major issues solved by Maven (and Ivy-enabled Ant setups) over make is automated dependency resolution and downloading of your dependency jars.

    0 讨论(0)
  • 2020-12-12 09:45

    The question is based on an incorrect assumption: a non-trivial number of developers do use make. See Java Build Tools: Ant vs. Maven. As for why a developer wouldn't use make: many developers either have never used make, or used it and hated it with a fire that burns hotter than a thousand suns. As such, they use alternative tools.

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