This is a Maven Archetype
used for development of Kubeless
Functions
- You must have a recent version of
Apache Maven
andJDK 1.8
or later installed in your machine.
-
Clone
kubeless-maven-plugin
projectgit clone https://github.com/ivangfr/kubeless-maven-plugin.git
-
At the same level as
kubeless-dev-environment
, clonekubeless-dev-environment-archetype
git clone https://github.com/ivangfr/kubeless-dev-environment-archetype.git
-
This should be the final directory structure
. ├── kubeless-dev-environment-archetype ├── kubeless-maven-plugin
Nagigate to kubeless-maven-plugin
directory and run the command below to install the plugin locally
mvn clean install
Navigate to kubeless-dev-environment-archetype
and run the following command to install archetype locally
mvn clean install
There are two ways:
-
Interactive mode
mvn archetype:generate -DarchetypeCalalog=local
-
Non-Interactive mode
mvn archetype:generate \ -B \ -DarchetypeGroupId=org.ivanfranchin \ -DarchetypeArtifactId=kubeless-dev-environment-archetype \ -DarchetypeVersion=1.0-SNAPSHOT \ -DgroupId=com.mycompany \ -DartifactId=myapp \ -Dversion=1.0-SNAPSHOT \ -Dpackage=com.mycompany.myapp
The structure of a project with groupId com.mycompany
, package com.mycompany.myapp
and artifactId myapp
, should look like:
myapp
├── .mvn
│ └── wrapper
│ ├── MavenWrapperDownloader.java
│ ├── maven-wrapper.jar
│ └── maven-wrapper.properties
├── HELP.md
├── mvnw
├── mvnw.cmd
├── pom.xml
└── src
├── main
│ └── java
│ ├── com
│ │ └── mycompany
│ │ └── myapp
│ │ └── App.java
│ └── io
│ └── kubeless
│ └── AppFunction.java
└── test
└── java
├── com
│ └── mycompany
│ └── myapp
│ └── AppTest.java
└── io
└── kubeless
└── AppFunctionTest.java
The Maven Wrapper
files, mvnw
(Linux and Mac) and mvnw.cmd
(Windows), are inside the generated application directory.
For Linux and Mac users, in order to make mvnw
executable run
chmod +x mvnw