<!-- Copyright (c) 2013 LogonBox Limited. All rights reserved. This program 
	and the accompanying materials are made available under the terms of the 
	GNU Public License v3.0 which accompanies this distribution, and is available 
	at http://www.gnu.org/licenses/gpl.html -->
<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>
    <artifactId>client-logonbox-vpn-service</artifactId>
    <name>Hypersocket - LogonBox VPN Service</name>

    <parent>
        <groupId>com.logonbox</groupId>
        <artifactId>logonbox-desktop-vpn-clients</artifactId>
		<version>3.0.6-SNAPSHOT</version>
        <relativePath>..</relativePath>
    </parent>

    <build>
        <plugins>
            <plugin>
                <groupId>com.nervepoint</groupId>
                <artifactId>google-translate-v2-java-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>translate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>com.logonbox</groupId>
            <artifactId>client-logonbox-vpn-common</artifactId>
            <version>${project.version}</version>
        </dependency>
       <dependency>
            <groupId>info.picocli</groupId>
            <artifactId>picocli</artifactId>
            <version>4.6.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derby</artifactId>
            <version>10.15.2.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derbyclient</artifactId>
            <version>10.15.2.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derbytools</artifactId>
            <version>10.15.2.0</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>5.4.30.Final</version>
        </dependency>
        <dependency>
            <groupId>com.github.jgonian</groupId>
            <artifactId>commons-ip-math</artifactId>
            <version>1.32</version>
        </dependency>
        <dependency>
            <groupId>com.sshtools</groupId>
            <artifactId>forker-client</artifactId>
            <version>1.8-SNAPSHOT</version>
            <exclusions>
            	<exclusion>
            		<groupId>net.java.dev.jna</groupId>
            		<artifactId>jna</artifactId>
            	</exclusion>
            	<exclusion>
            		<groupId>net.java.dev.jna</groupId>
            		<artifactId>jna-platform</artifactId>
            	</exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.sshtools</groupId>
            <artifactId>forker-pipes</artifactId>
            <version>1.8-SNAPSHOT</version>
            <exclusions>
            	<exclusion>
            		<groupId>net.java.dev.jna</groupId>
            		<artifactId>jna</artifactId>
            	</exclusion>
            	<exclusion>
            		<groupId>net.java.dev.jna</groupId>
            		<artifactId>jna-platform</artifactId>
            	</exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.sshtools</groupId>
            <artifactId>maverick-base</artifactId>
            <version>3.0.8</version>
        </dependency>
        <dependency>
            <groupId>org.whispersystems</groupId>
            <artifactId>curve25519-java</artifactId>
            <version>0.5.0</version>
        </dependency>
        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna-platform</artifactId>
            <version>5.13.0</version>
        </dependency>

        <dependency>
            <groupId>com.sshtools</groupId>
            <artifactId>forker-services</artifactId>
            <version>1.8-SNAPSHOT</version>
            <exclusions>
                <exclusion>
                    <groupId>com.github.hypfvieh</groupId>
                    <artifactId>dbus-java-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.github.hypfvieh</groupId>
                    <artifactId>dbus-java-transport-tcp</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.github.hypfvieh</groupId>
                    <artifactId>dbus-java-transport-native-unixsocket</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.github.hypfvieh</groupId>
                    <artifactId>
						dbus-java-transport-jnr-unixsocket
					</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>
    <repositories>
        <!-- For Forker -->
        <repository>
            <id>opensource-releases</id>
            <url>https://artifactory.jadaptive.com/opensource-releases</url>
            <releases />
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>opensource-snapshots</id>
            <url>https://artifactory.jadaptive.com/opensource-snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots />
        </repository>
    </repositories>


    <profiles>
        <profile>
            <id>jnaerate</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.nativelibs4java</groupId>
                        <artifactId>maven-jnaerator-plugin</artifactId>
                        <version>0.12</version>
                        <executions>
                            <execution>
                                <id>jnaerate</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>generate</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>native</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.graalvm.buildtools</groupId>
                        <artifactId>native-maven-plugin</artifactId>
                        <version>${native.maven.plugin.version}</version>
                        <extensions>true</extensions>
                        <executions>
                            <execution>
                                <id>build-native</id>
                                <goals>
                                    <goal>build</goal>
                                </goals>
                                <phase>package</phase>
                            </execution>
                            <execution>
                                <id>test-native</id>
                                <goals>
                                    <goal>test</goal>
                                </goals>
                                <phase>test</phase>
                            </execution>
                        </executions>
                        <configuration>
                            <imageName>${project.artifactId}</imageName>
                            <mainClass>com.logonbox.vpn.client.Main</mainClass>
                            <buildArgs>
                                <buildArg>--no-fallback</buildArg>
                                <buildArg>--report-unsupported-elements-at-runtime</buildArg>
                                <buildArg>--allow-incomplete-classpath</buildArg>
                            </buildArgs>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>native-network-configuration-service</id>
            <build>
                <plugins>
					<plugin>
		                <groupId>com.nervepoint</groupId>
		                <artifactId>google-translate-v2-java-maven-plugin</artifactId>
                        <configuration>
							<skip>true</skip>
						</configuration>
		            </plugin>
                    <plugin>
                        <groupId>org.graalvm.buildtools</groupId>
                        <artifactId>native-maven-plugin</artifactId>
                        <version>${native.maven.plugin.version}</version>
                        <extensions>true</extensions>
                        <executions>
                            <execution>
                                <id>build-native</id>
                                <goals>
                                    <goal>build</goal>
                                </goals>
                                <phase>package</phase>
                            </execution>
                        </executions>
                        <configuration>
                            <imageName>network-configuration-service</imageName>
                            <mainClass>com.logonbox.vpn.client.wireguard.windows.service.NetworkConfigurationService</mainClass>
                            <buildArgs>
                                <buildArg>--no-fallback</buildArg>
                                <buildArg>--report-unsupported-elements-at-runtime</buildArg>
                                <buildArg>--allow-incomplete-classpath</buildArg>
                            </buildArgs>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>


</project>