<!-- 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-cli</artifactId>
	<name>Hypersocket - Client (Command Line Version)</name>

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

	<build>
		<directory>target</directory>
		<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>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-cli-dependencies</id>
						<phase>package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<excludeScope>provided</excludeScope>
							<outputDirectory>${project.build.directory}/dependencies</outputDirectory>
							<overWriteReleases>false</overWriteReleases>
							<overWriteSnapshots>true</overWriteSnapshots>
							<overWriteIfNewer>true</overWriteIfNewer>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>com.logonbox</groupId>
			<artifactId>client-logonbox-vpn-common</artifactId>
			<version>${project.version}</version>
		</dependency>
        <dependency>
            <groupId>com.install4j</groupId>
            <artifactId>install4j-runtime</artifactId>
            <version>10.0.8</version>
            
            <!-- MUST be provided, the runtime is added by I4J itself -->
            <scope>provided</scope>
        </dependency>
	</dependencies>

	<repositories>
		<repository>
			<id>public-releases</id>
			<name>public-releases</name>
			<url>https://artifactory.jadaptive.com/public-releases</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<releases />
		</repository>
		<repository>
			<id>public-snapshots</id>
			<name>public-snapshots</name>
			<url>https://artifactory.jadaptive.com/public-snapshots</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots />
		</repository>
		<repository>
			<id>opensource-releases</id>
			<name>opensource-releases</name>
			<url>https://artifactory.jadaptive.com/opensource-releases</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<releases />
		</repository>
		<repository>
			<id>opensource-snapshots</id>
			<name>opensource-snapshots</name>
			<url>https://artifactory.jadaptive.com/opensource-snapshots</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots />
		</repository>
	</repositories>
	
	 <profiles>
        <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.cli.CLI</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>
