128 lines
5.2 KiB
XML
128 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>com.rosetta.im</groupId>
|
||
<artifactId>rosetta-server</artifactId>
|
||
<version>1.0-SNAPSHOT</version>
|
||
|
||
<properties>
|
||
<maven.compiler.source>17</maven.compiler.source>
|
||
<maven.compiler.target>17</maven.compiler.target>
|
||
</properties>
|
||
|
||
<dependencies>
|
||
<dependency>
|
||
<groupId>org.java-websocket</groupId>
|
||
<artifactId>Java-WebSocket</artifactId>
|
||
<version>1.6.0</version>
|
||
</dependency>
|
||
|
||
<!-- Hibernate ORM -->
|
||
<dependency>
|
||
<groupId>org.hibernate.orm</groupId>
|
||
<artifactId>hibernate-core</artifactId>
|
||
<version>6.4.0.Final</version>
|
||
</dependency>
|
||
|
||
<!-- PostgreSQL JDBC Driver -->
|
||
<dependency>
|
||
<groupId>org.postgresql</groupId>
|
||
<artifactId>postgresql</artifactId>
|
||
<version>42.7.1</version>
|
||
</dependency>
|
||
|
||
<!-- Jakarta Persistence API -->
|
||
<dependency>
|
||
<groupId>jakarta.persistence</groupId>
|
||
<artifactId>jakarta.persistence-api</artifactId>
|
||
<version>3.1.0</version>
|
||
</dependency>
|
||
|
||
<!-- Source: https://mvnrepository.com/artifact/org.yaml/snakeyaml -->
|
||
<dependency>
|
||
<groupId>org.yaml</groupId>
|
||
<artifactId>snakeyaml</artifactId>
|
||
<version>2.5</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>com.rosetta.im.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> |