Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Luna or Neon can also be used.

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:
    (sorry....some of the names have changed)
     

3 - Loading code style preferences

...

  • 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-serverrest 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-rest-client project contains the REST Client API:

...

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-samplesexamples-rest project is a microservice project that provides various examples for defining REST resources and custom serializers and parsers.

  • The juneau-samplesexamples.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-serverrest-test project contains integration testcases for the REST Server and Client APIs:

...

     mvn clean package


6 - JUnit Tests

...

JUnit tests are located in the following locations:

  • juneau-core-test/src/test/java
  • juneau-examples-samplesrest/src/test/java
  • juneau-serverrest-test/src/test/java

juneau-core-test contains strict JUnit tests.  They can be run as-is.  
The easiest way to run these is to right-click on the project and do Run As->JUnit Test.  

juneau-examples-rest juneau-samples contains JUnits that make REST calls against the sample microservice running on port 10000.
The easiest way to run these is to right-click on the src/test/java/org.apache.juneau.examples.rest/_TestSuite.java class and do Run As->JUnit Test

juneau-rest-server-test contains JUnits that make REST calls against the test microservice running on port 10001.
The easiest way to run these is to right-click on the src/test/java/org.apache.juneau.rest.test/_TestSuite.java class and do Run As->JUnit Test

(info) Note that you can also run the latter two at the project level too, but it's faster to run the _TestSuite class since it's optimized to only start up the microservice once.


 

 

Page properties
hiddentrue
Related issues