<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>es.e-ucm.asset</groupId>
	<artifactId>manager</artifactId>
	<version>0.3.0</version>
	<packaging>jar</packaging>

    <name>RAGE Asset Manager Java Implementation</name>
    <description>RAGE Asset Manager Java Implementation</description>
	<url>https://github.com/rageappliedgame/AssetManager-Java</url>
	
	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Ivan Martinez-Ortiz</name>
			<email>imartinezortiz@gmail.com</email>
			<organization>e-UCM</organization>
			<organizationUrl>https://www.e-ucm.es/</organizationUrl>
		</developer>
		<developer>
			<name>Wim van der Vegt</name>
			<email>wim@vander-vegt.nl</email>
			<organization>OUNL</organization>
			<organizationUrl>https://www.ou.nl/</organizationUrl>
		</developer>
	</developers>
  
	<scm>
		<connection>scm:git:github.com/rageappliedgame/AssetManager-Java.git</connection>
		<developerConnection>scm:git:ssh://github.com/rageappliedgame/AssetManager-Java.git</developerConnection>
		<url>https://github.com/rageappliedgame/AssetManager-Java/tree/master</url>
	</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>
  	
    <pluginRepositories>
        <pluginRepository>
            <id>nexus-oss-maven-plugin-snapshots</id>
            <name>Sonatype Nexus OSS maven plugin snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <layout>default</layout>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>
  
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
	</properties>

	<build>
		<finalName>java-assetManager</finalName>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.0.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>1.6</version>
				</plugin>
		    </plugins>	
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
	    </plugins>
	</build>
	<profiles>
		<profile>
			<id>ossrh</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<!-- Although there is a <homedir> parameter, seems that there is a problem
									signing the artifact in windows using a gpg cywin binary because the paths
									are messed up. -->
									<!-- mvn -P ossrh deploy -->
									<!-- Sample maven settings.xml file 
									<settings>
										<servers>
											<server>
												<id>ossrh</id>
												<username>USERNAME</username>
												<password>PASSWORD</password>
											</server>
											<server>
												<id>KEY_ID</id>
												<passphrase>GPG_PASSPHRASE</passphrase>
											</server>
										</servers>
										<profiles>
										  <profile>
										      <id>ossrh</id>
										      <properties>
										        <gpg.executable>gpg</gpg.executable>
										        <gpg.keyname>KEY_ID</gpg.keyname>
												<gpg.home>PATH_TO_FOLDER_CONTAINING_GPG_RINGS</gpg.home>
										      </properties>
										  	</profile>
										</profiles>
									</settings>
									-->
									<gpgArguments>
										<arg>--homedir=${gpg.home}</arg>
									</gpgArguments>
									<keyname>${gpg.keyname}</keyname>
									<passphraseServerId>${gpg.keyname}</passphraseServerId>
								</configuration>
							</execution>
						</executions>
					</plugin>		
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
