pf-sdn/pom.xml

156 lines
6.1 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>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>
</properties>
<!-- в root/pom.xml -->
<profiles>
<profile>
<id>assembly</id>
<activation>
<property>
<name>project.packaging</name>
<value>pom</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>post-build-assembly</id>
<phase>verify</phase> <!-- выполнится после сборки всех модулей -->
<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>
</profile>
</profiles>
<build>
<plugins>
<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>1.18.40</version>
</path>
</annotationProcessorPaths>
</configuration>
</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>1.18.40</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ru.kirillius</groupId>
<artifactId>json-rpc-servlet</artifactId>
<version>2.1.4.0</version>
</dependency>
</dependencies>
</project>