Skip to content

Getting Mockey To Run

clafonta edited this page Jul 5, 2016 · 2 revisions

Prerequisites

Things you’ll need before you get the code:

  • Ant 1.7+
  • JDK 1.6+

After the above are installed and can run properly, download Mockey and build it.


> git clone [email protected]:clafonta/Mockey.git
> cd Mockey
> ant -projecthelp
> ant dist

With Ant, run ‘ant dist’ target will build you a .war file and an executable .jar file. Good luck.

Definitions Location

The location where Mockey read/writes depends whether running the executable .jar file (which contains Jetty) or using the .war file in your instance of Jetty or Tomcat.

Executable Jar File

Run the following:

java -jar Mockey.jar 

Mockey will read/write from the directory it’s being started from.

java -jar Mockey.jar -l /Users/somelocation/tmp

Mockey will read/write from this directory.

Running Tomcat with Mockey.war

By default, Mockey will read/write from within Tomcat’s location. Example:

/Users/yourusername/Downloads/apache-tomcat-8.0.36

To override the default location, do the following:

export JAVA_OPTS="-DmockeyDefinitionsRepoHome=/Users/yourusername/tmp"

..then start Tomcat.