Skip to content

How To Develop Clotho3 with Eclipse

Brian Teague edited this page Mar 19, 2016 · 3 revisions

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:

    http://download.eclipse.org/technology/m2e/releases/

    • Install both m2e and the slf4j integration packages.
  • Import the project. From File > Import... choose Existing Maven Projects. Browse to the clotho3 root directory, then click OK. There should be one project in the list, /pom.xml. Click Finish.

    • You'll get an error about maven-antrun-plugin not finding a goal execution. Leave it as Resolve Later.
  • 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 select Properties....
    • Navigate to Java Build Path.
    • Open the Libraries tab, then click Add External JARs...
    • Navigate to your Eclipse installation folder and select lombok.jar
    • Click Apply
    • The workspace rebuilds -- make sure that the errors disappear.
  • Verify that the installation runs. In the Package Explorer, browse to src/test/java/org.clothocad.core.util. Right-click on ClothoTestEnvironment.java, and say Debug As > Java Application. Check the console to make sure Clotho started, then browse to localhost:8080.

  • Let's fix that Maven problem. Open pom.xml; go from the Overview tab to the pom.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>
    
Clone this wiki locally