Skip to content

gasches/micronaut-archetypes

Repository files navigation

Micronaut Maven Archetypes

Summary

Maven Archetypes For Micronaut Framework.

To see available archetypes and pick one to instantiate:

mvn archetype:generate -Dfilter=cc.gasches.archetypes:micronaut

Prerequisites

  • JDK 8 (or higher)
  • Maven 3

Create Service

Java:

mvn archetype:generate \
    -DinteractiveMode=false \
    -DarchetypeGroupId=cc.gasches.archetypes \
    -DarchetypeArtifactId=micronaut-java-service \
    -DarchetypeVersion=1.1.0.M2-1 \
    -DgroupId=com.example \
    -DartifactId=micronaut-example \
    -Dpackage=com.example.micronaut \
    -DbuildTool=maven

Note: Available buildTool options: gradle, maven (default). This property is used only for Dockerfile conditional templating.

Kotlin:

mvn archetype:generate \
    -DinteractiveMode=false \
    -DarchetypeGroupId=cc.gasches.archetypes \
    -DarchetypeArtifactId=micronaut-kotlin-service \
    -DarchetypeVersion=1.1.0.M2-1 \
    -DgroupId=com.example \
    -DartifactId=micronaut-example \
    -Dpackage=com.example.micronaut \
    -DbuildTool=maven

Groovy:

mvn archetype:generate \
    -DinteractiveMode=false \
    -DarchetypeGroupId=cc.gasches.archetypes \
    -DarchetypeArtifactId=micronaut-groovy-service \
    -DarchetypeVersion=1.1.0.M2-1 \
    -DgroupId=com.example \
    -DartifactId=micronaut-example \
    -Dpackage=com.example.micronaut \
    -DbuildTool=maven

Create CLI Application

Java:

mvn archetype:generate \
    -DinteractiveMode=false \
    -DarchetypeGroupId=cc.gasches.archetypes \
    -DarchetypeArtifactId=micronaut-java-cli \
    -DarchetypeVersion=1.1.0.M2-1 \
    -DgroupId=com.example \
    -DartifactId=micronaut-example \
    -Dpackage=com.example.micronaut

Kotlin:

mvn archetype:generate \
    -DinteractiveMode=false \
    -DarchetypeGroupId=cc.gasches.archetypes \
    -DarchetypeArtifactId=micronaut-kotlin-cli \
    -DarchetypeVersion=1.1.0.M2-1 \
    -DgroupId=com.example \
    -DartifactId=micronaut-example \
    -Dpackage=com.example.micronaut

Groovy:

mvn archetype:generate \
    -DinteractiveMode=false \
    -DarchetypeGroupId=cc.gasches.archetypes \
    -DarchetypeArtifactId=micronaut-groovy-cli \
    -DarchetypeVersion=1.1.0.M2-1 \
    -DgroupId=com.example \
    -DartifactId=micronaut-example \
    -Dpackage=com.example.micronaut

Create AWS Function

Java:

mvn archetype:generate \
    -DinteractiveMode=false \
    -DarchetypeGroupId=cc.gasches.archetypes \
    -DarchetypeArtifactId=micronaut-java-function-aws \
    -DarchetypeVersion=1.1.0.M2-1 \
    -DgroupId=com.example \
    -DartifactId=micronaut-example \
    -Dpackage=com.example.micronaut

Run Created Application

Maven:

./mvnw package exec:exec

Gradle:

./gradlew run