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-xdsihttps://code.imphub.org/scm/ihe/erl-ihe-xdsi.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-xdsi: 1 maven project
  3. Right click on the project 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 project with maven in the order and with the goals shown in the table below.
  5. The jarfile should be found in .../git/erl-ihe-xdsi/target/ERL-IHE-XDSI.jar
  6. Drop the jar file in /opt/xdsi/lib. You should now be able to run the perl scripts for the project
    1. http://localhost:8080/RESTful-ATNA

 

Project
Maven Goals
erl-ihe-xdsiclean package install

 

Running the Project

You run the project by executing perl scripts. Scripts and java code are hard coded to place folders in /opt/xdsi. You should have

  • /opt/xdsi/lib (contains ERL-IHE-XDSI.jar)
  • /opt/xdsi/tests (a copy of the tests folder from the code repository)

You need to set these two environment variables:

PERL5LIB/opt/xdsi/tests/common
XDSI/opt/xdsi

Then, you can run the scripts from any folder/directory you happen to be in.

perl $XDSI/tests/ids/ids-single-image-01.pl

will execute and tell you the missing parameters.

 

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