187 lines
7.3 KiB
XML
187 lines
7.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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>
|
|
|
|
<parent>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-parent</artifactId>
|
|
<version>3.2.3</version>
|
|
<relativePath/> <!-- lookup parent from repository -->
|
|
</parent>
|
|
|
|
<groupId>ru.microservice</groupId>
|
|
<artifactId>microservice-back-minus</artifactId>
|
|
<version>1.0</version>
|
|
<packaging>jar</packaging>
|
|
|
|
<properties>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<maven.compiler.source>17</maven.compiler.source>
|
|
<maven.compiler.target>17</maven.compiler.target>
|
|
<start-class>ru.microservice.back.minus.Main</start-class>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<!-- Commons -->
|
|
<dependency>
|
|
<groupId>ru.microservice</groupId>
|
|
<artifactId>microservice-back-commons</artifactId>
|
|
<version>1.0</version>
|
|
</dependency>
|
|
|
|
<!-- Spring -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-tomcat</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Test -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-test</artifactId>
|
|
<version>3.2.4</version>
|
|
<scope>test</scope>
|
|
<type>jar</type>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.junit.jupiter</groupId>
|
|
<artifactId>junit-jupiter-api</artifactId>
|
|
<version>5.10.2</version>
|
|
<scope>test</scope>
|
|
<type>jar</type>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-test</artifactId>
|
|
<scope>test</scope>
|
|
<version>3.1.5</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>junit</groupId>
|
|
<artifactId>junit</artifactId>
|
|
<version>4.13.2</version>
|
|
<scope>test</scope>
|
|
<type>jar</type>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.assertj</groupId>
|
|
<artifactId>assertj-core</artifactId>
|
|
<version>3.24.2</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<finalName>${project.artifactId}-${project.version}-${buildNumber}</finalName>
|
|
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
<configuration>
|
|
<mainClass>${start-class}</mainClass>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>io.fabric8</groupId>
|
|
<artifactId>docker-maven-plugin</artifactId>
|
|
<version>0.44.0</version>
|
|
<configuration>
|
|
<dockerHost>tcp://my.docker.host:2375</dockerHost>
|
|
<pushRegistry>my.docker.host:5000</pushRegistry>
|
|
|
|
<images>
|
|
<image>
|
|
<alias>${project.artifactId}</alias>
|
|
<name>microservices/back-minus:${project.version}-${buildNumber}</name>
|
|
<build>
|
|
<tags>
|
|
<tag>${project.version}-${buildNumber}</tag>
|
|
</tags>
|
|
<from>openjdk:17.0.2-jdk-slim-buster</from>
|
|
<assembly>
|
|
<descriptorRef>artifact-with-dependencies</descriptorRef>
|
|
</assembly>
|
|
<cmd>
|
|
<shell>java -jar /maven/${project.build.finalName}.jar</shell>
|
|
</cmd>
|
|
<buildOptions>
|
|
<!-- linux/arm64/v8 linux/arm64 linux/amd64 -->
|
|
<platform>linux/amd64</platform>
|
|
</buildOptions>
|
|
</build>
|
|
</image>
|
|
</images>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>build</id>
|
|
<phase>pre-integration-test</phase>
|
|
<goals>
|
|
<goal>build</goal> <!-- "build" should be used to create the images with the artifact -->
|
|
</goals>
|
|
</execution>
|
|
<execution>
|
|
<id>start</id>
|
|
<phase>pre-integration-test</phase>
|
|
<goals>
|
|
<goal>start</goal>
|
|
</goals>
|
|
</execution>
|
|
<execution>
|
|
<id>stop</id>
|
|
<phase>post-integration-test</phase>
|
|
<goals>
|
|
<goal>stop</goal>
|
|
</goals>
|
|
</execution>
|
|
<execution>
|
|
<id>repository-push</id>
|
|
<phase>install</phase>
|
|
<goals>
|
|
<goal>push</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>buildnumber-maven-plugin</artifactId>
|
|
<version>1.4</version>
|
|
<executions>
|
|
<execution>
|
|
<id>buildnumber</id>
|
|
<phase>validate</phase>
|
|
<goals>
|
|
<goal>create</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
<configuration>
|
|
<format>{0,number}</format>
|
|
<items>
|
|
<item>buildNumber</item>
|
|
</items>
|
|
<doCheck>false</doCheck>
|
|
<doUpdate>false</doUpdate>
|
|
<revisionOnScmFailure>unknownbuild</revisionOnScmFailure>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
<scm>
|
|
<connection>scm:svn:http://127.0.0.1/dummy</connection>
|
|
<developerConnection>scm:svn:https://127.0.0.1/dummy</developerConnection>
|
|
<tag>HEAD</tag>
|
|
<url>http://127.0.0.1/dummy</url>
|
|
</scm>
|
|
</project> |