<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>gov.nist.secauto</groupId>
		<artifactId>oss-parent</artifactId>
		<version>19</version>
	</parent>

	<groupId>gov.nist.secauto.oscal</groupId>
	<artifactId>liboscal-java</artifactId>
	<version>1.0.0</version>
	<packaging>jar</packaging>

	<name>OSCAL Java Library</name>
	<description>A Java library that parses XML, JSON, and YAML data formatted acording to a Metaschema-based model.</description>
	<url>https://github.com/usnistgov/liboscal-java</url>

	<issueManagement>
		<system>GitHub Issues</system>
		<url>https://github.com/usnistgov/liboscal-java/issues</url>
	</issueManagement>

	<scm>
		<url>https://github.com/usnistgov/liboscal-java</url>
		<connection>scm:git:git@github.com:usnistgov/liboscal-java.git</connection>
		<developerConnection>scm:git:git@github.com:usnistgov/liboscal-java.git</developerConnection>
		<tag>v1.0.0</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>
		<site>
			<id>nist-pages</id>
			<url>${site.url}</url>
		</site>
	</distributionManagement>

	<licenses>
		<license>
			<name>NIST License</name>
			<url>https://www.nist.gov/director/licensing</url>
			<distribution>repo</distribution>
			<comments>NIST software License</comments>
		</license>
	</licenses>

	<organization>
		<name>National Institute of Standards and Technology</name>
		<url>https://www.nist.gov</url>
	</organization>

	<developers>
		<developer>
			<id>david.waltermire@nist.gov</id>
			<name>David Waltermire</name>
			<email>david.waltermire@nist.gov</email>
			<organization>National Institute of Standards and Technology</organization>
			<roles>
				<role>architect</role>
				<role>developer</role>
				<role>maintainer</role>
			</roles>
		</developer>
	</developers>

	<mailingLists>
		<mailingList>
			<name>OSCAL NIST Team</name>
			<post>oscal@nist.gov</post>
		</mailingList>
		<mailingList>
			<name>OSCAL Project Development Discussion</name>
			<post>oscal-dev@nist.gov</post>
			<subscribe>oscal-dev-join@nist.gov</subscribe>
			<unsubscribe>oscal-dev-leave@nist.gov</unsubscribe>
		</mailingList>
		<mailingList>
			<name>OSCAL Project Updates</name>
			<subscribe>oscal-updates-join@nist.gov</subscribe>
			<unsubscribe>oscal-updates-leave@nist.gov</unsubscribe>
		</mailingList>
	</mailingLists>

	<properties>
		<!-- site configuration -->
		<site.url>https://pages.nist.gov/liboscal-java/</site.url>
		<scm.url>https://github.com/usnistgov/liboscal-java</scm.url>
		<issueManagement.url>https://github.com/usnistgov/liboscal-java/issues</issueManagement.url>
		<!-- ================================================================================ -->
		<!-- Web dependencies version -->
		<!-- ================================================================================ -->
		<anchorJsVesrion>3.2.2</anchorJsVesrion>
		<bootstrapVersion>4.4.1</bootstrapVersion>
		<bootswatchVersion>4.4.1</bootswatchVersion>
		<highlightJsVersion>9.15.7</highlightJsVersion>
		<highlightJsTheme>github</highlightJsTheme>
		<jqueryVersion>3.4.1</jqueryVersion>
		<fontawesomeVersion>5.12.1</fontawesomeVersion>
		<popperVersion>1.16.0</popperVersion>

		<maven.compiler.source>11</maven.compiler.source>
		<maven.compiler.target>11</maven.compiler.target>
		<maven.compiler.release>11</maven.compiler.release>

		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<dependency.metaschema-framework.version>0.5.0</dependency.metaschema-framework.version>
		<dependency.jackson.version>2.12.1</dependency.jackson.version>

    <plugin.license.version>4.0.rc1</plugin.license.version>

		<oscal-content.commit>master</oscal-content.commit>
	</properties>

	<dependencies>
		<dependency>
			<groupId>gov.nist.secauto.metaschema</groupId>
			<artifactId>metaschema-java-binding</artifactId>
			<version>${dependency.metaschema-framework.version}</version>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.dataformat</groupId>
			<artifactId>jackson-dataformat-xml</artifactId>
			<version>${dependency.jackson.version}</version>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-api</artifactId>
			<scope>test</scope>
		</dependency>
		<!-- <dependency> -->
		<!-- <groupId>org.junit.jupiter</groupId> -->
		<!-- <artifactId>junit-jupiter-api</artifactId> -->
		<!-- <scope>test</scope> -->
		<!-- </dependency> -->
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>3.1.2</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.2.0</version>
					<configuration>
						<!-- this is a hack to fix a javadoc bug -->
						<detectJavaApiLink>false</detectJavaApiLink>
					</configuration>
				</plugin>
				<plugin>
					<groupId>com.mycila</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>${plugin.license.version}</version>
					<configuration>
						<licenseSets>
							<licenseSet>
								<header>license/nist/license.txt</header>
								<includes>
									<include>src/**/*.java</include>
								</includes>
							</licenseSet>
						</licenseSets>
						<failIfMissing>true</failIfMissing>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-checkstyle-plugin</artifactId>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<configuration>
						<topSiteURL>${site.url}</topSiteURL>
					</configuration>
				</plugin>

			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>com.googlecode.maven-download-plugin</groupId>
				<artifactId>download-maven-plugin</artifactId>
				<version>1.4.2</version>
				<configuration>
					<skipCache>true</skipCache>
					<overwrite>false</overwrite>
				</configuration>
				<executions>
					<execution>
						<id>download-catalog-xml</id>
						<phase>generate-test-resources</phase>
						<goals>
							<goal>wget</goal>
						</goals>
						<configuration>
							<uri>https://raw.githubusercontent.com/usnistgov/oscal-content/${oscal-content.commit}/nist.gov/SP800-53/rev5/xml/NIST_SP-800-53_rev5_catalog.xml</uri>
							<outputDirectory>${project.build.directory}/download/content</outputDirectory>
						</configuration>
					</execution>
					<execution>
						<id>download-catalog-json</id>
						<phase>generate-test-resources</phase>
						<goals>
							<goal>wget</goal>
						</goals>
						<configuration>
							<uri>https://raw.githubusercontent.com/usnistgov/oscal-content/${oscal-content.commit}/nist.gov/SP800-53/rev5/json/NIST_SP-800-53_rev5_catalog.json</uri>
							<outputDirectory>${project.build.directory}/download/content</outputDirectory>
						</configuration>
					</execution>
					<execution>
						<id>download-catalog-yaml</id>
						<phase>generate-test-resources</phase>
						<goals>
							<goal>wget</goal>
						</goals>
						<configuration>
							<uri>https://raw.githubusercontent.com/usnistgov/oscal-content/${oscal-content.commit}/nist.gov/SP800-53/rev5/yaml/NIST_SP-800-53_rev5_catalog.yaml</uri>
							<outputDirectory>${project.build.directory}/download/content</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>gov.nist.secauto.metaschema</groupId>
				<artifactId>metaschema-maven-plugin</artifactId>
				<version>${dependency.metaschema-framework.version}</version>
				<executions>
					<execution>
						<id>generate-model-sources</id>
						<goals>
							<goal>generate-sources</goal>
						</goals>
						<configuration>
							<metaschemaDir>${project.basedir}/oscal/src/metaschema</metaschemaDir>
							<configs>
								<config>${project.basedir}/src/main/metaschema-bindings/oscal-metaschema-bindings.xml</config>
							</configs>
							<includes>
								<include>oscal_complete_metaschema.xml</include>
							</includes>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<inherited>false</inherited>
				<executions>
					<execution>
						<id>attach-descriptor</id>
						<goals>
							<goal>attach-descriptor</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-enforcer-plugin</artifactId>
						<executions>
							<execution>
								<id>enforce-java</id>
								<phase>validate</phase>
								<goals>
									<goal>enforce</goal>
								</goals>
								<configuration>
									<fail>true</fail>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>reporting</id>
			<reporting>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-project-info-reports-plugin</artifactId>
						<reportSets>
							<reportSet>
								<reports>
									<report>summary</report>
									<report>licenses</report>
									<report>modules</report>
									<report>team</report>
									<report>mailing-lists</report>
									<report>scm</report>
									<report>issue-management</report>
									<report>dependencies</report>
									<report>dependency-info</report>
									<report>dependency-convergence</report>
									<report>dependency-management</report>
									<report>plugins</report>
								</reports>
							</reportSet>
						</reportSets>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-jxr-plugin</artifactId>
						<version>${version.plugin.jxr}</version>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-pmd-plugin</artifactId>
						<version>${version.plugin.pmd}</version>
					</plugin>
				</plugins>
			</reporting>
		</profile>
		<profile>
			<id>gpg</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${version.plugin.gpg}</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<skip>false</skip>
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>