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 * Starter compatibility alias for the JDK HTTP server runtime. 039 */ 040 HTTP_SERVER_JDK(), 041 042 /** 043 * Tomcat server. 044 */ 045 TOMCAT(), 046 047 /** 048 * Jetty server. 049 */ 050 JETTY(), 051 052 /** 053 * Undertow server. 054 */ 055 UNDERTOW(), 056 057 /** 058 * AWS lambda packaged as a Jar file. 059 */ 060 LAMBDA(DockerBuildStrategy.LAMBDA), 061 062 /** 063 * Oracle Cloud Function, packaged as a docker container. 064 */ 065 ORACLE_FUNCTION(DockerBuildStrategy.ORACLE_FUNCTION), 066 067 /** 068 * Google Cloud Function, packaged as a Fat JAR. 069 */ 070 GOOGLE_FUNCTION(), 071 072 /** 073 * Azure Cloud Function. 074 */ 075 AZURE_FUNCTION(); 076 077 public static final String PROPERTY = "micronaut.runtime"; 078 079 private final DockerBuildStrategy buildStrategy; 080 081 MicronautRuntime() { 082 this.buildStrategy = DockerBuildStrategy.DEFAULT; 083 } 084 085 MicronautRuntime(DockerBuildStrategy buildStrategy) { 086 this.buildStrategy = buildStrategy; 087 } 088 089 /** 090 * @return The docker build strategy 091 */ 092 public DockerBuildStrategy getBuildStrategy() { 093 return buildStrategy; 094 } 095 096}