Skip to content
Tania Tudorache edited this page Dec 4, 2015 · 21 revisions

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.

Prerequisites

Get and build the source code

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

Setup the projects in Eclipse

  • 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:

Import the pom files into Eclipse

  • 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:

Imported projects in Eclipse

  • 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.