Folder Structure
This is a practice and not a requirement.
- Create an empty folder to hold this project.
- In the empty folder, create two additional folders:
- eclipse
- git
- 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-xdsi | https://code.imphub.org/scm/ihe/erl-ihe-xdsi.git |
Build the Software
- After cloning, switch to the Java EE perspective. There will be no projects visible.
- Import the maven projects into your system.
- erl-ihe-xdsi: 1 maven project
- 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”.
- Build the project with maven in the order and with the goals shown in the table below.
- The jarfile should be found in .../git/erl-ihe-xdsi/target/ERL-IHE-XDSI.jar
- Drop the jar file in /opt/xdsi/lib. You should now be able to run the perl scripts for the project
Project | Maven Goals |
---|---|
erl-ihe-xdsi | clean 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.
|
Build the Software
You will build each project separately. We need to determine how to link these with proper dependencies.
|