project of gitlab-runner gateway
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

218 lines
9.5KB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xmlns="http://maven.apache.org/POM/4.0.0"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <!-- spring-boot -->
  7. <parent>
  8. <groupId>org.springframework.boot</groupId>
  9. <artifactId>spring-boot-starter-parent</artifactId>
  10. <version>2.4.0-M2</version>
  11. <!-- <version>2.3.2.RELEASE</version>-->
  12. <relativePath/> <!-- lookup parent from repository -->
  13. </parent>
  14. <groupId>tk.antoine-roux</groupId>
  15. <artifactId>wiki-project</artifactId>
  16. <version>${revision}</version>
  17. <name>wiki-project</name>
  18. <description>project use wikipedia streaming api https://stream.wikimedia.org/?doc#/Streams/get_v2_stream_test
  19. </description>
  20. <properties>
  21. <revision>1.0-SNAPSHOT</revision>
  22. <java.version>11</java.version>
  23. <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
  24. <jib-maven-plugin.version>2.5.2</jib-maven-plugin.version>
  25. <spring-boot.run.jvmArguments/>
  26. <application.port>8080</application.port>
  27. <resource.delimiter>^</resource.delimiter>
  28. <enable-preview.jvmFlag/>
  29. <!-- <enable-preview.jvmFlag>&#45;&#45;enable-preview</enable-preview.jvmFlag>-->
  30. <start-class>tk.antoine_roux.wiki.MainLauncher</start-class>
  31. <spring-graalvm-native.version>0.8.0</spring-graalvm-native.version>
  32. <native-image-maven-plugin.version>20.2.0</native-image-maven-plugin.version>
  33. <jackson-datatype.version>2.11.2</jackson-datatype.version>
  34. <org.eclipse.jgit.version>5.9.0.202009080501-r</org.eclipse.jgit.version>
  35. </properties>
  36. <dependencies>
  37. <!-- spring-boot -->
  38. <dependency>
  39. <groupId>org.springframework.boot</groupId>
  40. <artifactId>spring-boot-starter</artifactId>
  41. </dependency>
  42. <dependency>
  43. <groupId>org.springframework.boot</groupId>
  44. <artifactId>spring-boot-starter-web</artifactId>
  45. <!-- <exclusions>
  46. <exclusion>
  47. <groupId>org.springframework.boot</groupId>
  48. <artifactId>spring-boot-starter-tomcat</artifactId>
  49. </exclusion>
  50. </exclusions>-->
  51. </dependency>
  52. <!-- <dependency>
  53. <groupId>org.springframework.boot</groupId>
  54. <artifactId>spring-boot-starter-undertow</artifactId>
  55. </dependency>-->
  56. <dependency>
  57. <groupId>org.springframework.boot</groupId>
  58. <artifactId>spring-boot-starter-actuator</artifactId>
  59. </dependency>
  60. <dependency>
  61. <groupId>com.fasterxml.jackson.dataformat</groupId>
  62. <artifactId>jackson-dataformat-yaml</artifactId>
  63. </dependency>
  64. <dependency>
  65. <groupId>com.fasterxml.jackson.datatype</groupId>
  66. <artifactId>jackson-datatype-jsr310</artifactId>
  67. </dependency>
  68. <dependency>
  69. <groupId>org.eclipse.jgit</groupId>
  70. <artifactId>org.eclipse.jgit</artifactId>
  71. <version>${org.eclipse.jgit.version}</version>
  72. </dependency>
  73. </dependencies>
  74. <build>
  75. <plugins>
  76. <plugin>
  77. <groupId>org.springframework.boot</groupId>
  78. <artifactId>spring-boot-maven-plugin</artifactId>
  79. <configuration>
  80. <jvmArguments>${enable-preview.jvmFlag} ${spring-boot.run.jvmArguments}</jvmArguments>
  81. <layers>
  82. <enabled>true</enabled>
  83. </layers>
  84. </configuration>
  85. </plugin>
  86. <plugin>
  87. <!-- https://github.com/GoogleContainerTools/jib/tree/master/jib-maven-plugin#authentication-methods -->
  88. <groupId>com.google.cloud.tools</groupId>
  89. <artifactId>jib-maven-plugin</artifactId>
  90. <version>${jib-maven-plugin.version}</version>
  91. <configuration>
  92. <from>
  93. <!-- <image>adoptopenjdk:14.0.2_8-jdk-openj9-0.21.0</image> -->
  94. <image>adoptopenjdk:14-jdk-openj9</image>
  95. <!-- <image>adoptopenjdk:14.0.2_8-jdk-hotspot</image> -->
  96. <!-- <image>adoptopenjdk:14-jdk-hotspot</image> -->
  97. </from>
  98. <to>
  99. <image>docker.registry:5000/wikiproject</image>
  100. </to>
  101. <container>
  102. <jvmFlags>
  103. <jvmFlag>${enable-preview.jvmFlag}</jvmFlag>
  104. <jvmFlag>-Xms512m</jvmFlag>
  105. </jvmFlags>
  106. <ports>
  107. <port>${application.port}</port>
  108. </ports>
  109. <format>OCI</format>
  110. </container>
  111. <allowInsecureRegistries>true</allowInsecureRegistries>
  112. </configuration>
  113. </plugin>
  114. <plugin>
  115. <groupId>org.apache.maven.plugins</groupId>
  116. <artifactId>maven-compiler-plugin</artifactId>
  117. <configuration>
  118. <release>${java.version}</release>
  119. <compilerArgs>${enable-preview.jvmFlag}</compilerArgs>
  120. </configuration>
  121. </plugin>
  122. </plugins>
  123. </build>
  124. <profiles>
  125. <profile>
  126. <id>no-graal</id>
  127. <activation>
  128. <activeByDefault>true</activeByDefault>
  129. </activation>
  130. <dependencies>
  131. <dependency>
  132. <groupId>org.springframework.boot</groupId>
  133. <artifactId>spring-boot-devtools</artifactId>
  134. <scope>runtime</scope>
  135. <optional>true</optional>
  136. </dependency>
  137. </dependencies>
  138. </profile>
  139. <profile>
  140. <id>graal</id>
  141. <dependencies>
  142. <dependency>
  143. <groupId>org.springframework.experimental</groupId>
  144. <artifactId>spring-graalvm-native</artifactId>
  145. <version>${spring-graalvm-native.version}</version>
  146. </dependency>
  147. <!-- generate target/classes/META_INF/spring.components with list of application's spring component class -->
  148. <dependency>
  149. <groupId>org.springframework</groupId>
  150. <artifactId>spring-context-indexer</artifactId>
  151. </dependency>
  152. </dependencies>
  153. <build>
  154. <plugins>
  155. <plugin>
  156. <groupId>org.graalvm.nativeimage</groupId>
  157. <artifactId>native-image-maven-plugin</artifactId>
  158. <version>${native-image-maven-plugin.version}</version>
  159. <configuration>
  160. <!-- 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 -->
  161. <buildArgs>
  162. -H:+PrintAnalysisCallTree
  163. -H:+TraceClassInitialization
  164. <!-- -H:+ReportExceptionStackTraces-->
  165. <!-- reduce build time and memory -->
  166. <!-- -H:+RemoveSaturatedTypeFlows-->
  167. --allow-incomplete-classpath
  168. --report-unsupported-elements-at-runtime
  169. --no-fallback
  170. --no-server
  171. --verbose
  172. <!-- &#45;&#45;initialize-at-build-time=org.springframework.boot.validation.MessageInterpolatorFactory-->
  173. -J-Xmx3G --static
  174. </buildArgs>
  175. <imageName>${project.artifactId}</imageName>
  176. </configuration>
  177. <executions>
  178. <execution>
  179. <goals>
  180. <goal>native-image</goal>
  181. </goals>
  182. <phase>package</phase>
  183. </execution>
  184. </executions>
  185. </plugin>
  186. <plugin>
  187. <groupId>org.springframework.boot</groupId>
  188. <artifactId>spring-boot-maven-plugin</artifactId>
  189. </plugin>
  190. </plugins>
  191. </build>
  192. </profile>
  193. </profiles>
  194. <repositories>
  195. <!-- spring repository for milestone artifact -->
  196. <repository>
  197. <id>spring-milestone</id>
  198. <name>Spring milestone</name>
  199. <url>https://repo.spring.io/milestone</url>
  200. </repository>
  201. </repositories>
  202. <pluginRepositories>
  203. <pluginRepository>
  204. <id>spring-milestone</id>
  205. <name>Spring milestone</name>
  206. <url>https://repo.spring.io/milestone</url>
  207. </pluginRepository>
  208. </pluginRepositories>
  209. </project>