How to set up an Eclipse workspace - TinusTinus/replaymanager GitHub Wiki
The following is a guide on how to set up an Eclipse (4.3 "Kepler") workspace for the Replay Manager. Of course, if you don't like Eclipse or working with Eclipse plugins for Maven and/or Git, you're welcome to use your own toolchain.
Note that you can skip the first two steps if you already [performed a command line build](How to build).
- Download the following files (this is unfortunately necessary because these are not available in the public Xuggler Maven repository):
- https://files.liferay.com/mirrors/xuggle.googlecode.com/svn/trunk/repo/share/java/xuggle/xuggle-xuggler/5.4/xuggle-xuggler-arch-x86_64-w64-mingw32.jar
- https://files.liferay.com/mirrors/xuggle.googlecode.com/svn/trunk/repo/share/java/xuggle/xuggle-xuggler/5.4/xuggle-xuggler-arch-i686-w64-mingw32.jar
- https://files.liferay.com/mirrors/xuggle.googlecode.com/svn/trunk/repo/share/java/xuggle/xuggle-xuggler/5.4/xuggle-xuggler-arch-i686-pc-linux-gnu.jar
- https://files.liferay.com/mirrors/xuggle.googlecode.com/svn/trunk/repo/share/java/xuggle/xuggle-xuggler/5.4/xuggle-xuggler-arch-x86_64-pc-linux-gnu.jar
- https://files.liferay.com/mirrors/xuggle.googlecode.com/svn/trunk/repo/share/java/xuggle/xuggle-xuggler/5.4/xuggle-xuggler-noarch-5.4.jar
- install the downloaded files into your local Maven repository using the following commands:
mvn install:install-file -Dfile=xuggle-xuggler-arch-x86_64-w64-mingw32.jar -DgroupId=xuggle -DartifactId=xuggle-xuggler-arch-x86_64-w64-mingw32 -Dversion=5.4 -Dpackaging=jar
mvn install:install-file -Dfile=xuggle-xuggler-arch-i686-w64-mingw32.jar -DgroupId=xuggle -DartifactId=xuggle-xuggler-arch-i686-w64-mingw32 -Dversion=5.4 -Dpackaging=jar
mvn install:install-file -Dfile=xuggle-xuggler-arch-i686-pc-linux-gnu.jar -DgroupId=xuggle -DartifactId=xuggle-xuggler-arch-i686-pc-linux-gnu -Dversion=5.4 -Dpackaging=jar
mvn install:install-file -Dfile=xuggle-xuggler-arch-x86_64-pc-linux-gnu.jar -DgroupId=xuggle -DartifactId=xuggle-xuggler-arch-x86_64-pc-linux-gnu -Dversion=5.4 -Dpackaging=jar
mvn install:install-file -Dfile=xuggle-xuggler-noarch-5.4.jar -DgroupId=xuggle -DartifactId=xuggle-xuggler-noarch -Dversion=5.4 -Dpackaging=jar
- make sure you have a JDK (Hotspot 1.7u6 or later, preferably the latest Java release);
- you can download the Hotspot JDK installer from Oracle;
- install Eclipse;
- download Eclipse for Java developers;
- unzip;
- install Lombok into your new Eclipse installation;
- if you have already [performed a command line build](How to build) you already have the Lombok jar in your Maven repository;
- otherwise, you can download it from the project site (make sure to get the version specified in the Replay Manager's parent pom, since Lombok does not guarantee backwards compatibility);
- run it as an executable jar and follow the instructions;
- make sure Eclipse is run on your JDK instead of your OS's default JRE;
- browse to the Eclipse base directory;
- (optional) create a backup of eclipse.ini;
- open eclipse.ini in a text editor;
- add the following, above the -vmargs line:
-vm
<path to jdk>\bin\javaw.exe
- save and exit;
- create a new, empty directory that will serve as your Eclipse workspace;
- start Eclipse
- run the Eclipse executable;
- choose your new workspace (navigate to the directory you just created);
- close the annoying Welcome to Eclipse screen;
- make sure your JDK is installed and selected as the default JRE;
- open Window -> Preferences -> Java -> Installed JREs;
- verify your JDK is in the list and selected as the default, if not: fix it;
- close the preferences;
- clone the Replay Manager repository;
- open Window -> Open Perspective -> Other... -> Git Repository Exploring;
- select Clone a Git repository;
- enter the following URI:
https://github.com/TinusTinus/replaymanager.git
- Next, Next;
- choose a directory where to clone the git repository (I chose a directory outside of the workspace);
- Finish;
- import code templates;
- Window -> Preferences -> Java -> Code style -> Code templates -> Import...;
- browse to the directory where you just cloned the git repo and open tools/eclipse-codetemplates.xml;
- OK;
- import code formatter settings;
- Window -> Preferences -> Java -> Code style -> Formatter -> Import...;
- browse to the directory where you just cloned the git repo and open tools/eclipse-codetemplates.xml;
- make sure the newly imported formatter settings are selected as the active set;
- OK;
- import the Replay Manager projects into your Eclipse workspace;
- in the Git Repositories view, right click the replaymanager repository and choose Import Projects...
- select Import as general project;
- make sure the Working Directory replaymanager is selected, click Next, Finish;
- return to the Java perspective;
- File -> Import... -> Maven -> Existing Maven Projects, Next;
- click Browse..., navigate to the directory where you cloned the git repository and select the replaymanager directory, OK;
- the Projects view should now show three projects: umvc3replayanalyser, umvc3replayanalyser-assembly and umvc3replayanalyser-parent;
- make sure the checkbox is checked for all three projects and click Finish;
- wait for the Building workspace task to complete;
- in my case, both the umvc3replayanalyser and umvc3replayanalyser-assembly project had errors saying "Project configuration is not up-to-date with pom.xml"; to fix these I selected both projects, right-clicked on them and chose Maven -> Update project... -> OK.