001/* 002 * Copyright 2017-2022 original authors 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * https://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package io.micronaut.maven.core; 017 018/** 019 * The packaging kind of the application. 020 * 021 * @author graemerocher 022 * @author Álvaro Sánchez-Mariscal 023 * @since 1.1 024 */ 025public enum MicronautRuntime { 026 027 /** 028 * No specific runtime specified. 029 */ 030 NONE(), 031 032 /** 033 * Default packaging. 034 */ 035 NETTY(), 036 037 /** 038 * Tomcat server. 039 */ 040 TOMCAT(), 041 042 /** 043 * Jetty server. 044 */ 045 JETTY(), 046 047 /** 048 * Undertow server. 049 */ 050 UNDERTOW(), 051 052 /** 053 * AWS lambda packaged as a Jar file. 054 */ 055 LAMBDA(DockerBuildStrategy.LAMBDA), 056 057 /** 058 * Oracle Cloud Function, packaged as a docker container. 059 */ 060 ORACLE_FUNCTION(DockerBuildStrategy.ORACLE_FUNCTION), 061 062 /** 063 * Google Cloud Function, packaged as a Fat JAR. 064 */ 065 GOOGLE_FUNCTION(), 066 067 /** 068 * Azure Cloud Function. 069 */ 070 AZURE_FUNCTION(); 071 072 public static final String PROPERTY = "micronaut.runtime"; 073 074 private final DockerBuildStrategy buildStrategy; 075 076 MicronautRuntime() { 077 this.buildStrategy = DockerBuildStrategy.DEFAULT; 078 } 079 080 MicronautRuntime(DockerBuildStrategy buildStrategy) { 081 this.buildStrategy = buildStrategy; 082 } 083 084 /** 085 * @return The docker build strategy 086 */ 087 public DockerBuildStrategy getBuildStrategy() { 088 return buildStrategy; 089 } 090 091}