pf-sdn/pom.xml

154 lines
6.6 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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>ru.kirillius</groupId>
<artifactId>pf-sdn</artifactId>
<version>0.1.0.0</version>
<packaging>pom</packaging>
<modules>
<module>core</module>
<module>app</module>
<module>ovpn-connector</module>
</modules>
<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<lombok.version>1.18.40</lombok.version> <!-- Вынесено в properties -->
</properties>
<!-- Блок profiles, который вызывал проблемы с активацией, удален. -->
<build>
<plugins>
<!-- Плагин Compiler Plugin остается -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<!-- ФИНАЛЬНОЕ ИСПРАВЛЕНИЕ: Antrun Plugin вынесен в основной build.
runOnlyAtExecutionRoot гарантирует, что он будет выполнен ТОЛЬКО в корневом POM. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>clean-root-target</id>
<phase>clean</phase>
<inherited>false</inherited>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<delete dir="${project.build.directory}"/>
</target>
</configuration>
</execution>
<execution>
<id>post-build-assembly</id>
<phase>verify</phase> <!-- выполнится после сборки всех модулей -->
<inherited>false</inherited>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- 1. Создать папку target (для root) -->
<mkdir dir="${project.build.directory}"/>
<!-- 2. Копировать app/target/app-$VERSION-shaded.jar -> target/$VERSION.pfapp -->
<copy file="${basedir}/app/target/app-${project.version}-shaded.jar"
tofile="${project.build.directory}/${project.version}.pfapp"
overwrite="true"/>
<!-- 3. Копировать launcher.sh -> target/pfsdnd и сделать исполняемым -->
<copy file="${basedir}/launcher.sh"
tofile="${project.build.directory}/pfsdnd"
overwrite="true"/>
<!-- Делаем файл исполняемым (для Unix/Linux) -->
<chmod file="${project.build.directory}/pfsdnd" perm="755"/>
<!-- 4. Копировать ovpn-connector/target/ovpn-pfsdn-bind -> target/ -->
<copy file="${basedir}/ovpn-connector/target/ovpn-pfsdn-bind"
tofile="${project.build.directory}/ovpn-pfsdn-bind"
overwrite="true"/>
<!-- Также делаем исполняемым -->
<chmod file="${project.build.directory}/ovpn-pfsdn-bind" perm="755"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>kirillius</id>
<name>kirillius</name>
<url>https://repo.kirillius.ru/maven</url>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</releases>
<layout>default</layout>
</repository>
</repositories>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.13.0-M2</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.assertj/assertj-core -->
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>4.0.0-M1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ru.kirillius</groupId>
<artifactId>json-rpc-servlet</artifactId>
<version>2.1.4.0</version>
</dependency>
</dependencies>
</project>