Maven plugin that reads a class in /src/main/java/io/kubeless
directory and the pom.xml
of the project and converts them into a ready to use inputs in kubeless function deploy
command.
Tip: Use the Maven Archetype
kubeless-dev-environment-archetype
to implement your Kubeless Functions.
A basic setup is
<plugin>
<groupId>org.ivanfranchin</groupId>
<artifactId>kubeless-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<inputJavaClassName>AppFunction</inputJavaClassName>
</configuration>
<executions>
<execution>
<!-- Just an unique id for the execution -->
<id>kubeless-convert</id>
<!-- kubeless-maven-plugin runs in process-resources phase by default -->
<!-- <phase>process-resources</phase> -->
<goals>
<goal>convert</goal>
</goals>
</execution>
</executions>
</plugin>
-
Name of the input Java Class that contains
Kubeless
Functions. The input Java Class file must be in${basedir}/src/main/java/io/kubeless
. -
Folder where the output Java Class and the new
pom.xml
file will be created. The default value is${project.build.directory}/generated-sources/kubeless
.
-
Unit tests are written using
JUnit 5
mvn clean test
-
Integration tests uses
maven-invoker-plugin
and therunt-its
profile and are insrc/it
folder.mvn clean verify -DskipTests -Prun-its
-
The command below will run Unit and Integration Tests
mvn clean verify -Prun-its