Skip to end of metadata
Go to start of metadata

1) The plugin should have a plusworkflow-plugin-parent module in pom.xml as a parent with specific system version >= 4.0.34:

<parent>
	<groupId>com.suncode</groupId>
	<artifactId>plusworkflow-plugin-parent</artifactId>
	<version>4.0.35</version>
</parent>

2) In resources/suncode-plugin.xml specify the required system version to the one set in pom as parent

<plugin key="${project.groupId}-${project.artifactId}" name="Plugin Configuration Manager">
    <plugin-details>
        <requirements>
            <plusworkflow>4.0.35</plusworkflow>
        </requirements>
    </plugin-details>
</plugin>


3) All public system dependencies (at the moment it's plusworkflow-api and plugin-framework-api) should have scope on provided

<dependency>
	<groupId>com.suncode</groupId>
	<artifactId>plusworkflow-api</artifactId>
	<scope>provided</scope>
</dependency>


4) Preferably, plugins should only use public system dependencies. For new plugins, the point is mandatory. For existing plugins, the remaining system dependencies will have to be eliminated over time anyway. At this moment in such system dependencies, but non-public ones (e.g. to plusworfklow-core) always add exclusions

<dependency>
	<groupId>com.suncode</groupId>
	<artifactId>plusworkflow-core</artifactId>
	<scope>provided</scope>
	<exclusions>
		<exclusion>
			<groupId>*</groupId>
			<artifactId>*</artifactId>
		</exclusion>
	</exclusions>
</dependency>

 

5) Always specify dependencies for plugins in scope-provided, in a specific version and with exclusions for everything (*).

<dependency>
	<groupId>com.suncode.plugin</groupId>
	<artifactId>plugin-configuration-manager</artifactId>
	<version>4.0.5</version>
	<scope>provided</scope>
	<exclusions>
		<exclusion>
			<groupId>*</groupId>
			<artifactId>*</artifactId>
		</exclusion>
	</exclusions>
</dependency>

 

6) External libraries should be declared in the plugin pom along with the version. We do not want to inherit external libraries from system dependencies unless they are in public dependencies in the <dependency> section.

 

7) Remove maven-bundle-plugin and maven-compiler-plugin plugins from pom.xml

<plugin>
	<groupId>org.apache.felix</groupId>
	<artifactId>maven-bundle-plugin</artifactId>
	<extensions>true</extensions>
	<configuration>
		<instructions>
			<Import-Package>*;resolution:=optional</Import-Package>
			<Embed-Dependency>!slf4j-log4j12,!slf4j-api,!log4j,*;scope=compile|runtime|system,jackson-datatype-jsr310</Embed-Dependency>
		</instructions>
	</configuration>
</plugin>
<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-compiler-plugin</artifactId>
	<configuration>
		<source>1.8</source>
		<target>1.8</target>
	</configuration>
</plugin>

 

8) Package names can't repeat each other. Package names should look like this: com.suncode.id-plugins.xyz

 

9) Check on the system endpoint /PlusWorkflow/api/plugins/debug to make sure everything looks correct, what is in host- that is, delivered to the plugin by the system and in unresolved.

 

  • No labels