123 lines
5.2 KiB
XML
123 lines
5.2 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>
|
||
|
||
<groupId>im.rosetta</groupId>
|
||
<artifactId>rosetta-cdn</artifactId>
|
||
<version>1.0-SNAPSHOT</version>
|
||
|
||
<properties>
|
||
<maven.compiler.source>21</maven.compiler.source>
|
||
<maven.compiler.target>21</maven.compiler.target>
|
||
<jersey.version>3.1.5</jersey.version>
|
||
</properties>
|
||
|
||
<dependencies>
|
||
<dependency>
|
||
<groupId>org.glassfish.jersey.containers</groupId>
|
||
<artifactId>jersey-container-grizzly2-http</artifactId>
|
||
<version>${jersey.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.glassfish.jersey.inject</groupId>
|
||
<artifactId>jersey-hk2</artifactId>
|
||
<version>${jersey.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.glassfish.jersey.media</groupId>
|
||
<artifactId>jersey-media-json-jackson</artifactId>
|
||
<version>${jersey.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.glassfish.jersey.media</groupId>
|
||
<artifactId>jersey-media-multipart</artifactId>
|
||
<version>${jersey.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.slf4j</groupId>
|
||
<artifactId>slf4j-simple</artifactId>
|
||
<version>2.0.12</version>
|
||
</dependency>
|
||
</dependencies>
|
||
|
||
<build>
|
||
<plugins>
|
||
<!-- Сборка исполняемого JAR со всеми зависимостями -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-assembly-plugin</artifactId>
|
||
<version>3.6.0</version>
|
||
<executions>
|
||
<execution>
|
||
<phase>package</phase>
|
||
<goals>
|
||
<goal>single</goal>
|
||
</goals>
|
||
<configuration>
|
||
<archive>
|
||
<manifest>
|
||
<mainClass>im.rosetta.Main</mainClass>
|
||
</manifest>
|
||
</archive>
|
||
<descriptorRefs>
|
||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||
</descriptorRefs>
|
||
<finalName>app</finalName>
|
||
<appendAssemblyId>false</appendAssemblyId>
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
<!-- Удаляем папку build/classes перед сборкой -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-clean-plugin</artifactId>
|
||
<version>3.3.2</version>
|
||
<executions>
|
||
<execution>
|
||
<phase>pre-clean</phase>
|
||
<configuration>
|
||
<excludeDefaultDirectories>true</excludeDefaultDirectories>
|
||
<filesets>
|
||
<fileset>
|
||
<directory>${project.basedir}/build</directory>
|
||
<includes>
|
||
<include>classes/</include>
|
||
</includes>
|
||
</fileset>
|
||
</filesets>
|
||
</configuration>
|
||
<goals>
|
||
<goal>clean</goal>
|
||
</goals>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
<!-- Копирование готового JAR в папку build/ -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-antrun-plugin</artifactId>
|
||
<version>3.1.0</version>
|
||
<executions>
|
||
<execution>
|
||
<phase>package</phase>
|
||
<configuration>
|
||
<target>
|
||
<mkdir dir="${project.basedir}/build"/>
|
||
<copy file="${project.build.directory}/app.jar" todir="${project.basedir}/build/" overwrite="true"/>
|
||
<echo message="> JAR в build/app.jar, готов к деполю на сервер"/>
|
||
</target>
|
||
</configuration>
|
||
<goals>
|
||
<goal>run</goal>
|
||
</goals>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
</plugins>
|
||
</build>
|
||
|
||
|
||
</project> |