<!-- Copyright (c) 2018 BITPlan GmbH Project details and license at: https://github.com/BITPlan/com.bitplan.fritzbox -->
<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>com.bitplan.pom</groupId>
		<artifactId>com.bitplan.pom</artifactId>
		<version>0.0.11</version>
		<relativePath>../com.bitplan.pom/pom.xml</relativePath> 
	</parent>
	<groupId>com.bitplan</groupId>
	<artifactId>com.bitplan.fritzbox</artifactId>
	<packaging>jar</packaging>
	<name>BITPlan Java API for FritzBox HomeAutomation</name>
	<version>0.0.5</version>
	<description>Java API for AVM FritzBox Homeautomation</description>
	<url>https://github.com/BITPlan/com.bitplan.fritzbox</url>
	<properties>
		<!-- for parent pom to work -->
		<github.project>com.bitplan.fritzbox</github.project>
		<!-- for README.md generation -->
		<documentation.wiki>http://wiki.bitplan.com/index.php/Fritzbox-java-api</documentation.wiki>
		<!-- versions of other libraries to be used -->
	</properties>
	<dependencies>
		<!-- commons io -->
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
		</dependency>
		<!-- JUnit testing -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<!-- args4j command line utility -->
		<dependency>
			<groupId>args4j</groupId>
			<artifactId>args4j</artifactId>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
		</dependency>
		<!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
			<version>1.11</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.mockito/mockito-all -->
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<version>1.10.19</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<build>
	<plugins>
		<!-- jar creation -->
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-jar-plugin</artifactId>
			<version>${maven-jar-plugin.version}</version>
			<configuration>
				<archive>
					<manifest>
						<addClasspath>true</addClasspath>
						<mainClass>com.bitplan.fritzbox.CmdLine</mainClass>
					</manifest>
				</archive>
			</configuration>
		</plugin>
		<!-- executable jar with dependencies see http://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven 
			run with mvn clean compile assembly:single -->
		<plugin>
			<artifactId>maven-assembly-plugin</artifactId>
			<version>${maven-assembly-plugin.version}</version>
			<configuration>
				<archive>
					<manifest>
						<mainClass>com.bitplan.fritzbox.CmdLine</mainClass>
					</manifest>
				</archive>
				<descriptorRefs>
					<descriptorRef>jar-with-dependencies</descriptorRef>
				</descriptorRefs>
			</configuration>
			<executions>
				<execution>
					<id>make-assembly</id> <!-- this is used for inheritance merges -->
					<phase>package</phase> <!-- bind to the packaging phase -->
					<goals>
						<goal>single</goal>
					</goals>
				</execution>
			</executions>
		</plugin>
		<!-- Launch4 J plugin to create cross plattform java app -->
		<plugin>
			<groupId>com.akathist.maven.plugins.launch4j</groupId>
			<artifactId>launch4j-maven-plugin</artifactId>
			<version>${launch4j-maven-plugin.version}</version>
			<executions>
				<execution>
					<id>l4j-gui</id>
					<phase>package</phase>
					<goals>
						<goal>launch4j</goal>
					</goals>
					<configuration>
						<dontWrapJar>false</dontWrapJar>
						<headerType>console</headerType>
						<jar>target/com.bitplan.fritzbox-${project.version}-jar-with-dependencies.jar</jar>
						<outfile>${project.build.directory}/fritzbox.exe</outfile>
						<errTitle />
						<cmdLine />
						<chdir />
						<priority>normal</priority>
						<downloadUrl>http://java.com/download</downloadUrl>
						<supportUrl>http://wiki.bitplan.com/index.php/Fritzbox-java-api</supportUrl>
						<customProcName>false</customProcName>
						<stayAlive>false</stayAlive>
						<manifest />
						<icon />
						<jre>
							<path />
							<minVersion>1.8.0</minVersion>
							<maxVersion />
							<jdkPreference>preferJre</jdkPreference>
							<initialHeapSize>256</initialHeapSize>
							<maxHeapSize>3000</maxHeapSize>
						</jre>
						<!-- <splash> <file>${project.basedir}/src/main/build/Sunflower.bmp</file> 
							<waitForWindow>true</waitForWindow> <timeout>60</timeout> <timeoutErr>true</timeoutErr> 
							</splash> -->
						<versionInfo>
							<fileVersion>0.${project.version}</fileVersion>
							<txtFileVersion>${project.version}</txtFileVersion>
							<fileDescription>Fritzbox Java Api</fileDescription>
							<copyright>BITPlan GmbH</copyright>
							<productVersion>0.0.1.0</productVersion>
							<txtProductVersion>${project.version}</txtProductVersion>
							<productName>FritzBox Java API</productName>
							<companyName>BITPlan GmbH</companyName>
							<internalName>fritzbox</internalName>
							<originalFilename>fritzbox.exe</originalFilename>
						</versionInfo>
					</configuration>
				</execution>
			</executions>
		</plugin>
		<!-- http://kosalads.blogspot.de/2013/04/maven-copy-artifact-in-to-separate.html 
			https://stackoverflow.com/a/16862404/1497139 -->
		<plugin>
			<artifactId>maven-antrun-plugin</artifactId>
			<version>${maven-antrun-plugin.version}</version>
			<configuration>
				<tasks>
					<copy
						file="target/com.bitplan.fritzbox-${project.version}-jar-with-dependencies.jar"
						tofile="release/fritzbox.jar" />
					<copy file="target/fritzbox.exe" tofile="release/fritzbox.exe" />
				</tasks>
			</configuration>
			<executions>
				<execution>
					<phase>install</phase>
					<goals>
						<goal>run</goal>
					</goals>
				</execution>
			</executions>
		</plugin>
	</plugins>
	</build>
</project>
