You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2020/11/30 15:33:17 UTC

[incubator-hop-docs] branch asf-site updated: Sample plugin documentation

This is an automated email from the ASF dual-hosted git repository.

hansva pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-hop-docs.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 52bd017  Sample plugin documentation
     new 4fdda38  Merge pull request #17 from hansva/sample_plugin
52bd017 is described below

commit 52bd01754949672a22a848a683a559e035953c4e
Author: Hans Van Akelyen <ha...@gmail.com>
AuthorDate: Mon Nov 30 16:32:28 2020 +0100

    Sample plugin documentation
    
    first version of the documentation
---
 .../start-your-own-plugin/plugin-sample-1.png      | Bin 0 -> 39195 bytes
 .../start-your-own-plugin/plugin-sample-2.png      | Bin 0 -> 89005 bytes
 hop-dev-manual/modules/ROOT/nav.adoc               |   1 +
 hop-dev-manual/modules/ROOT/pages/index.adoc       |   2 +
 .../modules/ROOT/pages/start-your-own-plugin.adoc  | 103 +++++++++++++++++++++
 5 files changed, 106 insertions(+)

diff --git a/hop-dev-manual/modules/ROOT/assets/images/start-your-own-plugin/plugin-sample-1.png b/hop-dev-manual/modules/ROOT/assets/images/start-your-own-plugin/plugin-sample-1.png
new file mode 100644
index 0000000..2db56d4
Binary files /dev/null and b/hop-dev-manual/modules/ROOT/assets/images/start-your-own-plugin/plugin-sample-1.png differ
diff --git a/hop-dev-manual/modules/ROOT/assets/images/start-your-own-plugin/plugin-sample-2.png b/hop-dev-manual/modules/ROOT/assets/images/start-your-own-plugin/plugin-sample-2.png
new file mode 100644
index 0000000..7618b97
Binary files /dev/null and b/hop-dev-manual/modules/ROOT/assets/images/start-your-own-plugin/plugin-sample-2.png differ
diff --git a/hop-dev-manual/modules/ROOT/nav.adoc b/hop-dev-manual/modules/ROOT/nav.adoc
index e167aea..11539b6 100644
--- a/hop-dev-manual/modules/ROOT/nav.adoc
+++ b/hop-dev-manual/modules/ROOT/nav.adoc
@@ -3,5 +3,6 @@
 * xref:metadata-plugins.adoc[Metadata plugins]
 * xref:setup-dev-environment.adoc[Setting up your development environment]
 * xref:plugin-development.adoc[Plugins Development]
+** xref:start-your-own-plugin.adoc[Creating your own plugin]
 * xref:webhop/index.adoc[Webhop]
 ** xref:webhop/developer-guide.adoc[Webhop Developer Guide]
\ No newline at end of file
diff --git a/hop-dev-manual/modules/ROOT/pages/index.adoc b/hop-dev-manual/modules/ROOT/pages/index.adoc
index e8313a7..a17cd33 100644
--- a/hop-dev-manual/modules/ROOT/pages/index.adoc
+++ b/hop-dev-manual/modules/ROOT/pages/index.adoc
@@ -4,3 +4,5 @@
 * xref:metadata-plugins.adoc[Metadata plugins]
 * xref:porting-kettle-plugins.adoc[Porting Kettle plugins]
 * xref:setup-dev-environment.adoc[Setting up your development environment]
+* xref:plugin-development.adoc[Plugin Development]
+* xref:start-your-own-plugin.adoc[Creating your own plugin]
diff --git a/hop-dev-manual/modules/ROOT/pages/start-your-own-plugin.adoc b/hop-dev-manual/modules/ROOT/pages/start-your-own-plugin.adoc
new file mode 100644
index 0000000..b0c167e
--- /dev/null
+++ b/hop-dev-manual/modules/ROOT/pages/start-your-own-plugin.adoc
@@ -0,0 +1,103 @@
+[[PluginDevelopment-OwnPluginDevelopment]]
+= Creating a remote plugin
+
+This guide is to help you set up and start development on a plugin that will not be included in the Hop repository. For more information on plugin types and how to add them to the Hop repository check out xref:plugin-development.adoc[following guide].
+
+The Apache software foundation has a strict policy on source licenses including all dependencies used to provide certain functionality. To see which dependencies are allowed in an Apache project check https://www.apache.org/legal/resolved.html[following page].
+If your plugin consists of code and dependencies in category A it can safely be added to the Hop repository and community can help maintain the code. If it uses category B or X it can no longer be added to the default distribution of Hop.
+
+== Getting started
+
+This guides assumes your are using IntelliJ for your development, some steps might be different in Eclipse.
+
+. Clone the skeleton repository found https://github.com/project-hop/hop-plugin-sample[here]
+. Import the project in Intellij
+. Start coding
+
+=== Project structure
+
+The sample project consists out of 3 main modules and 3 sub-modules
+
+image::start-your-own-plugin/plugin-sample-1.png[]
+
+the main modules are:
+
+* hop-action-sample
+* hop-transform-sample
+* assemblies
+** assemblies-action-sample
+** assemblies-transform-sample
+** debug
+
+In our sample repository one action and one transform are provided, they all work but they do not manipulate data or perform any actions. The assemblies module is used to create a distribution or test your action or transform during development. 
+
+
+=== Debugging
+
+To debug the project create a new `application` configuration with following configuration:
+
+image::start-your-own-plugin/plugin-sample-2.png[]
+
+Important is the working directory, for hop to work including all the plugins provided by the project a certain folder structure is required. this is generated at the debug location using following pom.
+
+```
+        <dependency>
+            <groupId>org.apache.hop</groupId>
+            <artifactId>hop-core</artifactId>
+            <version>${hop.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.hop</groupId>
+            <artifactId>hop-engine</artifactId>
+            <version>${hop.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.hop</groupId>
+            <artifactId>hop-ui-swt</artifactId>
+            <version>${hop.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.hop</groupId>
+            <artifactId>hop-assemblies-plugins-dist</artifactId>
+            <version>${hop.version}</version>
+            <type>zip</type>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.project.hop</groupId>
+            <artifactId>assemblies-transform-sample</artifactId>
+            <version>${project.version}</version>
+            <type>zip</type>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.project.hop</groupId>
+            <artifactId>assemblies-action-sample</artifactId>
+            <version>${project.version}</version>
+            <type>zip</type>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+            <scope>compile</scope>
+        </dependency>
+```
+
+When compiling you will notice a plugins directory is added to the debug location, this contains all plugins distributed by the Apache Hop team, the assemblies for the sample transform and action follow the same logic to make sure they are copied to the correct location too, this allows the Hop plugin loader to find and load all the plugins for the GUI.
\ No newline at end of file