-
Notifications
You must be signed in to change notification settings - Fork 5
9.Contributing
Below are instructions to set up a development environment with Eclipse Neon.
You will need the M2Eclipse plugin to run Maven in Eclipse. Installation instructions can be found on the web, for instance here.
First checkout the code on your workstation:
git checkout https://github.com/fengtan/sophie
Then import the code in Eclipse by selecting File > Import... > Existing Maven Projects
:
You will have to adjust the Java build path by selecting Project > Properties > Java Build Path
(tab Source
). Just make sure that the only source folder included in the build path is sophie/src/main/java
and does not include sophie/src
:
The repo includes a formatter profile with common code style rules: .formatter.xml. You may import this profile by selecting Project > Properties > Java Code Style > Formatter
, checking Enable projet specific settings
and then importing the .formatter.xml
file:
The code can be compiled on the command line like a regular Maven project:
mvn clean install
Note that the project accepts three profiles "linux", "macosx" and "win32", since SWT artifacts are OS-dependent:
mvn clean install -P linux # This will generate a JAR runnable on Linux (default if the -P option is not set)
mvn clean install -P win32 # This will generate a JAR runnable on Windows
mvn clean install -P macosx # This will generate a JAR runnable on Mac OS
You may also compile within Eclipse by right-clicking on the project and selecting Run As > Maven Install
.
Compiling the project will generate the JAR and .deb files that you can find on the releases page. The files are generated in the target
directory.
Once the application has been compiled, you may run it by launching the startup script:
./sophie-start.sh
Alternatively you can run the JAR file directly:
java -jar target/sophie-*-with-dependencies.jar