You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Introduction

This article documents the steps for

  • Creating a new Maven-based project in Eclipse on your local computer
  • Creating a Git repository in our code repository (www.imphub.org)
  • Synchronizing those two (Eclipse workspace, Git repository on imphub)

Background Required

You should already understand:

  • Eclipse
  • Eclipse projects built using maven
  • Git repositories

Software Required

  • Eclipse 4.3
  • Current Egit
  • Current git

ERL/IHE Practices for Folder Management

This section describes a system for maintaining folders for ERL/IHE projects. Other ERL projects may have a different philosophy.

We have distinct folders on our computers for Eclipse workspaces and Git repositories. Remember that any files you have cloned from imphub to your computer using Git are by definition in a Git repository on your computer. You do not have to use these folder names, but for this document, assume these folders are called:

eclipse-workspaces
git-repositories

The important item is that the workspace folders and repositories are in different areas on your computer. One folder is not a subfolder of the other. Furthermore, your source code (java, xhtml, xml files) will live in a git repository on your computer and will not be found in the Eclipse workspace.

This item is worth repeating. If you start Eclipse, create a new project and start adding files, the default action of Eclipse is to place those files under the workspace folder for your project. We are going to separate the Eclipse workspace files from the source files. Only the source files will be maintained in your local Git repository and in the imphub repository.

Instructions

These instructions assume you are creating a new application that will be named "example". That name (example) will appear:

  • As the name of the repository on imphub
  • As the name of a folder in your local folder of Git repositories
  • As the name of a folder in your local folder of Eclipse workspaces
  • As the name of the Eclipse project itself

We are creating one Git repository with one Eclipse project. We do not describe how to bring two different projects from imphub (that is, two separate Git repositories) into a single Eclipse workspace. That is a topic for another article.

 

If your Maven project is already in Eclipse, skip to step 14.

If your Maven project is already in Eclipse and in a local Git repository which you are ready to put on imphub, skip to step 23.

The first three steps are not performed with Eclipse. You can perform these steps using the command line or a file browser.

  1. Create a folder for the Eclipse project in your folder of Eclipse workspaces. The name of this folder should be example. That is:
    eclipse-workspaces/example
  2. Create a second folder under the example folder you just created. This second folder is going to contain the source code for your project and is a temporary folder to be manipulated by later steps. You will also call this folder example. That is, you will now have:
    1. eclipse-workspaces/example/example
  3. x
  4. x
  5. x

 

  1. xx
  2. x
  3. x
  4. x

 

 

 

  • No labels