Skip to content

Instantly share code, notes, and snippets.

@bradlucas
Last active April 12, 2016 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradlucas/923e672c381ddab5fe70 to your computer and use it in GitHub Desktop.
Save bradlucas/923e672c381ddab5fe70 to your computer and use it in GitHub Desktop.
Pipeline Eclipse Notes
# Introduction
The following are some notes on setting up a development environment for the Pipeline Java projects.
An assumption is made that you are on a Mac and are going to use Eclipse.
Steps
- Install the latest Eclipse
- Clone all the ActionX repos
- Setting up projects in Eclipse
## ActionX repos
I installed all the repos into $HOME/dev using Jose's bash function.
get-all-actionx-repos ()
{
curl -u $GITHUB_USER -s https://api.github.com/orgs/actionx/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
}
## Setting up projects in Eclipse
There are two Java projects to setup. They are in the **actionx.collate** and **retarg-grande-data-pipeline** repos.
Note that the 'pipeline' project is inside the retarg-grande-data repos.
### Steps
From within Eclipse
- File / Import
- Maven / Existing Maven Projects
- Browse into actionx.collate
- Select project and click Finish
Repeat the same for ~/dev/retarg-grande-data/retarg-bigdata-pipeline.
For this select all projects to get the persistence, process and service projects.
At this point Eclipse will try to compile everything. You'll notice that it will have errors.
## Lombok
Project Lombok does magic to build getters and setters for your Java classes.
@see https://projectlombok.org
- If you have eclipse running stop it for now
- Install latest from https://projectlombok.org/download.html into ~/tools/lombok
- From a command line run:
- java -jar lombok.jar
- Normally from the 'install' screen you'd select your Eclipse executable.
- On the Mac this doesn't work so find your eclipse.ini and select that.
- The file will be in inside the Eclipse.app
- For example, ./java-mars/Eclipse.app/Contents/Eclipse/eclipse.ini
-
- When done edit your eclipse.ini and look at the last line.
- It should have something similar to the following.
- -Javaagent:/Users/brad/tools/lombok/lombok.jar
- Start Eclipse and referesh your project(s) and verify that @Getter and @Setter errors go away.
## @Override annotations
You'll notice errors about this on segmentation project. Turns out the pom.xml isn't specifying a JRE version
and Maven defaults to 1.5 which isn't new enough for @Override.
- Maven is defaulting to JRE 1.5
- @see http://stackoverflow.com/a/9927172
- The POM specifies the JRE version, and this is defaulted to 1.5 if not present.
- To fix:
- File / Properties on project
- Java Compiler / Unselect 'Use compliance from execution environment...'
- Select 1.6 in 'Compiler compliance level'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment