Writing a pipeline stage implementation is a fairly straightforward process. Follow the steps below and you will have a completed and packaged pipeline implementation ready to go!
To make it easier, use an archetype. Open a command window or terminal and enter the following changing the groupId and artifactId to whatever you want to use.
mvn archetype:generate -DgroupId=com.mycompany -DartifactId=my-pipeline-stage-impl -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
In the new pom, add the following dependency.
<dependency> <groupId>com.github.jasonmfehr</groupId> <artifactId>combiner-maven-plugin</artifactId> <version>1.0.0-beta-05</version> </dependency>
Create a new class that implements one of the four pipeline stage interfaces:
If you are just running locally, open a command window and type:
mvn clean install
Add the new jar you built as a dependency within the combiner-maven-plugin configuration. You can then specify the fully qualified class name (include the package) in the correct place in the plugin configuration.
<plugin>
<groupId>com.github.jasonmfehr</groupId>
<artifactId>combiner-maven-plugin</artifactId>
<version>1.0.0-beta-05</version>
<dependencies>
<dependency>
<groupId>com.mycompany</groupId>
<artifactId>my-pipeline-stage-impl</artifactId>
<version>LATEST</version>
</dependency>
</dependencies>
</plugin>