Versions Compared

Key

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

...

  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.


    The URI for the Juneau project is https://gitbox.apache.org/repos/asf/juneau.git
    Use your Apache GitHub user/password.
     
  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 various projects loaded into your workspace:
     

  9. If you see the project "my-microservice" in your workspace, you can remove it (but don't delete from the file system!).
    This is being picked up from the .project file inside juneau-microservice-template/build-overlay used to create the starter template project and not a project by itself.

  10. If you see warnings about JavaSE-1.7, you can go to... 
    Preferences → Java → Installed JREs → Execution Environments
    ....and map an existing JVM (e.g. Java 8).
    The core Juneau libraries still support Java 7 as of release 7.2.1.
    The current plan is to prereq Java 8 in Juneau 8.0.

3 - Loading code style preferences (optional)

Various code style preferences are located in the /juneau-root/eclipse-preferences directory.

...

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

     mvn clean package

6 - JUnit Tests

JUnit tests are located in the following locations:

    • juneau-core-test/src/test/java
    • juneau-rest-server-test/src/test/java
    • juneau-rest-client-test/src/test/java
    • juneau-microservice-test/src/test/java/.../_TestSuite.java
    • juneau-examples-rest/src/test/java/.../_TestSuite.java

Each of the above locations can be executed via 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.

...

The projects with _TestSuite.java classes are function tests that start/stop the microservice as part of the setup/teardown of the suite class.  The other projects consist solely of unit tests.


 


Page properties
hiddentrue


Related issues