forked from loafle/openapi-generator-original
Change Helidon MP release in generated project from 1.x to 2.x (#11076)
* Support Helidon MP server using Helidon 2.4.1 Signed-off-by: tim.quinn@oracle.com <tim.quinn@oracle.com> * Add unrelated changed sample file(s) after rebase * Updated generated samples file after rebasing again * Remove incorrectly 'git add'ed generated file
This commit is contained in:
parent
d91a2e4221
commit
6ac8d9b123
@ -213,11 +213,12 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
|
|||||||
supportingFiles.add(new SupportingFile("ibm-web-ext.xml.mustache", "src/main/webapp/WEB-INF", "ibm-web-ext.xml")
|
supportingFiles.add(new SupportingFile("ibm-web-ext.xml.mustache", "src/main/webapp/WEB-INF", "ibm-web-ext.xml")
|
||||||
.doNotOverwrite());
|
.doNotOverwrite());
|
||||||
} else if(HELIDON_LIBRARY.equals(library)) {
|
} else if(HELIDON_LIBRARY.equals(library)) {
|
||||||
|
additionalProperties.computeIfAbsent("helidonVersion", key -> "2.4.1");
|
||||||
supportingFiles.add(new SupportingFile("logging.properties.mustache", "src/main/resources", "logging.properties")
|
supportingFiles.add(new SupportingFile("logging.properties.mustache", "src/main/resources", "logging.properties")
|
||||||
.doNotOverwrite());
|
.doNotOverwrite());
|
||||||
supportingFiles.add(new SupportingFile("microprofile-config.properties.mustache", "src/main/resources/META-INF", "microprofile-config.properties")
|
supportingFiles.add(new SupportingFile("microprofile-config.properties.mustache", "src/main/resources/META-INF", "microprofile-config.properties")
|
||||||
.doNotOverwrite());
|
.doNotOverwrite());
|
||||||
supportingFiles.add(new SupportingFile("beans.xml.mustache", "src/main/webapp/META-INF", "beans.xml")
|
supportingFiles.add(new SupportingFile("beans.xml.mustache", "src/main/resources/META-INF", "beans.xml")
|
||||||
.doNotOverwrite());
|
.doNotOverwrite());
|
||||||
} else if(KUMULUZEE_LIBRARY.equals(library)) {
|
} else if(KUMULUZEE_LIBRARY.equals(library)) {
|
||||||
supportingFiles.add(new SupportingFile("config.yaml.mustache", "src/main/resources", "config.yaml"));
|
supportingFiles.add(new SupportingFile("config.yaml.mustache", "src/main/resources", "config.yaml"));
|
||||||
|
@ -16,7 +16,7 @@ The jar can be used in combination with an other project providing the implement
|
|||||||
{{/interfaceOnly}}
|
{{/interfaceOnly}}
|
||||||
|
|
||||||
{{^interfaceOnly}}
|
{{^interfaceOnly}}
|
||||||
To build the server, run this maven command:
|
To build the server, run this maven command (with JDK 11+):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mvn package
|
mvn package
|
||||||
@ -25,7 +25,7 @@ mvn package
|
|||||||
To run the server, run this maven command:
|
To run the server, run this maven command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mvn exec:java
|
java -jar target/{{artifactId}}.jar
|
||||||
```
|
```
|
||||||
|
|
||||||
You can then call your server endpoints under:
|
You can then call your server endpoints under:
|
||||||
|
@ -1,19 +1,20 @@
|
|||||||
# Example Logging Configuration File
|
# Example Logging Configuration File
|
||||||
# For more information see $JAVA_HOME/jre/lib/logging.properties
|
# For more information see $JAVA_HOME/jre/lib/logging.properties
|
||||||
|
|
||||||
# Send messages to the console
|
## Send messages to the console
|
||||||
handlers=java.util.logging.ConsoleHandler
|
handlers=io.helidon.common.HelidonConsoleHandler
|
||||||
|
#
|
||||||
# Global default logging level. Can be overridden by specific handlers and loggers
|
## HelidonConsoleHandler uses a SimpleFormatter subclass that replaces "!thread!" with the current thread
|
||||||
|
java.util.logging.SimpleFormatter.format=%1$tY.%1$tm.%1$td %1$tH:%1$tM:%1$tS %4$s %3$s !thread!: %5$s%6$s%n
|
||||||
|
#
|
||||||
|
## Global logging level. Can be overridden by specific loggers
|
||||||
.level=INFO
|
.level=INFO
|
||||||
|
|
||||||
# Helidon Web Server has a custom log formatter that extends SimpleFormatter.
|
# Quiet Weld
|
||||||
# It replaces "!thread!" with the current thread name
|
org.jboss.level=WARNING
|
||||||
java.util.logging.ConsoleHandler.level=INFO
|
|
||||||
java.util.logging.ConsoleHandler.formatter=io.helidon.webserver.WebServerLogFormatter
|
|
||||||
java.util.logging.SimpleFormatter.format=%1$tY.%1$tm.%1$td %1$tH:%1$tM:%1$tS %4$s %3$s !thread!: %5$s%6$s%n
|
|
||||||
|
|
||||||
#Component specific log levels
|
#
|
||||||
|
# Component specific log levels
|
||||||
#io.helidon.webserver.level=INFO
|
#io.helidon.webserver.level=INFO
|
||||||
#io.helidon.config.level=INFO
|
#io.helidon.config.level=INFO
|
||||||
#io.helidon.security.level=INFO
|
#io.helidon.security.level=INFO
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
|
# Microprofile server properties
|
||||||
|
|
||||||
|
# Application properties. This is the default greeting
|
||||||
|
app.greeting=Hello
|
||||||
|
|
||||||
# Microprofile server properties
|
# Microprofile server properties
|
||||||
server.port=8080
|
server.port=8080
|
||||||
server.host=0.0.0.0
|
server.host=0.0.0.0
|
||||||
|
|
||||||
# Microprofile OpenAPI properties
|
# Enable the optional MicroProfile Metrics REST.request metrics
|
||||||
mp.openapi.scan.disable=true
|
metrics.rest-request.enabled=true
|
||||||
|
@ -16,103 +16,223 @@
|
|||||||
{{/parentOverridden}}
|
{{/parentOverridden}}
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<mainClass>io.helidon.microprofile.server.Main</mainClass>
|
<!-- pom -->
|
||||||
<version.lib.helidon>1.2.0</version.lib.helidon>
|
<helidon.version>{{helidonVersion}}</helidon.version>
|
||||||
|
<mainClass>io.helidon.microprofile.cdi.Main</mainClass>
|
||||||
|
|
||||||
|
<maven.compiler.source>11</maven.compiler.source>
|
||||||
|
<maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
|
||||||
|
<maven.site.skip>true</maven.site.skip>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
|
||||||
|
<!-- plugin versions -->
|
||||||
<version.plugin.compiler>3.8.1</version.plugin.compiler>
|
<version.plugin.compiler>3.8.1</version.plugin.compiler>
|
||||||
|
<version.plugin.dependency>3.0.0</version.plugin.dependency>
|
||||||
|
<version.plugin.eclipselink>2.7.5.1</version.plugin.eclipselink>
|
||||||
<version.plugin.exec>1.6.0</version.plugin.exec>
|
<version.plugin.exec>1.6.0</version.plugin.exec>
|
||||||
|
<version.plugin.failsafe>3.0.0-M5</version.plugin.failsafe>
|
||||||
|
<version.plugin.helidon>2.3.0</version.plugin.helidon>
|
||||||
|
<version.plugin.helidon-cli>2.3.0</version.plugin.helidon-cli>
|
||||||
<version.plugin.jandex>1.0.6</version.plugin.jandex>
|
<version.plugin.jandex>1.0.6</version.plugin.jandex>
|
||||||
<version.plugin.jar>3.0.2</version.plugin.jar>
|
<version.plugin.jar>3.0.2</version.plugin.jar>
|
||||||
<version.lib.microprofile-openapi-api>1.1.2</version.lib.microprofile-openapi-api>
|
<version.plugin.os>1.5.0.Final</version.plugin.os>
|
||||||
<version.lib.jersey>2.29</version.lib.jersey>
|
<version.plugin.protobuf>0.5.1</version.plugin.protobuf>
|
||||||
<version.lib.activation-api>1.2.2</version.lib.activation-api>
|
<version.plugin.resources>2.7</version.plugin.resources>
|
||||||
<version.lib.junit>5.1.0</version.lib.junit>
|
<version.plugin.surefire>3.0.0-M5</version.plugin.surefire>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<build>
|
<dependencyManagement>
|
||||||
<plugins>
|
<dependencies>
|
||||||
<plugin>
|
<dependency>
|
||||||
<groupId>org.jboss.jandex</groupId>
|
<groupId>io.helidon</groupId>
|
||||||
<artifactId>jandex-maven-plugin</artifactId>
|
<artifactId>helidon-dependencies</artifactId>
|
||||||
<version>${version.plugin.jandex}</version>
|
<version>${helidon.version}</version>
|
||||||
<executions>
|
<type>pom</type>
|
||||||
<execution>
|
<scope>import</scope>
|
||||||
<id>make-index</id>
|
</dependency>
|
||||||
<goals>
|
</dependencies>
|
||||||
<goal>jandex</goal>
|
</dependencyManagement>
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<version>${version.plugin.jar}</version>
|
|
||||||
<configuration>
|
|
||||||
<archive>
|
|
||||||
<manifest>
|
|
||||||
<addClasspath>true</addClasspath>
|
|
||||||
<mainClass>${mainClass}</mainClass>
|
|
||||||
</manifest>
|
|
||||||
</archive>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
|
||||||
<version>${version.plugin.compiler}</version>
|
|
||||||
<configuration>
|
|
||||||
<source>1.8</source>
|
|
||||||
<target>1.8</target>
|
|
||||||
<compilerArgs>
|
|
||||||
<arg>-Xlint:unchecked</arg>
|
|
||||||
</compilerArgs>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
|
||||||
<version>${version.plugin.exec}</version>
|
|
||||||
<configuration>
|
|
||||||
<mainClass>${mainClass}</mainClass>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.helidon.microprofile.bundles</groupId>
|
<groupId>io.helidon.microprofile.bundles</groupId>
|
||||||
<artifactId>helidon-microprofile-2.2</artifactId>
|
<artifactId>helidon-microprofile</artifactId>
|
||||||
<version>${version.lib.helidon}</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.microprofile.openapi</groupId>
|
<groupId>org.jboss</groupId>
|
||||||
<artifactId>microprofile-openapi-api</artifactId>
|
<artifactId>jandex</artifactId>
|
||||||
<version>${version.lib.microprofile-openapi-api}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.glassfish.jersey.media</groupId>
|
|
||||||
<artifactId>jersey-media-json-binding</artifactId>
|
|
||||||
<version>${version.lib.jersey}</version>
|
|
||||||
<scope>runtime</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>jakarta.activation</groupId>
|
|
||||||
<artifactId>jakarta.activation-api</artifactId>
|
|
||||||
<version>${version.lib.activation-api}</version>
|
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.junit.jupiter</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
<artifactId>junit-jupiter-api</artifactId>
|
<artifactId>junit-jupiter-api</artifactId>
|
||||||
<version>${version.lib.junit}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.junit.jupiter</groupId>
|
|
||||||
<artifactId>junit-jupiter-engine</artifactId>
|
|
||||||
<version>${version.lib.junit}</version>
|
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>${version.plugin.compiler}</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>${version.plugin.surefire}</version>
|
||||||
|
<configuration>
|
||||||
|
<useModulePath>false</useModulePath>
|
||||||
|
<systemPropertyVariables>
|
||||||
|
<java.util.logging.config.file>${project.build.outputDirectory}/logging.properties</java.util.logging.config.file>
|
||||||
|
</systemPropertyVariables>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-failsafe-plugin</artifactId>
|
||||||
|
<version>${version.plugin.failsafe}</version>
|
||||||
|
<configuration>
|
||||||
|
<useModulePath>false</useModulePath>
|
||||||
|
<redirectTestOutputToFile>true</redirectTestOutputToFile>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<version>${version.plugin.dependency}</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>${version.plugin.resources}</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<version>${version.plugin.jar}</version>
|
||||||
|
<configuration>
|
||||||
|
<archive>
|
||||||
|
<manifest>
|
||||||
|
<addClasspath>true</addClasspath>
|
||||||
|
<classpathPrefix>libs</classpathPrefix>
|
||||||
|
<mainClass>${mainClass}</mainClass>
|
||||||
|
<useUniqueVersions>false</useUniqueVersions>
|
||||||
|
</manifest>
|
||||||
|
</archive>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jboss.jandex</groupId>
|
||||||
|
<artifactId>jandex-maven-plugin</artifactId>
|
||||||
|
<version>${version.plugin.jandex}</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>${version.plugin.exec}</version>
|
||||||
|
<configuration>
|
||||||
|
<mainClass>${mainClass}</mainClass>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>io.helidon.build-tools</groupId>
|
||||||
|
<artifactId>helidon-maven-plugin</artifactId>
|
||||||
|
<version>${version.plugin.helidon}</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>io.helidon.build-tools</groupId>
|
||||||
|
<artifactId>helidon-cli-maven-plugin</artifactId>
|
||||||
|
<version>${version.plugin.helidon-cli}</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>copy-libs</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}/libs</outputDirectory>
|
||||||
|
<overWriteReleases>false</overWriteReleases>
|
||||||
|
<overWriteSnapshots>false</overWriteSnapshots>
|
||||||
|
<overWriteIfNewer>true</overWriteIfNewer>
|
||||||
|
<overWriteIfNewer>true</overWriteIfNewer>
|
||||||
|
<includeScope>runtime</includeScope>
|
||||||
|
<excludeScope>test</excludeScope>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jboss.jandex</groupId>
|
||||||
|
<artifactId>jandex-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>make-index</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jandex</goal>
|
||||||
|
</goals>
|
||||||
|
<phase>process-classes</phase>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>native-image</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>io.helidon.build-tools</groupId>
|
||||||
|
<artifactId>helidon-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>native-image</id>
|
||||||
|
<goals>
|
||||||
|
<goal>native-image</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.helidon.integrations.graal</groupId>
|
||||||
|
<artifactId>helidon-mp-graal-native-image-extension</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>jlink-image</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>io.helidon.build-tools</groupId>
|
||||||
|
<artifactId>helidon-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>jlink-image</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
</project>
|
</project>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user