-
Notifications
You must be signed in to change notification settings - Fork 13
How to set up CDR projects in Eclipse
-
The first step is to check out the master project from SVN. You can either do this in Eclipse or via the command line, but I recommend the command-line. You can even do this without Eclipse running. Just put the trunk for cdr-master in your eclipse workspace folder:
count0@aalcdl24a:~/workspace$ git clone [email protected]:UNC-Libraries/Carolina-Digital-Repository.git cdr-master
-
Next step is to generate eclipse project files, using Maven:
count0@aalcdl24a:~/workspace$ cd cdr-master
count0@aalcdl24a:~/workspace/cdr-master$ mvn org.apache.maven.plugins:maven-eclipse-plugin:2.6:eclipse
-
There may be various intermediate warnings and errors, but at the end you should see success status for the entire list of projects.
-
Start Eclipse.
-
Create a working set for CDR web application, if desired.
-
Now we are going to "Import an Existing Project" for the main project and each sub-project, starting with the master.
-
Choose File > Import. Select "Import an Existing Project". Use the browse button to Navigate to the next project's main folder.
-
After you select the root of a project, cdr-master, you should see a list of projects below with check boxes.
-
If you created a working set, add each project to your working set.
-
Add the cdr-master project itself to Eclipse by adding a new faceted project and pointing at your existing cdr-master folder.
-
You can now select all of these new project in Eclipse and right-click to reach Team > Share. Select Git and the defaults to share via the existing local .git repository.
-
Note that by default maven configures these projects to resolve workspace artifacts on build. While we avoided this approach in the past, it may be a better way to go about working in a master-child setup, since you may now make local changes to more than one project for a particular feature.
-
In my workspace, the access and services projects had trouble resolving the JAXB generated classes in fcrepo-clients. I don't know why this was happening, since fcrepo-clients seems to be exporting those packages. In any case, you can resolve those dependencies by adding the fcrepo-clients project to the build path, under the projects tab.
-
To build the admin project, add to the admin project's Java Build Path the directories admin/target/generated-sources/dir1 and admin/target/generated-sources/dir2 . Both of them should be set to Included: (All) and Excluded: (None).
- Install the m2e plugin if it is not already.
- Install EGit plugin.
- Add the Git Repositories view
- In the Git Repositories view, click on "Clone Git Repository and add a clone to this view".
- Under Location > URI paste in one of the source code paths for this repository, such as git://github.com/UNC-Libraries/Carolina-Digital-Repository.git
- Click next, then select the branch to use. Most likely it will be master.
- Click next, change the Directory if you want, then finish.
- To import the entire project, go to File > import > maven > existing maven project. Select the root Working Directory that is listed in the Git Repositories view.
- Continue from step 11 above to share the project back to git.