146 lines
4.0 KiB
XML
146 lines
4.0 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>main</groupId>
|
|
<artifactId>vpSecure</artifactId>
|
|
<version>1.0</version>
|
|
<packaging>jar</packaging>
|
|
|
|
<name>vpSecure</name>
|
|
|
|
<properties>
|
|
<java.version>17</java.version>
|
|
<kotlin.version>2.2.20-RC2</kotlin.version>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
</properties>
|
|
|
|
<build>
|
|
<defaultGoal>clean package</defaultGoal>
|
|
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.jetbrains.kotlin</groupId>
|
|
<artifactId>kotlin-maven-plugin</artifactId>
|
|
<version>${kotlin.version}</version>
|
|
<executions>
|
|
<execution>
|
|
<id>compile</id>
|
|
<phase>compile</phase>
|
|
<goals>
|
|
<goal>compile</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
<configuration>
|
|
<jvmTarget>${java.version}</jvmTarget>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-shade-plugin</artifactId>
|
|
<version>3.5.3</version>
|
|
<executions>
|
|
<execution>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>shade</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
<resources>
|
|
<resource>
|
|
<directory>src/main/resources</directory>
|
|
<filtering>true</filtering>
|
|
</resource>
|
|
</resources>
|
|
</build>
|
|
|
|
<repositories>
|
|
<repository>
|
|
<id>spigotmc-repo</id>
|
|
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
|
</repository>
|
|
</repositories>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.spigotmc</groupId>
|
|
<artifactId>spigot-api</artifactId>
|
|
<version>1.12.2-R0.1-SNAPSHOT</version>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.jetbrains.kotlin</groupId>
|
|
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
|
<version>${kotlin.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<!-- Deployment profile for FTPS and HTTP actions -->
|
|
<profiles>
|
|
<profile>
|
|
<id>myDeploy</id>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
<version>3.1.0</version>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>commons-net</groupId>
|
|
<artifactId>commons-net</artifactId>
|
|
<version>3.9.0</version>
|
|
</dependency>
|
|
</dependencies>
|
|
<executions>
|
|
<!-- FTPS file transfer execution -->
|
|
<execution>
|
|
<id>ftps-upload</id>
|
|
<phase>install</phase>
|
|
<configuration>
|
|
<target>
|
|
<echo message="UPLOADING file to ${ftps.username}@${ftps.host} ${srv.ftps.remote.directory}"/>
|
|
<echo message="curl -k --ssl-reqd --ftp-create-dirs -T target/vpSecure-1.0.jar -u ${ftps.username}:${ftps.password} ftp://${ftps.host}:${ftps.port}/${srv.ftps.remote.directory}"/>
|
|
<exec executable="sh">
|
|
<arg value="-c"/>
|
|
<arg value="curl -k --ssl-reqd --ftp-create-dirs -T target/vpSecure-1.0.jar -u ${ftps.username}:${ftps.password} ftp://${ftps.host}:${ftps.port}/${srv.ftps.remote.directory}"/>
|
|
</exec>
|
|
</target>
|
|
</configuration>
|
|
<goals>
|
|
<goal>run</goal>
|
|
</goals>
|
|
</execution>
|
|
|
|
<!-- HTTP POST request execution -->
|
|
<execution>
|
|
<id>http-notification</id>
|
|
<phase>install</phase>
|
|
<configuration>
|
|
<target>
|
|
<echo message="SENDING restart request to ${srv.restart.endpoint}"/>
|
|
<echo message="curl -k -X POST -H 'Authorization: Bearer ${minihost.token}' ${srv.restart.endpoint}"/>
|
|
<exec executable="sh">
|
|
<arg value="-c"/>
|
|
<arg value="curl -k -X POST -H 'Authorization: Bearer ${minihost.token}' ${srv.restart.endpoint}"/>
|
|
</exec>
|
|
</target>
|
|
</configuration>
|
|
<goals>
|
|
<goal>run</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
</profiles>
|
|
</project>
|