java 最好的 Ant 教程/快速入门?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4806829/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
best Ant tutorial / quickstart?
提问by kostja
After having avoided learning ant for far too long (IDEs and copy&paste make it easy for simple tasks) I now see myself forced to get into shape ASAP. Working on a big-ish project, it has become increasingly difficult to know what to copy and where to paste and not to break things along the way.
A search for ant tutorials and quickstarts yields literally thousands of results, so please share your experience - which one gets to the point fast and still is comprehensive?
I'm secretly hoping for something like the glorious hginit tutorial. Does such a thing exist for ant?
EDIT: Looks like a big win for the official docs so far. Makes it quite difficult to pick an answer to accept as they are all so similar.
I have found a decent tutorial going beyond the basics of the official HelloWorld, featuring JUnit testing, reports and SVN checkouts here. But after completing I still have to turn to the docs for more.
在避免学习 ant 太久之后(IDE 和复制粘贴使简单的任务变得容易)我现在看到自己被迫尽快成型。在一个大型项目上工作,越来越难知道要复制什么和粘贴到哪里,并且在此过程中不破坏东西。
搜索 ant 教程和快速入门会产生数以千计的结果,所以请分享您的经验 - 哪个快速切入点并且仍然是全面的?
我暗暗希望能有类似辉煌的hginit 教程之类的东西。蚂蚁有这种东西吗?
编辑:到目前为止,对于官方文档来说似乎是一个巨大的胜利。由于它们都非常相似,因此很难选择接受的答案。
我找到了一个不错的教程,它超越了官方 HelloWorld 的基础知识,在此处介绍了 JUnit 测试、报告和 SVN 检出。但完成后,我仍然必须转向文档以获取更多信息。
采纳答案by ideally_world
http://ant.apache.org/manual/tutorial-HelloWorldWithAnt.htmlis probably your best bet. It covers the basics enough to get your feet wet, then after that, you are really going to want to just dive into the manual http://ant.apache.org/manual/.
http://ant.apache.org/manual/tutorial-HelloWorldWithAnt.html可能是您最好的选择。它涵盖了足以让您涉足的基础知识,然后,您真的只想深入了解手册http://ant.apache.org/manual/。
The problem you my face is that Ant is a script language (as opposed to a tool like mercurial), so it is more complicated and if you are not careful, you are likely to make a mess in the process. Not saying it's a bad tool, just don't pound out a ton of Ant script without reflecting on what you're doing every now and then.
你我面临的问题是 Ant 是一种脚本语言(相对于像 mercurial 这样的工具),所以它更复杂,如果你不小心,你很可能会在过程中弄得一团糟。并不是说它是一个糟糕的工具,只是不要在不时反思您正在做什么的情况下编写大量 Ant 脚本。
回答by CoolBeans
I think the best way for you to learn is by asking specific questions. Instead of copying/pasting without understanding what it is you will not learn much. Start working on a build.xml and when you get stuck ask questions here or at the chat gallery.
我认为最好的学习方式是提出具体问题。而不是在不了解它是什么的情况下复制/粘贴,您将不会学到很多东西。开始在 build.xml 上工作,当您遇到问题时,请在此处或在聊天库中提问。
For what is worth I like the official ant tutorial. Also I have been using mavenfairly exclusively for most of my projects now and that is also something worth considering if you have your team buy into on it.
对于什么值得我喜欢官方的蚂蚁教程。此外,我现在在我的大部分项目中都相当专门地使用maven,如果你的团队购买它,这也是值得考虑的事情。
回答by Kevin Stembridge
I think the Ant manual is the best place to start. I've been using Ant for years and I've never needed a book or tutorial.
我认为 Ant 手册是最好的起点。我已经使用 Ant 多年了,我从来不需要一本书或教程。
回答by Manuel Selva
Personally I never find it and after one week of research I gave it away. I decided to learn getting my hands dirty and using the Ant Tasks help pages. It was not so difficult to get things done.
就我个人而言,我从未找到它,经过一周的研究,我把它送走了。我决定学习动手操作并使用Ant Tasks 帮助页面。把事情做好并不是那么困难。