Difference between revisions of "CompileProtege4InEclipse"
(incremental save of new content) |
(incremental save of new content) |
||
Line 44: | Line 44: | ||
[[Image:Protege-common-build-path.jpg]]<br /><br /> | [[Image:Protege-common-build-path.jpg]]<br /><br /> | ||
− | The project will now build successfully. The steps for creating projects for the remaining three bundles are largely the same. | + | The project will now build successfully. The steps for creating projects for the remaining three bundles are largely the same.<br /><br /> |
== Create the <code>org.protege.editor.core.application</code> project == | == Create the <code>org.protege.editor.core.application</code> project == | ||
Line 61: | Line 61: | ||
[[Image:Core-application-build-path.jpg]]<br /><br /> | [[Image:Core-application-build-path.jpg]]<br /><br /> | ||
− | * Click OK and the project will now build successfully. | + | * Click OK and the project will now build successfully.<br /><br /> |
== Create the <code>org.semanticweb.owl.owlapi</code> project == | == Create the <code>org.semanticweb.owl.owlapi</code> project == | ||
Line 76: | Line 76: | ||
* Add all of the JAR files from the <code>org.semanticweb.owl.owlapi/lib</code> directory:<br /><br /> | * Add all of the JAR files from the <code>org.semanticweb.owl.owlapi/lib</code> directory:<br /><br /> | ||
− | [[Image:Owlapi-build-path.jpg]] | + | [[Image:Owlapi-build-path.jpg]]<br /><br /> |
+ | |||
+ | * Click OK and the project will now build successfully.<br /><br /> | ||
== Create the <code>org.protege.editor.owl</code> project == | == Create the <code>org.protege.editor.owl</code> project == | ||
+ | To create a project for the <code>org.protege.editor.owl</code> bundle: | ||
+ | |||
+ | * Right-click on the <code>protege4/protege-standalone/trunk/plugins/org.protege.editor.owl</code> folder in the SVN Repository Exploring perspective and choose Checkout... | ||
+ | * Click Finish on the Checkout from SVN dialog without changing any of the default settings. | ||
+ | * Choose Plug-in Project in the New Project dialog and click Next >. | ||
+ | * Enter <code>org.protege.editor.owl</code> in the Project name text box and click Next >. | ||
+ | * Uncheck both checkboxes in the the Plug-in Options section and click Finish. | ||
+ | * Click OK on the Confirm Overwrite dialog. | ||
+ | * After the checkout completes, right-click on the <code>org.protege.editor.owl</code> project in the Package Explorer and bring up the Properties dialog. | ||
+ | * On the Libraries tab in the Java Build Path section, click the Add Jars... button. | ||
+ | * Add all of the JAR files from the following directories: | ||
+ | ** <code>org.protege.editor.owl/lib</code> | ||
+ | ** <code>org.semanticweb.owl.owlapi/lib</code> | ||
+ | ** <code>org.protege.editor.core.application/lib</code> | ||
+ | ** <code>org.protege.common/lib</code><br /><br /> | ||
+ | |||
+ | [[Image:Owleditor-build-path.jpg]]<br /><br /> | ||
+ | |||
+ | * Click OK and the project will now build successfully. |
Revision as of 15:22, October 18, 2007
Compile and Run Protege 4.0 Alpha from Eclipse
To follow is some documentation for compiling and running Protege 4.0 alpha from the Eclipse development environment. This documentation takes the approach of creating a separate Eclipse project for each OSGi bundle in the Protege 4 source tree.
Please note that:
- These instructions are only valid for the 4.0 alpha version of Protege. If you want to compile and run the 3.x versions of Protege, we have separate instructions available elsewhere.
- This is only one of several possible ways of compiling and running Protege 4 from Eclipse. This particular page is not meant to be exhaustive.
Contents
Create the org.protege.common
project
Go to the SVN Repository Exploring perspective and navigate to protege4/protege-standalone/trunk/plugins/org.protege.common
. This step assumes that you have Subversion support installed for the Eclipse IDE and that you have already connected to the Protege Subversion repository. If you have not done this, we have instructions for doing so on our Wiki.
Right-click on the org.protege.common
folder and choose Checkout... In the resulting "Checkout from SVN" dialog, leave all of the default settings (as shown below) and click Finish.
In the "New Project" dialog, choose Plug-in Project and click Next >.
In the "New Plug-in Project" dialog, type org.protege.common
in the Project name text box. Leave the default settings in the Project Settings and Target Platform sections. For this documentation, we will also use the default location for the project. Click the Next > button.
For the Plug-in Content section, uncheck both of the checkboxes in the Plug-in Options section and leave all other default settings.
If you are curious about what any of these settings mean, you can click the question mark (help) icon in the lower-left corner of the New Project Plug-in dialog and browse the Eclipse documentation.
Click the Finish button. At this point, Eclipse will ask you if you want to use the Plug-in Development perspective for your project:
Check the "Remember my decision" checkbox and click the Yes button. Then, click OK on the "Confirm Overwrite" dialog. Eclipse will now begin checking out the source code for the org.protege.common
bundle. Your Package Explorer will look something like the following after the checkout is complete:
If you have Project | Build Automatically turned on, you will notice compiler errors after checking out the source code. To fix them, right-click on the org.protege.common
project and bring up the Properties dialog. Go to the Libraries tab in the Java Build Path section. Click the Add Jars... button and add all the JAR files that are in the org.protege.common/lib
directory:
The project will now build successfully. The steps for creating projects for the remaining three bundles are largely the same.
Create the org.protege.editor.core.application
project
To create a project for the org.protege.editor.core.application
bundle:
- Right-click on the
protege4/protege-standalone/trunk/plugins/org.protege.editor.core.application
folder in the SVN Repository Exploring perspective and choose Checkout... - Click Finish on the Checkout from SVN dialog without changing any of the default settings.
- Choose Plug-in Project in the New Project dialog and click Next >.
- Enter
org.protege.editor.core.application
in the Project name text box and click Next >. - Uncheck both checkboxes in the the Plug-in Options section and click Finish.
- Click OK on the Confirm Overwrite dialog.
- After the checkout completes, right-click on the
org.protege.editor.core.application
project in the Package Explorer and bring up the Properties dialog. - On the Libraries tab in the Java Build Path section, click the Add Jars... button.
- Add all of the JAR files from the
org.protege.editor.core.application/lib
andorg.protege.common/lib
directories:
- Click OK and the project will now build successfully.
Create the org.semanticweb.owl.owlapi
project
To create a project for the org.semanticweb.owl.owlapi
bundle:
- Right-click on the
protege4/protege-standalone/trunk/plugins/org.semanticweb.owl.owlapi
folder in the SVN Repository Exploring perspective and choose Checkout... - Click Finish on the Checkout from SVN dialog without changing any of the default settings.
- Choose Plug-in Project in the New Project dialog and click Next >.
- Enter
org.semanticweb.owl.owlapi
in the Project name text box and click Next >. - Uncheck both checkboxes in the the Plug-in Options section and click Finish.
- Click OK on the Confirm Overwrite dialog.
- After the checkout completes, right-click on the
org.semanticweb.owl.owlapi
project in the Package Explorer and bring up the Properties dialog. - On the Libraries tab in the Java Build Path section, click the Add Jars... button.
- Add all of the JAR files from the
org.semanticweb.owl.owlapi/lib
directory:
- Click OK and the project will now build successfully.
Create the org.protege.editor.owl
project
To create a project for the org.protege.editor.owl
bundle:
- Right-click on the
protege4/protege-standalone/trunk/plugins/org.protege.editor.owl
folder in the SVN Repository Exploring perspective and choose Checkout... - Click Finish on the Checkout from SVN dialog without changing any of the default settings.
- Choose Plug-in Project in the New Project dialog and click Next >.
- Enter
org.protege.editor.owl
in the Project name text box and click Next >. - Uncheck both checkboxes in the the Plug-in Options section and click Finish.
- Click OK on the Confirm Overwrite dialog.
- After the checkout completes, right-click on the
org.protege.editor.owl
project in the Package Explorer and bring up the Properties dialog. - On the Libraries tab in the Java Build Path section, click the Add Jars... button.
- Add all of the JAR files from the following directories:
-
org.protege.editor.owl/lib
-
org.semanticweb.owl.owlapi/lib
-
org.protege.editor.core.application/lib
-
org.protege.common/lib
-
- Click OK and the project will now build successfully.