IntroductionBelow are described 2 ways to create a plug-in project: Creating a project from an archetype is faster and more convenient. We only need to complete the required parameters such as name, key etc.
Creating a project from scratch Warning |
---|
Each created plug-in can not share one package with another plug-in. |
- We create a new Maven project (File -> New -> Maven Project).
- Select the Create a simple project option (skip archetype selection)and click Next
We complete the information about the project and create the project

Info |
---|
| The project should be created in accordance with the convention: - groupId: com.suncode.plugin accepted for plugins
- artifactId: plug ID (must be universal)
- version: the plugin version can be independent from the target system version
- packaging: must be set to bundle (the value is not on the list)
|
We add the necessary suncode-plugin.xmldescriptor file to the src/main/resources directory: Code Block |
---|
language | html/xml |
---|
title | suncode-plugin.xml |
---|
| <?xml version="1.0" encoding="UTF-8"?>
<plugin key="${project.groupId}-${project.artifactId}" name="Tutorial Plugin">
<plugin-details>
<description>
<localized language="en">Description</localized>
<localized language="pl">Opis</localized>
</description>
<author>Suncode</author>
</plugin-details>
<!-- I18N -->
<i18n key="i18n-bundle" location="locale/messages" />
<!-- Web MVC -->
<web-mvc key="mvc" />
</plugin> |
Info |
---|
The suncode-plugin.xmlfile is filtered by Maven. This means that the contents of these properties are dynamically inserted into the properties of ${...}. Instead of ${project.groupId} - ${project.artifactId} we can enter a permanent ID of the plugin. Typing ${project.groupId} - ${project.artifactId} results in a dynamically created identifier from the groupId and artifactId properties. |
- We add the messages.properties file to the src/main/resources/locale directory.
The final structure of the project should look like this: 
Creating a project using a prepared archetype Before creating the project, you need to configure the archetype catalogs. To do this, open Window-> Preferencesand add the Remote Catalogwith the URL of the Suncode repository: http://192.168.1.51:8081/nexus/content/groups/public/ 
- We create a new Mavenproject (File -> New -> Maven Project).
- Leave the Create a simple project (skip archetype selection) option selected
- We choose the archetype we are interested in as in the picture:

Then we fill-in all the required information:

Info |
---|
| Description of all properties: - plusworkflowVersion: the target version of thePlusWorkflow system
- name: name of the plugin
- author: creator of the plugin
- descriptionPL: description of the plugin in Polish
- descriptionEN: description of the plugin in English
|
Created project can already be installed in the system as a plug-in. The descriptor for this plug-in looks like this: Code Block |
---|
language | html/xml |
---|
title | suncode-plugin.xml |
---|
| <?xml version="1.0" encoding="UTF-8"?>
<plugin key="com.suncode.plugin-tutorial" name="Tutorial Plugin">
<plugin-details>
<description>
<localized language="en">Description</localized>
<localized language="pl">Opis</localized>
</description>
<author>Suncode</author>
</plugin-details>
<!-- I18N -->
<i18n key="i18n-bundle" location="locale/messages" />
<!-- Web MVC -->
<web-mvc key="mvc" />
</plugin> |
The final structure of the project should look like this: 
|