-
Notifications
You must be signed in to change notification settings - Fork 0
How To Develop Clotho3 with Eclipse
These instructions are written for Eclipse Mars running on a Linux development environment; others should be similar.
-
Install Project Lombok. Download the JAR file from here, then run it from the command line:
java -jar lombok.jar
and point it at your Eclipse installation.
-
We're going to import an Eclipse project from
clotho
's Maven build file; to do so, we need Eclipse's Maven support,m2e
.- Add the m2e software repository to Eclipse:
- Install both m2e and the slf4j integration packages.
-
Import the project. From
File > Import...
chooseExisting Maven Projects
. Browse to theclotho3
root directory, then clickOK.
There should be one project in the list,/pom.xml
. ClickFinish
.- You'll get an error about
maven-antrun-plugin
not finding a goal execution. Leave it asResolve Later
.
- You'll get an error about
-
There should be few errors, if any, reported in the Problems view. If there are lots (~500), then Elcipse didn't find the lombok jar file.
- Right-click the
clotho3
project and selectProperties....
- Navigate to
Java Build Path
. - Open the
Libraries
tab, then clickAdd External JARs...
- Navigate to your Eclipse installation folder and select
lombok.jar
- Click
Apply
- The workspace rebuilds -- make sure that the errors disappear.
- Right-click the
-
Verify that the installation runs. In the
Package Explorer
, browse to src/test/java/org.clothocad.core.util. Right-click onClothoTestEnvironment.java
, and sayDebug As > Java Application
. Check the console to make sure Clotho started, then browse tolocalhost:8080
. -
Let's fix that Maven problem. Open
pom.xml
; go from theOverview
tab to thepom.xml
tab. Right after</plugins>
and before</build>
, paste the following:<pluginManagement> <plugins> <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.--> <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId> org.apache.maven.plugins </groupId> <artifactId> maven-antrun-plugin </artifactId> <versionRange> [1.7,) </versionRange> <goals> <goal>run</goal> </goals> </pluginExecutionFilter> <action> <execute/> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin> </plugins> </pluginManagement>