Apache-ant version 1.7.1 - How to Download and Install on Mac OS X
Saturday the 7th of November, 2009

    apache-ant  most recent diff


    version 1.7.1

      View the most recent changes for the apache-ant port at: apache-ant.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for apache-ant.
      The raw portfile for apache-ant 1.7.1 is located here:
      http://apache-ant.darwinports.com/dports/devel/apache-ant/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/apache-ant


      The apache-ant Portfile 57375 2009-09-10 08:16:41Z ryandesign macports.org $

      PortSystem 1.0

      Name: apache-ant
      Version: 1.7.1
      Category: devel java
      Maintainers: openmaintainer jberry
      Description: Java opensource build system
      Long Description: Ant is a Java based build tool. In theory it is kind of like make without make's wrinkles. Ant uses XML build files that define a set of targets. Each target has dependencies (other targets) and contains a set of tasks to perform.
      Homepage: http://ant.apache.org/

      Platform: darwin freebsd

      distname ${name}-${version}-bin
      Master Sites: apache:ant/
      Master Sites:.mirror_subdir binaries
      Checksums: md5 9330447f3763b87570dd1118c49a8efd sha1 b078ba89301687662f100da7b059105f32004f7c rmd160 e3244035f0e3ac756a741d6d4fb5a91cfff4f0dd

      worksrcdir ${name}-${version}
      set workTarget ""

      use_bzip2 yes
      use_configure no

      build.cmd true

      platform darwin {
      extract.post_args | gnutar -x
      build.env JAVA_HOME=/Library/Java/Home
      }

      # Ant is installed from the binary (jar) distribution by default. Due to
      # bootstrapping issues, the source variant generally doesn't build a very
      # usable ant: the ant tasks (such as junit) are non-functional as their
      # dependent support isn't available when ant is built, due to circular
      # dependencies back to ant.
      Variant: source description "build from source; not recommended" {
      distname ${name}-${version}-src
      master_sites.mirror_subdir source
      checksums md5 22b378e27ab300e4d73bf09d91c7e2a6
      set workTarget /${name}

      build.cmd ./build.sh
      build.args -Dchmod.fail=false -Ddist.name=${name}
      build.target dist
      }

      pre-destroot {
      delete ${worksrcpath}${workTarget}/bin/ant.bat ${worksrcpath}${workTarget}/bin/ant.cmd ${worksrcpath}${workTarget}/bin/antRun.bat ${worksrcpath}${workTarget}/bin/antenv.cmd ${worksrcpath}${workTarget}/bin/envset.cmd ${worksrcpath}${workTarget}/bin/lcp.bat ${worksrcpath}${workTarget}/bin/runrc.cmd
      }

      destroot {
      xinstall -m 755 -d ${destroot}${prefix}/share/java
      file copy ${worksrcpath}${workTarget} ${destroot}${prefix}/share/java/${name}
      system "ln -fs ${prefix}/share/java/${name}/bin/ant ${destroot}${prefix}/bin/ant"
      }

      universal_variant no

      livecheck.type regex
      livecheck.url ${homepage}srcdownload.cgi
      livecheck.regex {Apache Ant (\d+(?:\.\d+)*)}

    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/apache-ant
      % sudo port install apache-ant
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching apache-ant
      ---> Verifying checksum for apache-ant
      ---> Extracting apache-ant
      ---> Configuring apache-ant
      ---> Building apache-ant with target all
      ---> Staging apache-ant into destroot
      ---> Installing apache-ant
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using apache-ant with these commands:
      %  man apache-ant
      % apropos apache-ant
      % which apache-ant
      % locate apache-ant

     Where to find more information:

    Darwin Ports



    Lightbox this page.