<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>de.gerdi-project</groupId>
	<artifactId>GeRDI-harvester-utilities-archive</artifactId>
	<version>1.5.2</version>
	
	<packaging>pom</packaging>
	<name>Harvester Utilities Archive</name>
	<description>This project includes utilities that will be unpacked to a harvester project, but not committed to a repository.</description>
	<inceptionYear>2017</inceptionYear>
	<url>http://www.gerdi-project.de</url>
	
	<properties>
		<assembly.plugin.version>3.1.0</assembly.plugin.version>
		<gpg.plugin.version>1.6</gpg.plugin.version>
		<staging.plugin.version>1.6.7</staging.plugin.version>
	</properties>

	<licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>
	
	<build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
				<version>${assembly.plugin.version}</version>
                <executions>
                    <execution>
                        <id>make shared resources</id>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <phase>package</phase>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/assembly.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
	
	<profiles>
		<profile>
			<id>deployment</id>
			<activation>
				<property>
					<name>deploy</name>
				</property>
			</activation>
			<build>
				<plugins>
					<!-- Sign artifacts -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${gpg.plugin.version}</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<!-- Stage to maven central -->
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>${staging.plugin.version}</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	
	<developers>
		<developer>
			<name>Robin Weiss</name>
			<email>row@informatik.uni-kiel.de</email>
			<organization>Kiel University</organization>
			<organizationUrl>http://www.uni-kiel.de/index-e.shtml</organizationUrl>
		</developer>
	</developers>
  
    <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>

	<scm>
		<connection>scm:git:ssh://git@code.gerdi-project.de:7999/hl/harvesterutils.git</connection>
		<developerConnection>scm:git:ssh://git@code.gerdi-project.de:7999/hl/harvesterutils.git</developerConnection>
		<url>https://code.gerdi-project.de/scm/hl/harvesterutils.git</url>
		<tag>HEAD</tag>
	</scm>
  
	<!-- Define Sonatype repository for retrieving SNAPSHOT versions -->
	<repositories>
		<repository>
			<id>Sonatype</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
		</repository>
	</repositories>
</project>
