<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>io.github.jmtanguy</groupId>
		<artifactId>docking-frames-base</artifactId>
		<version>2.0.0</version>
	</parent>

	<artifactId>docking-frames-ext-glass</artifactId>
	<packaging>jar</packaging>

	<name>${project.artifactId}</name>
	<description>${project.name} is a "glass" theme extension</description>

	<!-- Inherit from parent but must be explicitly declared for Maven Central -->
	<url>http://www.docking-frames.org//</url>

	<licenses>
		<license>
			<name>GNU Lesser General Public License, version 2.1</name>
			<url>http://www.gnu.org/licenses/lgpl-2.1.html</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<scm>
		<url>https://github.com/jmtanguy/dockingframes-sunshine</url>
		<connection>scm:git:git://github.com/jmtanguy/dockingframes-sunshine.git</connection>
		<developerConnection>scm:git:git@github.com:jmtanguy/dockingframes-sunshine.git</developerConnection>
	</scm>

	<developers>
		<developer>
			<id>tanguy.studio@hotmail.com</id>
			<email>tanguy.studio@hotmail.com</email>
			<name>JM Tanguy</name>
			<roles>
				<role>maintainer</role>
			</roles>
		</developer>
	</developers>

	<repositories>
		<repository>
			<id>local-maven-repo</id>
			<url>file:///${project.basedir}/repo</url>
		</repository>
	</repositories>

	<build>
		<resources>
			<resource>
				<directory>src</directory>
				<includes>
					<include>glass/eclipse/theme/images/*.*</include>
				</includes>
			</resource>
		</resources>

		<plugins>
			<!-- Install glasslib.jar to local maven repo automatically -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-install-plugin</artifactId>
				<executions>
					<execution>
						<id>install-glasslib</id>
						<phase>validate</phase>
						<goals>
							<goal>install-file</goal>
						</goals>
						<configuration>
							<file>${project.basedir}/libs/glassLib/glasslib.jar</file>
							<groupId>kux</groupId>
							<artifactId>glasslib</artifactId>
							<version>1.0</version>
							<packaging>jar</packaging>
							<localRepositoryPath>${project.basedir}/repo</localRepositoryPath>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<dependencies>
		<dependency>
			<groupId>io.github.jmtanguy</groupId>
			<artifactId>docking-frames-common</artifactId>
			<version>${project.version}</version>
		</dependency>
		<!-- TODO ask Steffen Kux, software@kuxfamily.de to publish glasslib.jar 
			on maven -->
		<dependency>
			<groupId>kux</groupId>
			<artifactId>glasslib</artifactId>
			<version>1.0</version>
		</dependency>
	</dependencies>
	
	<profiles>
		<profile>
			<id>skipGlass</id>
			<activation>
				<property>
					<name>skipGlass</name>
					<value>true</value>
				</property>
			</activation>
			<properties>
				<maven.resources.skip>true</maven.resources.skip>
				<maven.main.skip>true</maven.main.skip>
				<maven.test.skip>true</maven.test.skip>
				<maven.install.skip>true</maven.install.skip>
				<maven.deploy.skip>true</maven.deploy.skip>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-jar-plugin</artifactId>
						<configuration>
							<skipIfEmpty>true</skipIfEmpty>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		
		<profile>
			<id>deployGlasslib</id>
			<activation>
				<property>
					<name>glasslibURL</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-deploy-plugin</artifactId>
						<executions>
							<execution>
								<id>deploy glasslib</id>
								<phase>deploy</phase>
								<goals>
									<goal>deploy-file</goal>
								</goals>
								<configuration>
									<url>${glasslibURL}</url>
									<file>${project.basedir}/libs/glassLib/glasslib.jar</file>
									<groupId>kux</groupId>
									<artifactId>glasslib</artifactId>
									<version>1.0</version>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
