gitlab-runner-gateway/pom.xml

218 行
9.5 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.4.0-M2</version>
<!-- <version>2.3.2.RELEASE</version>-->
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>tk.antoine-roux</groupId>
<artifactId>wiki-project</artifactId>
<version>${revision}</version>
<name>wiki-project</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>&#45;&#45;enable-preview</enable-preview.jvmFlag>-->
<start-class>tk.antoine_roux.wiki.MainLauncher</start-class>
<spring-graalvm-native.version>0.8.0</spring-graalvm-native.version>
<native-image-maven-plugin.version>20.2.0</native-image-maven-plugin.version>
<jackson-datatype.version>2.11.2</jackson-datatype.version>
<org.eclipse.jgit.version>5.9.0.202009080501-r</org.eclipse.jgit.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-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>${org.eclipse.jgit.version}</version>
</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>no-graal</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
<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>
<!-- doc here : https://repo.spring.io/milestone/org/springframework/experimental/spring-graalvm-native-docs/0.7.1/spring-graalvm-native-docs-0.7.1.zip!/reference/index.html#options -->
<buildArgs>
-H:+PrintAnalysisCallTree
-H:+TraceClassInitialization
<!-- -H:+ReportExceptionStackTraces-->
<!-- reduce build time and memory -->
<!-- -H:+RemoveSaturatedTypeFlows-->
--allow-incomplete-classpath
--report-unsupported-elements-at-runtime
--no-fallback
--no-server
--verbose
<!-- &#45;&#45;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>
</profile>
</profiles>
<repositories>
<!-- spring repository for milestone artifact -->
<repository>
<id>spring-milestone</id>
<name>Spring milestone</name>
<url>https://repo.spring.io/milestone</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-milestone</id>
<name>Spring milestone</name>
<url>https://repo.spring.io/milestone</url>
</pluginRepository>
</pluginRepositories>
</project>