<?xml version="1.0" encoding="UTF-8"?>
<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>
	<groupId>org.corpus-tools</groupId>
	<artifactId>tiger2-api</artifactId>
	<version>0.0.7</version>
	<packaging>bundle</packaging>	
	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>
	<url>http://github.com/korpling/tiger2-api</url>
	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/korpling/tiger2-api/issues</url>
	</issueManagement>
	<properties>
		 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <bundle.file>${project.groupId}.${project.artifactId}_${project.version}.jar</bundle.file>
        <assembly.directory>${basedir}/src/main/assembly/</assembly.directory>
        <assembly.pepperBundle>${assembly.directory}assembly_pepperBundle.xml</assembly.pepperBundle>
        <license.file>${basedir}/LICENSE</license.file>
        <notice.file>${basedir}/NOTICE</notice.file>
        <emf.version>2.9.1-v20130827-0309</emf.version>
		<exec-maven-plugin.version>1.4.0</exec-maven-plugin.version>
		<maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
		<maven-source-plugin.version>2.4</maven-source-plugin.version>
		<maven-javadoc-plugin.version>2.10.1</maven-javadoc-plugin.version>
	</properties>
	<developers>
		<developer>
			<name>Florian Zipser</name>
			<email>saltnpepper@lists.hu-berlin.de</email>
			<organization>Humboldt-Universität zu Berlin</organization>
			<organizationUrl>https://www.hu-berlin.de</organizationUrl>
		</developer>
	</developers>
	<description>&lt;tiger2/&gt; is a standard conformant XML format modelled to express syntactic structures for a wide variety of theoretical formalisms and corpus architectures. http://korpling.german.hu-berlin.de/tiger2/ </description>
	<scm>
		<connection>scm:git:git://github.com/korpling/tiger2-api.git</connection>
		<developerConnection>scm:git:git@github.com:korpling/tiger2-api.git</developerConnection>
		<url>http://github.com/korpling/tiger2-api</url>
    <tag>tiger2-api-0.0.7</tag>
  </scm>
	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>
	<ciManagement>
		<system>Jenkins</system>
		<url>https://korpling.german.hu-berlin.de/jenkins/</url>
	</ciManagement>
	<repositories>
		<repository>
			<id>korpling</id>
			<name>korpling maven repo</name>
			<url>http://korpling.german.hu-berlin.de/maven2</url>
		</repository>
	</repositories>
	<dependencies>
		<dependency>
			<groupId>org.eclipse.emf</groupId>
			<artifactId>org.eclipse.emf.common</artifactId>
			<version>${emf.version}</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.emf</groupId>
			<artifactId>org.eclipse.emf.ecore</artifactId>
			<version>${emf.version}</version>
			<type>jar</type>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.emf</groupId>
			<artifactId>org.eclipse.emf.ecore.xmi</artifactId>
			<version>${emf.version}</version>
			<type>jar</type>
			<scope>compile</scope>
		</dependency>
        <!-- start: logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.6.4</version>
            <scope>compile</scope>
        </dependency>
        <!-- end: logging -->
        <!-- xml escaping unescaping  -->
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
            <scope>compile</scope>
        </dependency>
        <!-- comparing xml files -->
        <dependency>
            <groupId>xmlunit</groupId>
            <artifactId>xmlunit</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.10</version>
            <scope>test</scope>
        </dependency>
		
	</dependencies>
	<build>
		<plugins>
			<!-- start: Plugin for automatic releasing -->
			<plugin>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5</version>
				<configuration>
					<releaseProfiles>release</releaseProfiles>
					<goals>package assembly:single deploy</goals>
				</configuration>
			</plugin>
			<!-- end: Plugin for automatic releasing -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>
			<!-- start: assembly plugin -->
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <descriptors>
                        <descriptor>${assembly.pepperBundle}</descriptor>
                    </descriptors>
                    <appendAssemblyId>false</appendAssemblyId>
                    <finalName>${project.groupId}.${project.artifactId}_${project.version}</finalName>
                    <outputDirectory>target/distribution</outputDirectory>
                    <workDirectory>target/assembly/work</workDirectory>
                </configuration>
			</plugin>
			<!-- end: assembly plugin -->
			<!-- start: for generating license headers in source files. Run mvn license:format -->
			<plugin>
				<groupId>com.google.code.maven-license-plugin</groupId>
				<artifactId>maven-license-plugin</artifactId>
				<version>1.4.0</version>
				<configuration>
					<header>${basedir}/src/etc/header.txt</header>
					<includes>
						<include>src/main/java/**</include>
						<include>src/test/java/**</include>
					</includes>
				</configuration>
			</plugin>
			<!-- end: for generating license headers in source files. Run mvn license:format -->
			<!-- start: creates a NOTICE file use mvn notice:generate -->
			<plugin>
				<groupId>org.jasig.maven</groupId>
				<artifactId>maven-notice-plugin</artifactId>
				<version>1.0.4</version>
				<configuration>
					<noticeTemplate>./src/etc/NOTICE_template.txt</noticeTemplate>
				</configuration>
			</plugin>
			<!-- -->
			
			<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>1.5</version>
                <configuration>
                    <shadedArtifactAttached>true</shadedArtifactAttached>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>de.hu_berlin.german.korpling.tiger2.main.Tiger2Converter</mainClass>
                                </transformer>
                            </transformers>
                            <filters>
                                <filter>
                                    <artifact>*</artifact>
                                    <excludes>
                                        <exclude>META-INF/*.SF</exclude>
                                        <exclude>META-INF/*.RSA</exclude>
                                        <exclude>META-INF/*.INF</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
			
			<!-- end: creates a NOTICE file use mvn notice:generate -->
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>2.1.0</version>
				<extensions>true</extensions>
				<executions>
					<execution>
						<phase>process-classes</phase>
						<goals>
							<goal>manifest</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<manifestLocation>${basedir}/META-INF</manifestLocation>
					<source>1.6</source>
					<target>1.6</target>
					<instructions>
						<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
						<Bundle-Name>${project.name}</Bundle-Name>
						<Bundle-Version>${project.version}</Bundle-Version>
						<Bundle-ClassPath>.,{maven-dependencies}</Bundle-ClassPath>
						<Include-Resource>{maven-resources}, LICENSE, NOTICE</Include-Resource>
					</instructions>
				</configuration>
			</plugin>
		</plugins>
		<finalName>${project.groupId}.${project.artifactId}_${project.version}</finalName>
	</build>
	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<!-- generate a jar for sources -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>${maven-source-plugin.version}</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<phase>verify</phase>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<!-- Generates a Javadoc -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>${maven-javadoc-plugin.version}</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<!-- The Maven GPG plugin is used to sign the components -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${maven-gpg-plugin.version}</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	<name>${project.groupId}.${project.artifactId}</name>
</project>
