-
Notifications
You must be signed in to change notification settings - Fork 231
Setup in Eclipse
This page describes how to setup Protege in Eclipse for development. This page is most useful for Protege developers who work on the core system. If you are interested in developing a plugin, please visit the Develop a Plugin page.
- Eclipse -- Version 4.5 (Mars) or later. To get the Maven integration out-of-the-box, it is strongly recommended to download the packaged Eclipse for Java EE Developers (Download Eclipse Mars Java EE).
- [git] (https://git-scm.com/)
- [Maven] (https://maven.apache.org/)
- Java 1.8 or later -- required starting with Protege 5.0 beta 18.
This guide will assume that you will get the source code in a directory called protege
.
- Clone Protege source code from github. Type in a console:
git clone https://github.com/protegeproject/protege.git protege
- Change to the protege directory. Type in the console:
cd protege
- Build Protege Type in a console:
mvn clean package
After the build completes, a Protege Desktop distribution will be available in the following directory:
protege/protege-distribution/target/protege-${version}-platform-independent-bin/Protege-${version}
for example,
protege-distribution/target/protege-5.0.0-beta-18-SNAPSHOT-platform-independent/Protege-5.0.0-beta-18-SNAPSHOT
In the end, you will get a structure for the protege folder, similar to this:
protege
+ protege-common
+ protege-desktop
+ protege-editor-core
+ protege-editor-owl
+ protege-launcher
license.txt
pom.xml
README.md
-
Start Eclipse, optionally create a new workspace (e.g., File menu -> Switch workspace -> select a new folder name for the new workspace)
-
Import the pom files: File menu -> Import -> select Maven -> Existing Maven projects
In the dialog, select as root folder the protege folder that you just cloned before. Eclipse will find the master pom, as well as all the pom files from the subfolders. It will look like this:
- Click on Finish, and Eclipse will create individual projects for each subfolder, it will link them to maven and github. After this step, the projects in Eclipse will look like this:
- Update Maven projects: Right-click on any project -> Maven -> Update Project ... -> select all projects, click OK. This step should fix any errors that you might have gotten after the import. Remember to update projects, each time you do a change in the pom file.