- Startup eclipse if it is not running
- Create a new workspace for Sakai
- Click on File -> Switch Workspace
- Enter "WS-Sakai" in place of the default "workspace" directory
- Click OK (eclipse will restart)
- The following steps should be done in the WS-Sakai workspace
- Add Maven Repository libraries to classpath
- Select Window -> Preferences -> Java -> Build Path -> Classpath Variables
- Add MAVEN_REPO classpath variable with the path to the local maven repository (Sakai 2.4 or lower)
- The path should be: $USER_HOME/.maven/repository
- Add M2_REPO classpath variable with the path to the local maven repository (Sakai 2.5 or higher)
- The path should be: $USER_HOME/.m2/repository
- Switch to the Java perspective (Window -> Open Perspective -> Java)
- Make sure you are in the package explorer
- Turn off Automatic builds
- Select Project and uncheck Build automatically
- Select File -> Import -> Existing Projects into Workspace
- Enter the full path to the sakai source directory for the root directory
- This should be /opt/cafe-2.2.x if you followed the steps in this document
- Click Deselect All to unselect all projects
- Select the following projects (you only need most of the APIs, a few utils, and all of the db projects)
alias-api
announcement-api
archive-api
authz-api
component-api
content-api
courier-api
cm-api
db-api
db-impl
db-util
entity-api
email-api
event-api
jsf
message-api
master
site-api
site-manage-api
tool-api
user-api
user-util
util-api
util-util
velocity- NOTE: You can just import all the projects also, this tends to work fine for me
- Click Finish to import the selected projects
- This will take awhile, probably 5+ minutes
- Enter the full path to the sakai source directory for the root directory
- Create a working set for Sakai (optional)
- You do not have to create a working set, these are here in case you want to
- Switch to the Java perspective
- In the Package Explorer pane click the drop-down arrow menu and choose Select Working Set
- Click the New button from the Select Working Set Dialog window
- Choose Java for the Working Set Type and click Next
- Enter Sakai as the name for your Working Set
- Select the imported Sakai projects and click Finish
- Build Sakai in Eclipse
- Initially you will get build failures on almost every Sakai project, this is because they are building in the default order and their dependencies are in a different order, this has been partially addressed in Sakai 2.2
- Clean all Sakai projects
- Select Project -> Clean
- Select Clean all projects
- Check Start a build immediately
- Click OK
- Build All (Project -> Build All)
- Do this if using working sets:
Build the Sakai working set (Select Project -> Build Working Set -> Sakai) - Repeat this step until no errors remain (should be no more than 3-4 times)
- There will be hundreds of warnings, do not worry about these
- Do this if using working sets:
- Turn back on Automatic builds
- Select Project and check Build automatically