有哪些好的 java make 实用程序? [英] What are some good java make utilities?

查看:22
本文介绍了有哪些好的 java make 实用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找用于构建大型 Java 程序的 make 实用程序.我已经知道 ANT,但想看看还有什么可用的.

I'm looking for a make utility for building large java programs. I'm aware of ANT already, but want to see what else is available.

理想情况下,它应该能够处理破坏 GNU Make 的 .java->.class 包目录怪异现象.

Ideally, it should be able to handle the .java->.class package directory weirdness that fouls up GNU Make.

Win32,但跨平台是一个优势.

Win32, but cross platform is a plus.

我发现使用 ANT 有一些缺点,这就是为什么我想看看其他选项,尽管我最终可能会使用它,因为它有效.

I see some cons to using ANT, which is why I wanted to see other options, though I'll probably end up using it anyway, just because it works.

  • 需要非平凡的 XML 生成文件,HelloWorld"已经有 25 行,任何更合理的程序都会很快变大.
    • requires nontrivial XML makefiles, "HelloWorld" is already 25 lines, and any more reasonable program gets large quickly.
      • The ant tutorials show comparisons of ant build.xml files that are roughly identical to big .bat files that just run all the java commands, only longer. http://ant.apache.org/manual/tutorial-HelloWorldWithAnt.html, I've already got one of those.
      • Xml means that every single dependency, variable, target, rule and project has extra cruft on it, it just makes lines hard to read. The Angle Bracket Tax
      • ant 使编写 jar 和 javac 命令行更容易,更容易生成清单,更容易指定 .java 源文件,更容易指定 jvm/java 属性,更容易编写自定义构建工具.
      • ant 并没有让 java 类依赖变得更容易,而且似乎也没有更强大的变量系统,这两件事通常通过 make 实用程序来解决.

      我会使用 gnu make,但它无法确定带有包声明的 .java 文件的 .class 文件将在哪里结束.

      I'd use gnu make, but it can't figure out where the .class file for a .java file with a package declaration is going to end up.

      推荐答案

      Ant 和 Maven 绝对是两个标准.如果你已经熟悉 Ant 并且想要 Maven 自带的依赖管理,你可以看看 Ivy.

      Ant and Maven are definitely the two standards. If you're already familiar with Ant and want the dependency management that comes with Maven, you might take a look at Ivy.

      Ant 和 Maven 都缺乏构建脚本中真正的控制结构.您可以为 Ant 下载一些插件来提供一些这种控制,但是(同样,如果您已经熟悉 Ant)您可以查看 Gant 这是 Ant 的 Groovy 包装器.

      One thing both Ant and Maven lack is true control structures in your build scripts. There are plugins you can download for Ant that provide some of this control, but (again, if you're already familiar with Ant) you may take a look at Gant which is a Groovy wrapper for Ant.

      这篇关于有哪些好的 java make 实用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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