Folder Structure

This is a practice and not a requirement.

  1. Create an empty folder to hold this project.
  2. In the empty folder, create two additional folders:
    1. eclipse
    2. git
  3. When you start eclipse (next section), it will ask you for a workspace folder. Point it at the empty eclipse folder you made.

 

Preferences

This project is built using maven; please follow these instructions:

Windows => Preferences => General => Workspace:

Build automatically: not checked (can interfere with Maven builds).

Save automatically before build: checked.

Workspace name: Give project a name, helps avoid confusion.

Clone Repositories

Use the git perspective in Eclipse to clone the following repositories. Detailed screen shots are included in the Appendix.

 

Repository
URL
erl-ihe-utilitieshttps://code.imphub.org/scm/ihe/erl-ihe-utilities.git
erl-ihe-atnaqueryhttps://code.imphub.org/scm/ihe/erl-ihe-atnaquery.git
restfulATNA-webhttps://code.imphub.org/scm/ihe/restfulatna-web.git

Build the Software

  1. After cloning, switch to the Java EE perspective. There will be no projects visible.
  2. Import the maven projects into your system.
    1. erl-ihe-utilities: 2 maven projects, select both
    2. erl-ihe-atnaquery: 1 maven project
    3. restfulATNA-web: 1 maven project
  3. Right click on one of the projects in the Project explorer and select Maven => Update Project... from the context menu. On the Update Maven Project dialog, click “Select All” and then “OK”.
  4. Build the four project with maven in the order and with the goals shown in the table below.
  5. The war file should be found in .../git/restfulatna-web/target/RESTful-ATNA.war
  6. Drop the war file in the webapps folder of Tomcat. You should be able to open a web browser to:
    1. http://localhost:8080/RESTful-ATNA

 

Project
Maven Goals
erl-ihe-utilitiesclean package install
erl-ihe-web-utilitiesclean package install
erl-ihe-atnaqueryclean package install
erl-ihe-restfulatna-webappclean package install

 

Appendix Material

Cloning Repositories

Using the git perspective, click on the link (left pane) that allows you to clone a project or on the "Clone Repository" icon.

Fill in the URI for the source repository from the table above (main section of this article). The software will automatically fill in Host: and Repository path:

Enter your credentials under Authentication.


The Eclipse software will provide a default target for the repository that is in your home folder (/home/smm/git/yada-yada). You want to tell Eclipse to use the git folder you created at the top of this article.

Do not accept the default folder; click on the Browse button. Navigate to the git folder you created. Single click on that folder and then hit the OK button. You will be importing multiple repositories. Follow the same step both times. Click on the git folder and click OK. You can see in the screen capture below (at the top) that the software preserves the name of the repository. This name will be used to create a folder under the git folder you selected.

 

Importing Projects

 

When you switch to the Java EE perspective, you will initially see no projects. The screen capture to the right shows that perspective.
Select File -> Import -> Maven -> Existing Maven Projects
See the screen capture to the right. You select the folder that contains the git repository. You should see a pom.xml file (greyed out) and a "src" folder. You may see other folders. When you see the pom.xml file, you are in the right folder. Click the OK button.

 

Update the Maven Projects

There are multiple maven projects to update.

  1. Right click on one project in the Java EE perspective.
  2. Select Maven -> Update Project ...
  3. See the screen capture below. You will be shown multiple projects.
  4. Click on the Select All button.
  5. Click OK.

 

 

 

 

 

Build the Software

 

You will build each project separately. We need to determine how to link these with proper dependencies.

  1. Right click on a project in the JAVA EE perspective
  2. Select Run As -> Maven Build.
  3. Assuming this is the first build, you will get a popup that controls the build.
    1. Under goals, enter: "clean package install"
    2. Click "Apply" to save the goals.
    3. Click "Run" to build the software
  4. On subsequent builds, you can just select Run As -> Maven Build, and Eclipse should remember the goals you have entered.

 

 

 

 

 

  • No labels