You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

This document provides:

  • A set of instructions for new developers to get their Eclipse workspace up-and-running.

1 - Getting Eclipse

Several of the developers are using Eclipse Mars with Web Developer Tools.  You can find them here:

2 - Load Juneau projects into your workspace

  1. Start up your Eclipse workspace.

  2. Open up Java Perspective:  Window->Perspective->Open Perspective->Java
     
  3. Open up Git Repositories view:  Window->Show View->Other->Git->Git Repositories
     
  4. In the view, click the "Clone a Git Repository and add the clone to this view":  

  5. Enter the information for the Juneau Git Repository.  Then click next.

     
  6. In the Branch Selection page, select only the master branch.  Then click next.


  7. In the Local Destination page, select a location where your local Git repository will reside.  
    Note that this is NOT the same location as your workspace. 
    Make sure to select the checkbox for importing all the projects into your workspace.
    Then click finish.
     
     
  8. After a couple of minutes, you should see the following projects loaded into your workspace:
     

3 - Overview of projects

The juneau-root project contains the top-level contents of the Git repository.  It contains all the other sub-projects.

  • The contents of the README.md file show up on the GitHub mirror page.
  • The pom.xml file builds the entire project.

The juneau-core project contains all the serializers and parsers:

  • This project contains the vast majority of the code base.  
  • The Javadoc overview.html document is located in src/test/java.
  • Dependencies:
    • Apache Jena 2.7+ (optional) - Used for the RDF serializers and parsers.

The juneau-server project contains the REST Server API:

  • Dependencies:
    • Servlet 2.0+ (required)
    • JAX-RS (optional) - Used for JAX-RS providers in the org.apache.juneau.server.jaxrs package.

The juneau-client project contains the REST Client API:

  • Dependencies:
    • Apache HttpClient 4.5+ (required)

The juneau-microservice project contains the Microservice API:

  • The Dockerfile file is used for creating a docker container for the microservice.
  • Dependencies:
    • Eclipse Jetty 8.1+ (required)
    • Apache Jena 2.7+ (optional) - Needed if you want to use RDF support.
    • Apache HttpClient 4.5+ (optional) - Needed if you want to use the client API.
    • Apache Commons FileUpload 1.3.1+ (optional) - Needed if you want to upload multipart form posts.

The juneau-microservice-template project is a template project that is meant for developers to import into their own workspace as a starting point for creating their own microservice.

The juneau-samples project is a microservice project that provides various examples for defining REST resources and custom serializers and parsers.

  • The juneau-samples.launch file is used to run the samples microservice from your Eclipse workspace.  
    It starts up a REST microservice on port 10000 with various samples:
  • The war/web.xml file is not used, but provides an example for deploying the microservice as a war file.
  • The samples.cfg file is the external configuration file for the microservice.  When built, a microservice consists of two files:  an executable jar and this config file.

The juneau-server-test project contains integration testcases for the REST Server and Client APIs:

  • The src/main/java folder contains a microservice that starts up on port 10001 with various test resources.
  • The src/test/java folder contains the JUnit testcases that make REST calls against the microservice.

The juneau-distrib project creates zips that contain the built libraries and source code for a release.

4 - Using Maven to build projects

The project can be built using maven from a command line by running the following in the workspace root:

     mvn clean package


5 - JUnit Tests

 

JUnit tests are located in the following locations:

  • juneau-core/src/test/java
  • juneau-samples/src/test/java
  • juneau-server-test/src/test/java

juneau-core contains strict JUnit tests.  They can be run as-is.

juneau-samples contains JUnits that make REST calls against the sample microservice running on port 10000.

juneau-server-test contains JUnits that make REST calls against the test microservice running on port 10001.

 

  • No labels