<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>no.uib.thermo-raw-file-parser-gui</groupId>
    <artifactId>ThermoRawFileParserGUI</artifactId>
    <packaging>jar</packaging>
    <version>1.4.1</version>
    <name>ThermoRawFileParserGUI</name>
    <url>https://github.com/compomics/ThermoRawFileParserGUI</url>
    <description>Graphical user interface for the ThermoRawFileParser</description>

    <!-- Licence -->
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>

    <!-- Developers -->
    <developers>
        <developer>
            <name>Harald Barsnes</name>
            <id>harald</id>
            <email>harald.barsnes AT uib.no</email>
            <organization>University of Bergen, Norway</organization>
            <roles>
                <role>Java Developer</role>
            </roles>
        </developer>
    </developers>


    <!-- Build -->
    <build>
        
        <!-- Copy the resources required during building -->
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>thermo-raw-file-parser-gui.properties</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <excludes>
                    <exclude>thermo-raw-file-parser-gui.properties</exclude>
                </excludes>
            </resource>
        </resources>
        
        
        <!-- Extensions -->
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh</artifactId>
                <version>1.0-beta-2</version>
            </extension>
        </extensions>


        <!-- Plugins -->
        <plugins>
            
            <!-- Compiler plugin -->
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <showDeprecation>true</showDeprecation>
                    <debug>true</debug>
                </configuration>
            </plugin>

            <!-- Jar plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            <mainClass>no.uib.raw_file_parser_gui.ThermoRawFileParserGUI</mainClass>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>lib</classpathPrefix>
                        </manifest>
                    </archive>
                    <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}
                    </outputDirectory>
                </configuration>
            </plugin>

            <!-- Dependency plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}/lib
                            </outputDirectory>
                            <overWriteReleases>true</overWriteReleases>
                            <overWriteSnapshots>true</overWriteSnapshots>
                            <excludeTransitive>false</excludeTransitive>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Resources plugin -->
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.3</version>
                <executions>
                    <!-- Copy main resources to test resources before testing.  -->
                    <execution>
                        <id>copy-test-resources</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <overwrite>true</overwrite>
                            <outputDirectory>src/test/resources</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/resources</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>

                    <!-- Copy the resources -->
                    <execution>
                        <id>copy-package-resources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}/
                            </outputDirectory>
                            <resources>
                                <resource>
                                    <directory>./</directory>
                                    <includes>
                                        <include>resources/</include>
                                        <include>README.txt</include>
                                    </includes>
                                    <excludes>
                                    </excludes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Create javadoc on build -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <configuration>
                    <source>1.8</source>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Pack sources on build -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Assembly plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.2</version> <!-- do not change this version! as this will either ruin the exclusion or the setting of the permission... -->
                <configuration>
                    <descriptors>
                        <descriptor>src/main/assembly/zip.xml</descriptor>
                    </descriptors>
                    <appendAssemblyId>false</appendAssemblyId>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <!-- this is used for inheritance merges -->
                        <phase>package</phase>
                        <!-- append to the packaging phase. -->
                        <goals>
                            <goal>single</goal>
                            <!-- goals == mojos -->
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>


    <!-- Repositores -->
    <repositories>

        <!-- UGent Genesis Maven 2 repository -->
        <repository>
            <id>genesis-maven2-repository</id>
            <name>Genesis maven2 repository</name>
            <url>http://genesis.UGent.be/maven2</url>
            <layout>default</layout>
        </repository>

    </repositories>


    <!-- Dependencies -->
    <dependencies>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
        
        <dependency>
            <groupId>org.swinglabs</groupId>
            <artifactId>swing-layout</artifactId>
            <version>1.0.3</version>
        </dependency>

        <!-- used for adding desktop shortcuts -->
        <dependency>
            <groupId>net.jimmc</groupId>
            <artifactId>jshortcut</artifactId>
            <version>0.4-oberzalek</version>
            <type>jar</type>
        </dependency>
        
    </dependencies>


    <!-- The deployment maven repository-->
    <distributionManagement>
        
        <!-- UGent Genesis archiva repository -->
        <repository>
            <id>archiva.compomics_maven_2</id>
            <name>Internal Release Repository</name>
            <url>http://genesis.ugent.be/maven2</url>
        </repository>
         
        <!-- UGent Genesis archiva snapshot repository -->
        <snapshotRepository>
            <id>archiva.snapshots</id>
            <name>Internal Snapshot Repository</name>
            <url>http://genesis.ugent.be/archiva/repository/snapshots</url>
        </snapshotRepository>
        
    </distributionManagement>

</project>
