<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">


	<!-- for releasing to Maven Central / OSS Sonatype -->
	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>9</version>
	</parent>


	<modelVersion>4.0.0</modelVersion>
	<groupId>org.rcsb</groupId>
	<artifactId>mmtf</artifactId>
	<packaging>pom</packaging>
	<version>1.0.10</version>
	<name>mmtf</name>
	<description>MMTF is a compressed, fast and useful format for serving macromolecular data.
    </description>
	<url>https://github.com/rcsb</url>
	<organization>
		<name>RCSB PDB</name>
		<url>http://www.rcsb.org/</url>
	</organization>
	<licenses>
		<license>
			<name>Apache 2.0</name>
			<url>https://www.apache.org/licenses/LICENSE-2.0</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<properties>
		<jdk.version>1.8</jdk.version>
		<maven.enforcer.jdk-version>1.8</maven.enforcer.jdk-version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.build.targetEncoding>UTF-8</project.build.targetEncoding>
		<maxmem>512M</maxmem>
		<slf4j.version>1.7.21</slf4j.version>
		<log4j.version>2.13.2</log4j.version>
	</properties>
	<scm>
		<connection>scm:git:git://github.com:rcsb/mmtf-java.git</connection>
		<developerConnection>scm:git:git@github.com:rcsb/mmtf-java.git</developerConnection>
		<url>https://github.com/rcsb/mmtf-java</url>

		<tag>mmtf-1.0.10</tag>
	</scm>
	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-enforcer-plugin</artifactId>
										<versionRange>[1.0.0,)</versionRange>
										<goals>
											<goal>enforce</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-clean-plugin</artifactId>
					<version>3.0.0</version>
				</plugin>
				<plugin>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.5.1</version>
					<configuration>
						<source>${jdk.version}</source>
						<target>${jdk.version}</target>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>2.10</version>
				</plugin>
				<plugin>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.0.2</version>
				</plugin>
				<plugin>
					<artifactId>maven-scm-plugin</artifactId>
					<version>1.9.5</version>
				</plugin>
				<plugin>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.0.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-failsafe-plugin</artifactId>
					<version>2.19.1</version>
				</plugin>
				<plugin>
					<groupId>net.sf</groupId>
					<artifactId>stat-scm</artifactId>
					<version>1.2.0</version>
				</plugin>
				<plugin>
					<groupId>org.jvnet.jaxb2.maven2</groupId>
					<artifactId>maven-jaxb2-plugin</artifactId>
					<version>0.13.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.5.3</version>
					<configuration>
						<remoteTagging>true</remoteTagging>
						<preparationGoals>clean install</preparationGoals>
						<autoVersionSubmodules>true</autoVersionSubmodules>
						<!-- work around for GPG hanging issue http://jira.codehaus.org/browse/MGPG-9 -->
						<mavenExecutorId>forked-path</mavenExecutorId>
					</configuration>

				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.1.1</version>
					<configuration>
						<maxmemory>256m</maxmemory>
					</configuration>

				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-shade-plugin</artifactId>
					<version>2.4.3</version>
				</plugin>
				<plugin>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>2.6</version>
					<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>
						</execution>
					</executions>

				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>findbugs-maven-plugin</artifactId>
					<version>3.0.4</version>
				</plugin>

				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>buildnumber-maven-plugin</artifactId>
					<version>1.4</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-checkstyle-plugin</artifactId>
					<version>2.17</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>3.0.1</version>
				</plugin>

				<plugin>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>1.4.1</version>
					<executions>
						<execution>
							<id>enforce-java</id>
							<goals>
								<goal>enforce</goal>
							</goals>
							<configuration>
								<rules>
									<requireJavaVersion>
										<version>${maven.enforcer.jdk-version}</version>
									</requireJavaVersion>
								</rules>
							</configuration>
						</execution>
					</executions>
				</plugin>

			</plugins>
		</pluginManagement>


		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>2.7</version>
				<configuration>
					<format>xml</format>
					<maxmem>256m</maxmem>
					<!-- aggregated reports for multi-module projects -->
					<aggregate>true</aggregate>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.eluder.coveralls</groupId>
				<artifactId>coveralls-maven-plugin</artifactId>
				<version>4.2.0</version>
			</plugin>
			<!-- for deployment on OSS Sonatype -->
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.7</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>

			<!-- for digital signing of code -->
			<!--<plugin> -->
			<!--<groupId>org.apache.maven.plugins</groupId> -->
			<!--<artifactId>maven-gpg-plugin</artifactId> -->
			<!--<version>1.5</version> -->
			<!--<executions> -->
			<!--<execution> -->
			<!--<id>sign-artifacts</id> -->
			<!--<phase>verify</phase> -->
			<!--<goals> -->
			<!--<goal>sign</goal> -->
			<!--</goals> -->
			<!--</execution> -->
			<!--</executions> -->
			<!--</plugin> -->

			<!-- give more memory for junit tests -->
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.19.1</version>
				<configuration>
					<argLine>-Xmx1800M</argLine>
					<reuseForks>false</reuseForks>
					<forkCount>1</forkCount>
				</configuration>
			</plugin>


			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>

				<configuration>
					<archive>
						<addMavenDescriptor>false</addMavenDescriptor>
						<manifest>
							<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>

						</manifest>
						<manifestEntries>
							<Trusted-Library>true</Trusted-Library>
							<Permissions>all-permissions</Permissions>
							<Codebase>*</Codebase>
							<Application-Name>MMTF</Application-Name>
						</manifestEntries>
					</archive>
				</configuration>

			</plugin>


			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>findbugs-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<configuration>
					<!-- <enableFilesSummary>true</enableFilesSummary> <enableSeveritySummary>true</enableSeveritySummary> -->
					<enableRulesSummary>false</enableRulesSummary>
					<!-- <consoleOutput>true</consoleOutput> -->
				</configuration>
			</plugin>

		</plugins>

		<extensions>
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-ssh</artifactId>
				<version>2.6</version>
			</extension>
		</extensions>
	</build>
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>uk.co.jemos.podam</groupId>
				<artifactId>podam</artifactId>
				<version>2.3.5.RELEASE</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.unitils</groupId>
				<artifactId>unitils-core</artifactId>
				<version>3.4.2</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.13.1</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>commons-beanutils</groupId>
				<artifactId>commons-beanutils</artifactId>
				<version>1.9.4</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<!-- binding for log4j 2 -->
			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-slf4j-impl</artifactId>
				<version>${log4j.version}</version>
				<!-- runtime scope includes the test scope as well -->
				<scope>runtime</scope>
			</dependency>
			<!-- Log4j API and Core implementation required for binding -->
			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-api</artifactId>
				<version>${log4j.version}</version>
				<!-- runtime scope includes the test scope as well -->
				<scope>runtime</scope>
			</dependency>
			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-core</artifactId>
				<version>${log4j.version}</version>
				<!-- runtime scope includes the test scope as well -->
				<scope>runtime</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.1.1</version>
				<configuration>
					<doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
					<docletArtifact>
						<groupId>org.umlgraph</groupId>
						<artifactId>umlgraph</artifactId>
						<version>5.6</version>
					</docletArtifact>
					<additionalparam>-views -all</additionalparam>
					<useStandardDocletOptions>true</useStandardDocletOptions>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>findbugs-maven-plugin</artifactId>
				<version>3.0.4</version>
			</plugin>
		</plugins>
	</reporting>
	<profiles>

		<!-- Note: before you can use this build profile you need to set up an 
			environment that contains correctly signed keys. Configure the keystore properties 
			and the profile in ~/.m2/settings.xml -->
		<profile>
			<id>codesigning</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-jarsigner-plugin</artifactId>
						<version>1.4</version>
						<executions>
							<execution>
								<id>sign</id>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>

						<configuration>

							<verbose>true</verbose>
							<certs>true</certs>
							<storetype>${keystore.type}</storetype>
							<keystore>${keystore.path}</keystore>
							<alias>${keystore.alias}</alias>
							<storepass>${keystore.store.password}</storepass>
							<keypass>${keystore.key.password}</keypass>
							<signedjar>${project.build.directory}/${project.build.finalName}.jar</signedjar>
							<verify>true</verify>
							<verbose>true</verbose>
							<goal>sign</goal>
							<arguments>
								<argument>-tsa</argument>
								<argument>https://timestamp.geotrust.com/tsa</argument>
							</arguments>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<modules>
		<module>mmtf-serialization</module>
		<module>mmtf-api</module>
		<module>mmtf-codec</module>
	</modules>
	<inceptionYear>2015</inceptionYear>
	<issueManagement>
		<system>Github</system>
		<url>https://github.com/rcsb/mmtf-java/issues</url>
	</issueManagement>
	<ciManagement>
		<system>Travis</system>
		<url>https://travis-ci.org/</url>
	</ciManagement>
</project>
