Slashdot Mirror


Ant Now A Top Level Apache Project

hardcorejon writes "Am I the only person who didn't notice that on November 18th 2002, the Apache Ant Project had migrated out from under the Jakarta Project umbrella to become a top-level Apache project, joining the ranks of the Apache HTTP Server Project? Well, for those of us who use Ant on a regular basis, this is great news. Ant is an incredibly powerful tool, increasingly a standard build system for many new projects."

39 comments

  1. What is Apache Ant? by fulldecent · · Score: 5, Informative
    What is Apache Ant? Ant is a Java-based build tool. In theory, it is kind of like Make, without Make's wrinkles and with the full portability of pure Java code.

    info about ant

    --

    -- I was raised on the command line, bitch

    1. Re:What is Apache Ant? by pbox · · Score: 1

      Yeah, I just hope it does not turn out like the Oracle installation Java mess, yuck!

      --
      Code poet, espresso fiend, starter upper.
    2. Re:What is Apache Ant? by Scarblac · · Score: 3, Insightful

      ...and with the full portability of pure Java code.

      As opposed to make, which is written in C, which only runs on a few platforms?

      Of course, if you're writing Java, Ant will run on exactly the platforms you need it on so it's great. It's great anyway because it's just so easy to use. But portability is not an advantage it has over make.

      Reminds me of the debate about converting Python to compile using autoconf/automake because it would be 'more portable'. The Python people won't do it, because Python currently runs on a lot more platforms than autoconf...

      --
      I believe posters are recognized by their sig. So I made one.
    3. Re:What is Apache Ant? by Anonymous Coward · · Score: 3, Informative

      Make also requires shell. Ant doesn't. That's the reason they give for Ant being more portable.

    4. Re:What is Apache Ant? by Anonymous Coward · · Score: 0

      Java will run _as_is_ on any platform with a JVM. C-source code will run on any platform with a C compiler _once_the_source_code_has_been_compiled_.

      HTH
      A Cowardly None

    5. Re:What is Apache Ant? by bay43270 · · Score: 3, Informative

      As opposed to make, which is written in C, which only runs on a few platforms?

      You can't even copy a file in make without knowing what kind of system your on. Take a look at the targets available in ant some time. Its built to remove the need to access the operating system (as opposed to make, which offers dependency checking and little else.

      I'm not trying to fault make... it simply wasn't built to be cross-platform. But lets not pretend that being available on many platforms and allowing cross-platform code are even close to the same thing.
    6. Re:What is Apache Ant? by Ouroboro · · Score: 4, Informative

      ...But portability is not an advantage it [ant] has over make.

      Actually it is. The reason for this is that make (and it's derivatives) relies upon shell commands to extend it's functionality. These shell commands cause the make file to be incompatible to any platform where that shell is not installed. Ant on the other hand can be extended via java, so these extensions are compatible with any other platform that runs the jvm. If make offered some sort of ability to dynamicly add functionality in a platform neutral way, then make would be as portable as ant.

      --
      When I want your opinion I will beat it out of you.
    7. Re:What is Apache Ant? by aoteoroa · · Score: 1

      I have been wondering about ant for a while. I work for a small company (two java programmers) I use MacOSX at work, and the other guy uses Windows, we both use JBuilder.

      Is there anything that ant could do in this situation that JBuilder (which has downloadable 'free beer' versions available) couldn't or is ant more useful in situations where not everybody is using the same IDE.

    8. Re:What is Apache Ant? by The+AtomicPunk · · Score: 2, Funny

      You've never compiled a C program have you ?

    9. Re:What is Apache Ant? by Old+Wolf · · Score: 1

      I think by portability he meant being able to use the same make file for all systems. Many open source projects I've downloaded have come with a slough of makefiles (eg. Makefile, Makefile.W32, Makefile.sco, Makefile.vms, Makefile.NT, ....)

    10. Re:What is Apache Ant? by Znork · · Score: 1

      Indeed. That's why people use autoconf and automake instead.

    11. Re:What is Apache Ant? by KillerLoop · · Score: 1

      most definitely.

      I use IDEA as my IDE, but use ant tasks exclusively for the whole cycle from setting up the environment, compiling, testing and deploying. It also builds schemas from DTDs and feeds them to generator packages that automatically produce Java objects to work with.

      And thats just a pretty meager example, there are tasks for virtually everything (it's the way to extend ants functionality). If there's one lacking that does what you want, roll your own, it's easy to extend.

      When I'm done testing locally I finally use ant to deploy it to the target clusters.

      Couple of colleagues use JBuilder or Forte, but use the same ant build file, and it works like a charm.

      look it up at ant.apache.org, you won't regret it.

    12. Re:What is Apache Ant? by AugstWest · · Score: 1

      Not only can you hook it into JBuilder or IDEA, you can use it to set off your unit testing. I think there's even profiling available as well.

  2. Yes, but by wcbarksdale · · Score: 2, Funny

    Will it be patched to work in space?

  3. Answer to your question... by Anonymous Coward · · Score: 0

    Am I the only person who didn't notice that on November 18th 2002, the Apache Ant Project had migrated out from under the Jakarta Project umbrella to become a top-level Apache project, joining the ranks of the Apache HTTP Server Project?

    Ummm... yes? As you said yourself, it's been there since nov. 18th. Anyone who's been to their website has noticed (whether they actively noticed it or not).

    Good thing this isn't on the front page. And is a very useful tool but it's not worth mentioning "oh, btw, ant got moved to the main apache screen back in last november". If you noticed it then, then it *might* be worth a small announcement (not sure even that is warranted). Noticing it now, who cares?

  4. Alternatives to ant and autoconf et al? by Panoramix · · Score: 4, Interesting

    This is somewhat off-topic, but reading about Ant remembered me of a question I've been meaning to ask the net for some time now. Since it involves software for building software, this thread may be a good place to do it (and it's only karma, anyway :-)

    For a long time I've been wishing that there was an alternative to autoconf. I mean, autoconf is useful, and I still don't know of a better way to build complex stuff on a lot of platforms. But it is painfully slow on small machines, it's hell to make it run on Win32, and it is way too complex, requiring you to write scripts that run through three different interpreters (sh, m4 and make), each with more than their fair share of syntactic weirdness and idiosyncrasies.

    (I'm using it for a product we're developing in my company, and I'm the only one who knows how the build system works. It's black magic for everyone else. I do work with very competent programmers, but only I have the patience for making autoconf scripts. Granted, we push it a bit hard: one of our targets is Win32. That part is the worse. Cross-compiling and running from cygwin, with libtool and all that, is tough shit. Every now and then I get so pissed off with it that I start writing plain Makefiles, one for each architecture/OS. Then I reconsider, realize the maintenance hell that would become, and go back to work even blacker magic on the acinclude.m4's... *sigh*)

    So, this Ant here I welcomed with high hopes some months ago, and then dumped it just as fast. The thing is: it's Java. It requires you to install a JVM to build a project. Some of our build machines, the most exotic ones, are so small that I would say they're barely able to run the monstruous configure scripts that autoconf creates... So, run a JVM. Right.

    Also, when I tried it, Ant was good to build Java stuff, but required some serious hacking to make it build C or C++ (or anything else, for that matter). Since it was targeted to build projects on essentially one platform (Java), it's really hard to make it check for availability of libraries or headers, and to define macros for conditional compilation and stuff. And of course, it didn't have all that "knowledge" autoconf has accumulated over the years, with regard to the subtle peculiarities of each platform. So I found Ant to be nothing more than a fancy make. And I already have make.

    So, I'd like to ask: Is Ant any better for non-Java stuff these days? Is someone using it for non-Java projects? And, while I'm at it, does anyone know of a practical alternative for autoconf?

    1. Re:Alternatives to ant and autoconf et al? by redcliffe · · Score: 0, Offtopic

      What I'd like is a tool that would scan my source tree and make the autotools(autoconf, automake,etc) input files automatically. That would make my life much easier.

      David

    2. Re:Alternatives to ant and autoconf et al? by rplacd · · Score: 5, Informative

      Some alternatives to ant/make are

      • cook (probably the best contender),
      • Mk (which is like bitkeeper+make),
      • Jam,
      • cake (does anyone use this any more?), and
      • the Plan 9 mk.

      There's also something called Cons, but it needs perl to work. See this.

      I haven't found a good alternative to autoconf yet. There used to be Metaconfig, but I don't know who maintains it any more (or where). It produces configure scripts similar to what you see when you configure perl. This guy uses some unreleased software package for his build systems that tend to work really well -- for C code under Unix.

      Come to think of it, if someone ports/writes a build tool in C#, you'd be set.

    3. Re:Alternatives to ant and autoconf et al? by Anonymous Coward · · Score: 2, Informative

      NAnt is a .Net version of Ant. Been around for about a year now I think:

      http://nant.sourceforge.net/

      For Java, Ant is one of the few options. You cannot be sure perl/make etc are installed on a user's platform, but if they're grabbing Java code, they have Java.

    4. Re:Alternatives to ant and autoconf et al? by True_Seeker · · Score: 2, Interesting

      There is also A-A-P, which is a new project built using Python. You create a recipe to execute all parts of the build. For example, to build Vim, you download the recipe, run aap, and it will download all the sources (from tarballs or CVS) and patches, apply the patches, run configure and make. Everything is cached locally so after the initial download, you no longer need a net connection to rebuild things.

    5. Re:Alternatives to ant and autoconf et al? by steve_l · · Score: 3, Informative

      Actually Ant does C++ code quite nicely via the task from ant-contrib.sf.net. This task is biased towards the gcc chain, but works with many others

      One nice thing does is dependency check based on header file inclusion info, and your compiler settings. So you dont need to state dependencies, the task works it out for your. slick.

    6. Re:Alternatives to ant and autoconf et al? by slick_rick · · Score: 1

      Trolltech has a (free) tool to do that. It is called qmake. It will generate a "project file" for you, then you generate a makefile from that (again with qmake). It is insanely simple, works anywhere QT does (including compilers other then GCC, like M$VC++, BCC, ICC, etc)

      --
      apt-get install redhat please god - Me (take it easy, I love Debian)
  5. OSS Ant? by Tuxinatorium · · Score: 0, Offtopic

    Well, It's good to see we're getting help from other parts of the animal kingdom. I'll be careful not to step on it.

  6. Ant, etc.. by steveheath · · Score: 4, Interesting

    Ant (apparently) was always a top-level project, it just kinda got a little userped by jakarta. Actually the whole jakarta/apache comunity has had quite a change recently.. Many projects have been promoted to top-level, there's new "management" and things appear a lot more organised.

    Imho, I think this was over-due as it was getting a little confusing. I hear talk at one point that apache would become another source-forge, but I'm glad to see the (oldest, most well-known, most respected?) OSS project has maintained focus.

    1. Re:Ant, etc.. by Anonymous Coward · · Score: 0

      i practically live on apache/jakarta. fuck the tools, the user base is awesome

  7. And makes too many assumptions. by DeadSea · · Score: 2, Interesting
    Ant makes too many assumtions to ever be the flexible build tool that I want. I use make for my Java projects and I prefer it to Ant. The main advantages that people site with Ant is that it only makes one instance of the Java compiler. Well, I can do that with make as well, it just takes a little bit of scripting. Ant wants to have bld and src directories where I want everything in one. This assumption about how things should be organized kills it for me because I can't use it with my existing organization. I have many reasons for wanting it this way:
    1. For open source Java projects I want to distribute the source code in the binary.
    2. It is nice to be able to view the source code of the application from the application by using the classloader.
    3. When everybody has the source, anybody can modify it.
    Ant also does not have a spell check module, something that is really easy to put into make.
    1. Re:And makes too many assumptions. by msuzio · · Score: 4, Informative

      Hmm... I think you dropped Ant too quickly. It certainly doesn't require separate build and source directories. I use it for all our projects here (well, OK, so that's 2 official projects and maybe 3-4 'toy' projects I'm personally working on), and in all instances, I have .java and .class files in the same directory.
      You can have a very minimal build.xml that does this, and automates things like JAR builds. For a project where you're already using Java, I wouldn't use anything else. It even plugs into most Java IDEs, if you're the sort who uses those
      silly things ;-)

    2. Re:And makes too many assumptions. by s88 · · Score: 5, Informative

      Re 1: uh ok, and src/ to the jar
      Re 2: uh ok, add src/ to the runtime classpath
      Re 3: uh ok, see Re 1.
      Re 0: you can, in fact, put your build and source in the same dir.

      Re spellcheck:
      Ant is not, as a core distribution, everything and the kitchen sink... it is an, arguably, minimal set of tools required for a meaningful build process. However, ant is completely modular and there are hundreds of articles describing how to add custom tasks to it. It was designed with this clearly in mind. If you have a spellchecker in mind you can build a new task in 20 mins and use it in your next build, or just exec it.

      You, sir, make too many assumptions.

      Scott

    3. Re:And makes too many assumptions. by steve_l · · Score: 5, Informative

      Well, maybe we do try and dictate a bit. We often get bugreps by people complaining ant is rebuilding stuff all the time, which we explain is because you need to put files in a directory structure that matches the package tree, which makes them complain we are control freaks or something. Which forces us to point out the bits in the java spec that says you must lay out your files in this order for javac to import stuff automatically. Similarly, we get sporadic complaints about how we do JAR manifest line wrapping, which are in fact exactly how the language specs demand it, even if one or two duff apps out there cant handle it.

      But if we werent strict control freaks, who would be?

      As for redisting source in your OSS project, yes, that is trivial; everything does it, just multiple s.

      You say the benefit of giving everyone the source is that they can modify it. I agree, but also, what if you want the recipients to build it, That is where ant is great; anyone on PC, Mac, Linux, AS/400, Netware, ... can take your build file and build a big complex app then run the unit tests against it. And that no-brain-rebuild is a good reason to provide an ant build file, even if you stick to make or worse, an IDE.

      -steve

      (ant developer, co-author of Java Development with Ant,...)

    4. Re:And makes too many assumptions. by Anonymous Coward · · Score: 0

      Well instead of having the code and bins in the same structure, you have a src and bin folder, the build folder is sep anyhows.

      Also, you can have a src/ only dist, and a bin only dist, or place them both distinctly in the dist (pointless!)

      well who cares, wins.

  8. Better one by Anonymous Coward · · Score: 0

    There's a better one out there - jam.
    It's used mostly by the OpenBeOS project.

  9. Visual C++ Development by mscalora · · Score: 2, Interesting

    Is Ant worth a look by an organization that is moving a large commercial C++ app from windows only towards platform portability? I'm the first to say that MS's NMAKE sucks, and a lot of the new blood in the organization wants to move to something significantly better. Are there tools/addins/modules for Visual C++ command line compilers? to automatically maintain header & library dependencies for C++?

    -Mike

    1. Re:Visual C++ Development by c13v3rm0nk3y · · Score: 1

      IMHO, Ant is really a Java-oriented tool. It will work for other languages, but it shines when used as an incremental class building tool for Java.

      Use make. There are plenty of make apps that run on more than one platform. Some even integrate reasonably well with MSVC; though I'm guessing a lot of shops simply use the IDE to do an initial setup, and then hand-edit everything from then on...

      Please don't use nmake. It is an abomination.

      --
      -- clvrmnky
    2. Re:Visual C++ Development by Anonymous Coward · · Score: 0

      Have a good look at the Ant webpage - IIRC there are now C++ modules that make Visual C++ development almost as well integrated as Java.

      And don't pay any attention to those who say that Ant is only good for Java - I used it for production builds of Delphi applications at my last employer: 70+ applications, half a million lines of code, integration with source control (QVCS) to retrieve and rebuild any labelled version, automated build archiving, automated HTML reporting on build results and more. All done with Ant, and running in less than 45 minutes on a 300MHz PII.

      If someone says that Ant can't be used for C++/C#/Delphi/XXX then they haven't groked Ant.

  10. what about a-a-p? by Anonymous Coward · · Score: 0

    http://www.a-a-p.org/

    looks promising

  11. Not Only Ant... by jaaron · · Score: 2, Informative

    Several Jakarta Subprojects are becoming top level projects:

    db.apache.org (OJB and Torque)

    avalon.apache.org (The Avalon server framework).

    Plus Tapestry is moving into Jakarta. If you look around there really is a lot going on over at Apache, especially within the Jakarta projects.

    --
    Who said Freedom was Fair?
  12. Ant is the greatest by Anonymous Coward · · Score: 0

    tool that illustrates the worst abuse of using XML.
    The idea of having XML representing a build syntax is ridiculous - it's verbose and hard to read.
    Ant is designed by morons for morons.