189 lines
8.3 KiB
XML
189 lines
8.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<!-- spring-boot -->
|
|
<parent>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-parent</artifactId>
|
|
<version>2.3.2.RELEASE</version>
|
|
</parent>
|
|
|
|
<groupId>fr.antoine-roux</groupId>
|
|
<artifactId>wikiProject</artifactId>
|
|
<version>${revision}</version>
|
|
<name>wikiProject</name>
|
|
<description>project use wikipedia streaming api https://stream.wikimedia.org/?doc#/Streams/get_v2_stream_test
|
|
</description>
|
|
|
|
<properties>
|
|
<revision>1.0-SNAPSHOT</revision>
|
|
<java.version>11</java.version>
|
|
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
|
|
<jib-maven-plugin.version>2.5.2</jib-maven-plugin.version>
|
|
<spring-boot.run.jvmArguments/>
|
|
<application.port>8080</application.port>
|
|
<resource.delimiter>^</resource.delimiter>
|
|
<enable-preview.jvmFlag/>
|
|
<!-- <enable-preview.jvmFlag>--enable-preview</enable-preview.jvmFlag>-->
|
|
<start-class>tk.antoine_roux.wiki.MainLauncher</start-class>
|
|
<spring-graalvm-native.version>0.7.1</spring-graalvm-native.version>
|
|
<native-image-maven-plugin.version>20.1.0</native-image-maven-plugin.version>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<!-- spring-boot -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
<!-- <exclusions>-->
|
|
<!-- <exclusion>-->
|
|
<!-- <groupId>org.springframework.boot</groupId>-->
|
|
<!-- <artifactId>spring-boot-starter-tomcat</artifactId>-->
|
|
<!-- </exclusion>-->
|
|
<!-- </exclusions>-->
|
|
</dependency>
|
|
<!-- <dependency>-->
|
|
<!-- <groupId>org.springframework.boot</groupId>-->
|
|
<!-- <artifactId>spring-boot-starter-undertow</artifactId>-->
|
|
<!-- </dependency>-->
|
|
<!-- <dependency>-->
|
|
<!-- <groupId>org.springframework.boot</groupId>-->
|
|
<!-- <artifactId>spring-boot-devtools</artifactId>-->
|
|
<!-- <scope>runtime</scope>-->
|
|
<!-- <optional>true</optional>-->
|
|
<!-- </dependency>-->
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
<configuration>
|
|
<jvmArguments>${enable-preview.jvmFlag} ${spring-boot.run.jvmArguments}</jvmArguments>
|
|
<layers>
|
|
<enabled>true</enabled>
|
|
</layers>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<!-- https://github.com/GoogleContainerTools/jib/tree/master/jib-maven-plugin#authentication-methods -->
|
|
<groupId>com.google.cloud.tools</groupId>
|
|
<artifactId>jib-maven-plugin</artifactId>
|
|
<version>${jib-maven-plugin.version}</version>
|
|
<configuration>
|
|
<from>
|
|
<!-- <image>adoptopenjdk:14.0.2_8-jdk-openj9-0.21.0</image> -->
|
|
<image>adoptopenjdk:14-jdk-openj9</image>
|
|
<!-- <image>adoptopenjdk:14.0.2_8-jdk-hotspot</image> -->
|
|
<!-- <image>adoptopenjdk:14-jdk-hotspot</image> -->
|
|
</from>
|
|
<to>
|
|
<image>docker.registry:5000/wikiproject</image>
|
|
</to>
|
|
<container>
|
|
<jvmFlags>
|
|
<jvmFlag>${enable-preview.jvmFlag}</jvmFlag>
|
|
<jvmFlag>-Xms512m</jvmFlag>
|
|
</jvmFlags>
|
|
<ports>
|
|
<port>${application.port}</port>
|
|
</ports>
|
|
<format>OCI</format>
|
|
</container>
|
|
<allowInsecureRegistries>true</allowInsecureRegistries>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<configuration>
|
|
<release>${java.version}</release>
|
|
<compilerArgs>${enable-preview.jvmFlag}</compilerArgs>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
<profiles>
|
|
<profile>
|
|
<id>graal</id>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.springframework.experimental</groupId>
|
|
<artifactId>spring-graalvm-native</artifactId>
|
|
<version>${spring-graalvm-native.version}</version>
|
|
</dependency>
|
|
<!-- generate target/classes/META_INF/spring.components with list of application's spring component class -->
|
|
<dependency>
|
|
<groupId>org.springframework</groupId>
|
|
<artifactId>spring-context-indexer</artifactId>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.graalvm.nativeimage</groupId>
|
|
<artifactId>native-image-maven-plugin</artifactId>
|
|
<version>${native-image-maven-plugin.version}</version>
|
|
<configuration>
|
|
<buildArgs>
|
|
-Dspring.graal.mode=initialization-only
|
|
-Dspring.graal.dump-config=/tmp/computed-reflect-config.json
|
|
-Dspring.graal.verbose=true
|
|
-Dspring.graal.skip-logback=true
|
|
-Dspring.graal.remove-unused-autoconfig=true
|
|
-H:+TraceClassInitialization
|
|
--no-fallback
|
|
--allow-incomplete-classpath
|
|
--report-unsupported-elements-at-runtime
|
|
-H:+ReportExceptionStackTraces
|
|
--no-server
|
|
--initialize-at-build-time=org.springframework.boot.validation.MessageInterpolatorFactory
|
|
-J-Xmx3G --static
|
|
</buildArgs>
|
|
<imageName>${project.artifactId}</imageName>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>native-image</goal>
|
|
</goals>
|
|
<phase>package</phase>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
<repositories>
|
|
<repository>
|
|
<id>spring-milestones</id>
|
|
<name>Spring Milestones</name>
|
|
<url>https://repo.spring.io/milestone</url>
|
|
</repository>
|
|
</repositories>
|
|
<pluginRepositories>
|
|
<pluginRepository>
|
|
<id>spring-milestones</id>
|
|
<name>Spring Milestones</name>
|
|
<url>https://repo.spring.io/milestone</url>
|
|
</pluginRepository>
|
|
</pluginRepositories>
|
|
</profile>
|
|
</profiles>
|
|
|
|
</project>
|