Table of Contents:
- One of Oracle JDK 1.8+ or OpenJDK 8+
- Maven 3.2.0+
- Vertica 6+ or Microsoft SQL Server 2008+ (only necessary for using the designer tool)
- SWIG 3.0.0+ and GLPK 4.56+ (only for developers)
Attention: Before you install cliffguard, make sure $JAVA_HOME is set.
$ git clone https://github.com/mozafari/cliffguard.git
$ cd cliffguard
$ mvn clean package
After this step, the binary file (a JAR file) will be created in
./target/CliffGuard.jar
At this point, CliffGuard has been successfully compiled. Refer to the README documentation to learn how you can use various tools that are included in the CliffGuard package.
- Eclipse (Luna or Mars version are recommended)
- m2eclipse plugin for Eclipse
- maven-build-helper plugin for Eclipse
To install m2eclipse plugin for Eclipse:
-
Select Window (from menu bar) -> Preference (or under the "Eclipse" menu on Mac OSX), expend Install/Update on side bar, and select "Available Software Sites", then if you are
- Eclipse Juno user: Enable the item with Name:
Juno
(orEclipse Juno repository
) and Location:http://download.eclipse.org/releases/juno
- Eclipse Kepler user: Enable the item with Name:
Kepler
(orEclipse Kepler repository
) and Location:http://download.eclipse.org/releases/kepler
- Eclipse Luna user: Enable the item with Name
Luna
(orEclipse Luna repository
) and Location:http://download.eclipse.org/releases/luna
- Eclipse Mars user: Enable the item with Name
Mars
(orEclipse Mars repository
) and Location:http://download.eclipse.org/releases/mars
- Eclipse Juno user: Enable the item with Name:
-
Click Help -> Install New Software at menu bar.
-
Check your Eclipse version,
- If you are an Eclipse Luna or Mars user, copy the link http://download.eclipse.org/technology/m2e/releases
- If you are Juno or Kepler user, copy the link http://download.eclipse.org/technology/m2e/releases/1.4
-
Paste the link in previous step into "Work with" input box, then press "Add".
-
It is okay to leave the "Name" input box to be blank, then press "OK", and check "Maven Integration for Eclipse" in the following list view.
-
Check the option "Contact all update sites during install to find required software" at the bottom of the current window. At this point the screen should look like the following (again, Eclipse Juno and Kepler users should use http://download.eclipse.org/technology/m2e/releases/1.4).
-
Press "Next" -> "Next" -> "Finish".
To install maven-build-helper plugin, you can just repeat the process for installing m2e plugin like the above:
- Click Help -> Install New Software at menu bar.
- Check your Eclipse version, copy the link http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-buildhelper/0.15.0/N/0.15.0.201207090124/
- Paste the link in previous step into "Work with" input box, then press "Add".
- Press "OK", and check "M2E Buildhelper Connector" in the following list view.
- Press "Next" -> "Next" -> "Finish".
-
From Eclipse top menu bar, click File -> Import.
-
Expand Maven menu, click "Existing Maven Projects", and click next.
-
Browse the location where you have the CliffGuard source code, select the top level root directory, then click next.
-
Eclipse will recognize project and it will show you a list of all possible projects located there.
-
Select the project org.cliffguard.cliffguard, click "Next", then Eclipse shows some build information, then click "Finish".
-
Done! (There might be some automatic setup process conducted by Eclipse at this point, and it is okay to click "Next" as whatever Eclipse asks you to permit)
(Users should skip these steps)
WARNING: This developer guide is only intended for academic researchers. To follow the instructions below you need to be using the academic version (the academic version is different from the public oepn-source version that is available at http://CliffGuard.org). The academic version is not open-source and is shared on a per-request basis. If you wish to access the academic version, please contact us at mozafari umich.edu.
- Run the following command as "dbadmin":
$ TOP_LEVEL_DIRECTORY/scripts/install_stored_procedures.sh
- Run the following as root:
$ sudo chown root:root restartDB
$ sudo chmod u+s restartDB
- Test it by running the following command in vsql:
vsql> select barzan_empty_cache();
and see if it prints out root!
INFO 4427: Procedure reported:
root
barzan_empty_cache
--------------------
0
(1 row)
You only need to install SWIG and GLPK if you are looking to use some of the advanced features in CliffGuard. Not recommended for beginner users.
- Make sure "swig" is installed, by trying:
$ swig
To install:
sudo yum install swig
- Compile and install GLPK:
$ cd TOP_LEVEL_DIRECTORY/lib/
$ tar xvzf glpk-4.50.tar.gz
$ cd glpk-4.50
$ ./configure
$ make
$ sudo make install