CompileProtege4InIntelliJ

From Protege Wiki
Revision as of 05:10, September 16, 2008 by Nickdrummond (talk | contribs) (Initial add)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Compiling and Running P4.x in IntelliJ

This page describes the simple steps required to setup P4.x for development in jetbrains IntelliJ.


Back to Protege4DevDocs



Check out sources

Use an SVN client to checkout the Protege 4 trunk from SVN to a local directory (say trunk).

   svn co https://smi-protege.stanford.edu/repos/protege/protege4/protege-standalone/trunk/ trunk

If using IntelliJ to checkout the sources and it prompts you to create a new project, select No.

Create the IntelliJ project files

Matthew Horridge has created a very easy to use tool to create a nice tidy intelliJ project. You can download this from [1].

  • Open a command line
  • Change directory into trunk
   cd trunk
  • Run the command line tool (notice the current path - dot - is a parameter)
   java -jar <Path_to_Protege4IntelliJProjectBuilder.jar> .
  • Open the project in IntelliJ

You should now have a multi-module project containing the various pieces of the core and owl editor, as well as several plugins that are part of the default distribution (DL Query, OWLViz, pellet and FaCT++)

Building

Build the project the usual way.

Build products are placed into the build/dist/equinox directory, which is in the Protege trunk directory.

Running

You can add a run configuration by specifying the following settings:

 Main class: org.eclipse.core.runtime.adaptor.EclipseStarter
 VM parameters: -Dosgi.clean=true
 Working directory: <PATH TO PROTEGE TRUNK>/build/dist/equinox
 Use classpath and JDK of module: runtime

See the screen shot below. It is particularly important that the working directory is set to be the equinox build directory and that the class path and JDK module be set to runtime.

RunP4inIntelliJ.png