Difference between revisions of "CompileProtege4InIntelliJ"
Nickdrummond (talk | contribs) (→Building) |
Nickdrummond (talk | contribs) (→Running) |
||
Line 52: | Line 52: | ||
[[Image:RunP4inIntelliJ.png]] | [[Image:RunP4inIntelliJ.png]] | ||
+ | |||
+ | |||
+ | === Troubleshooting === | ||
+ | |||
+ | On running, if you have errors in your log window, check that a '''logs/''' directory exists in the '''equinox''' directory. If not, create an empty one. | ||
+ | |||
+ | Also, '''log4j.xml''' should exist in the '''equinox''' directory. If it does not then copy it from the root of your source directory. |
Revision as of 06:09, May 26, 2009
Setup and Run P4.x in IntelliJ
This page describes the simple steps required to setup P4.x for development in jetbrains IntelliJ.
Back to Protege4DevDocs
Contents
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 here.
- 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 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. Some versions of IntelliJ may complain that the directory could not be created. Just try again and it should be built.
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.
Troubleshooting
On running, if you have errors in your log window, check that a logs/ directory exists in the equinox directory. If not, create an empty one.
Also, log4j.xml should exist in the equinox directory. If it does not then copy it from the root of your source directory.