72 lines
3.5 KiB
XML
72 lines
3.5 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>ru.kirillius</groupId>
|
|
<artifactId>pf-sdn</artifactId>
|
|
<version>1.0.1.5</version>
|
|
</parent>
|
|
|
|
<artifactId>launcher</artifactId>
|
|
|
|
<build>
|
|
<plugins>
|
|
<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/pf-sdn.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>
|
|
|
|
</project> |