<?xml version="1.0"?>
<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>
		<artifactId>biojava</artifactId>
		<groupId>org.biojava</groupId>
		<version>4.2.1-SNAPSHOT</version>
	</parent>

	<artifactId>biojava-protein-comparison-tool</artifactId>
	<packaging>jar</packaging>
	<name>biojava-protein-comparison-tool</name>
	<url>http://source.rcsb.org</url>
	<licenses>
		<license>
			<name>GNU LGPL v2</name>
			<url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.build.targetEncoding>UTF-8</project.build.targetEncoding>
		<maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format>
		<timestamp>${maven.build.timestamp}</timestamp>
	</properties>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>

			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.biojava</groupId>
			<artifactId>biojava-alignment</artifactId>
			<version>4.2.1-SNAPSHOT</version>

		</dependency>
		<dependency>
			<groupId>org.biojava</groupId>
			<artifactId>biojava-core</artifactId>
			<version>4.2.1-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>org.biojava</groupId>
			<artifactId>biojava-structure</artifactId>
			<version>4.2.1-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>org.biojava</groupId>
			<artifactId>biojava-structure-gui</artifactId>
			<version>4.2.1-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>net.sourceforge.jmol</groupId>
			<artifactId>jmol</artifactId>
			<version>13.0.14</version>
		</dependency>
		<!-- logging dependencies (managed by parent pom, don't set versions or scopes here) -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<!-- binding for log4j2, scope=runTime set in parent pom -->
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-slf4j-impl</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
		</dependency>
	</dependencies>

	<build>
		<plugins>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<!-- Minimizing removes jmol and log4j -->
							<minimizeJar>false</minimizeJar>
							<artifactSet>
								<excludes>
									<exclude>junit:junit</exclude>
								</excludes>
							</artifactSet>
							<filters>
								<filter>
									<artifact>net.sourceforge.jmol:jmol</artifact>
									<excludes>
										<exclude>javax/vecmath/**</exclude>
									</excludes>
								</filter>
								<filter>
									<artifact>org.biojava:biojava-structure</artifact>
									<excludes>
										<exclude>demo/DemoFATCAT*</exclude>
										<exclude>demo/DemoCE*</exclude>
									</excludes>
								</filter>
								<filter>
									<!-- Exclude signature files -->
									<artifact>*:*</artifact>
									<excludes>
										<exclude>META-INF/*.SF</exclude>
										<exclude>META-INF/*.DSA</exclude>
										<exclude>META-INF/*.RSA</exclude>
									</excludes>
								</filter>
							</filters>
							<transformers>
								<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
									<manifestEntries>
										<Specification-Vendor>Open Bioinformatics Foundation</Specification-Vendor>
										<Implementation-Vendor>Open Bioinformatics Foundation</Implementation-Vendor>
										<Specification-Version>${project.version}</Specification-Version>
										<Implementation-Version>${project.version}</Implementation-Version>
										<Specification-Title>${project.name}</Specification-Title>
										<Implementation-Title>${project.name}</Implementation-Title>
										<Main-Class>org.biojava.nbio.structure.align.gui.AlignmentGui</Main-Class>
										<Implementation-Build>${buildNumber}</Implementation-Build>
									</manifestEntries>
								</transformer>
								<!-- This bit merges the various META-INF/services files -->
								<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
							</transformers>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<descriptors>
						<descriptor>src/main/assembly/assembly.xml</descriptor>
					</descriptors>
				</configuration>

				<!-- Attach the creation of the assembly to the package phase. -->
				<executions>
					<execution>
						<id>assemble</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<finalName>${project.artifactId}-${project.version}</finalName>
							<appendAssemblyId>false</appendAssemblyId>
						</configuration>
					</execution>
				</executions>

			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>buildnumber-maven-plugin</artifactId>
				<executions>
					<execution>
						<phase>validate</phase>
						<goals>
							<goal>create</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<doCheck>false</doCheck>
					<doUpdate>false</doUpdate>
				</configuration>
			</plugin>
		</plugins>
	</build>

</project>
