Difference between revisions of "Quick start for Protege Plugin with maven"

From Protege Wiki
Jump to: navigation, search
(Quick-start a Protege 5 plugin with maven and git)
(Quick-start a Protege 5 plugin with maven and git)
Line 4: Line 4:
 
You can very quickly start a new plugin using maven and git.  The strategy is to use git to clone a project that has a very [https://github.com/stdotjohn/org.protege.plugin.template minimal plugin template] and then to start modifying this project to make it your own.  The first step is to clone the template into a project directory of your choice:
 
You can very quickly start a new plugin using maven and git.  The strategy is to use git to clone a project that has a very [https://github.com/stdotjohn/org.protege.plugin.template minimal plugin template] and then to start modifying this project to make it your own.  The first step is to clone the template into a project directory of your choice:
 
<pre>
 
<pre>
       git clone https://github.com/stdotjohn/ort.protege.plugin.template my.plugin
+
       git clone https://github.com/stdotjohn/org.protege.plugin.template my.plugin
 
</pre>
 
</pre>
 +
Note that if you are prompted for a password, it might mean that you mispelled the git repository that you are cloning.  At this point you can immediately start building the plugin and start testing it.  But there are two otehr things that we should do first in order to make this plugin your own.  First we need to make some small changes to the pom.xml file.  Look for ''Change me!''.  At this time there is only one small section that needs updating that needs updating.  In its original form it looks like this:
 +
<pre>
 +
<!-- Change me!
 +
 +
        The next five properties should probably be customized for
 +
        your project.  If you don't know what to use for groupId,
 +
        don't worry, you can deal with that when you are ready for maven.
 +
      -->
 +
<groupId>edu.stanford.protege</groupId>
 +
<artifactId>org.protege.plugin.template</artifactId>
 +
<version>0.1.0-SNAPSHOT</version>
 +
<name>Dummy plugin</name>
 +
<description>A dummy plugin to jump-start developers</description>
 +
<pre/>

Revision as of 07:59, September 1, 2013

Quick-start a Protege 5 plugin with maven and git

You can very quickly start a new plugin using maven and git. The strategy is to use git to clone a project that has a very minimal plugin template and then to start modifying this project to make it your own. The first step is to clone the template into a project directory of your choice:

      git clone https://github.com/stdotjohn/org.protege.plugin.template my.plugin

Note that if you are prompted for a password, it might mean that you mispelled the git repository that you are cloning. At this point you can immediately start building the plugin and start testing it. But there are two otehr things that we should do first in order to make this plugin your own. First we need to make some small changes to the pom.xml file. Look for Change me!. At this time there is only one small section that needs updating that needs updating. In its original form it looks like this:

	<groupId>edu.stanford.protege</groupId>
	<artifactId>org.protege.plugin.template</artifactId>
	<version>0.1.0-SNAPSHOT</version>
	<name>Dummy plugin</name> 
	<description>A dummy plugin to jump-start developers</description>