Jmock2 version 2.5.1 - How to Download and Install on Mac OS X
Saturday the 7th of November, 2009

    version 2.5.1

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


      The jmock2 Portfile 50227 2009-04-27 23:46:20Z blair macports.org $

      PortSystem 1.0

      Name: jmock2
      Version: 2.5.1
      Category: java
      Platform: darwin
      Maintainers: blair

      Description: Library for testing Java code using mock objects
      Long Description: jMock is a library that supports test-driven development of Java code with mock objects. Mock objects help you design and test the interactions between the objects in your programs.
      Homepage: http://www.jmock.org/

      Master Sites: ${homepage}dist
      distfiles jmock-${version}-jars.zip jmock-${version}-javadoc.zip
      Checksums: jmock-${version}-jars.zip md5 bc0e1a180a036217373b00f9a8914758 sha1 3644908178f75fbd493fffa9926a0cb03677d415 rmd160 2ef79aa199ee2621c7caf9a58bd7ec4d31fa33e5 jmock-${version}-javadoc.zip md5 00dc417d78c8768e51188e3a3997d567 sha1 7d8b8ef1967c09db6bf9a45c27a8357966334cbc rmd160 339968bc118da26f237ceecfe687b7861bcf2cbb
      use_zip yes

      worksrcdir jmock-${version}

      depends_lib bin:java:kaffe port:cglib port:hamcrest-core port:objenesis

      use_configure no

      build.cmd true

      destroot {
      set javadir ${destroot}${prefix}/share/java
      set docdir ${destroot}${prefix}/share/doc/${name}

      xinstall -d -m 755 ${javadir}
      xinstall -d -m 755 ${docdir}

      file copy ${worksrcpath}/jmock-${version}.jar ${javadir}/jmock2.jar
      file copy ${worksrcpath}/jmock-junit3-${version}.jar ${javadir}/jmock2-junit3.jar
      file copy ${worksrcpath}/jmock-junit4-${version}.jar ${javadir}/jmock2-junit4.jar
      file copy ${worksrcpath}/jmock-legacy-${version}.jar ${javadir}/jmock2-legacy.jar
      file copy ${worksrcpath}/doc ${docdir}/api
      }

    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/jmock2
      % sudo port install jmock2
      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 jmock2
      ---> Verifying checksum for jmock2
      ---> Extracting jmock2
      ---> Configuring jmock2
      ---> Building jmock2 with target all
      ---> Staging jmock2 into destroot
      ---> Installing jmock2
    - 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 jmock2 with these commands:
      %  man jmock2
      % apropos jmock2
      % which jmock2
      % locate jmock2

     Where to find more information:

    Darwin Ports



    Lightbox this page.