<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>21</version>
	</parent>

	<groupId>gov.nist.secauto.oscal</groupId>
	<artifactId>liboscal-java</artifactId>
	<version>1.0.4</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.4</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.8.0</dependency.metaschema-framework.version>
		<dependency.jetbrains-annotation.version>23.0.0</dependency.jetbrains-annotation.version>
		<dependency.jmock-junit5.version>2.12.0</dependency.jmock-junit5.version>
		<dependency.junit5.version>5.8.2</dependency.junit5.version>
		<dependency.junit5-platform-launcher.version>1.8.2</dependency.junit5-platform-launcher.version>
		<dependency.saxon.version>11.3</dependency.saxon.version>
		<dependency.xmlresolver.version>4.3.0</dependency.xmlresolver.version>

		<plugin.license.version>4.0.rc1</plugin.license.version>
		<cyclonedx.schema.version>1.3</cyclonedx.schema.version>
		<plugin.cyclonedx.version>2.7.0</plugin.cyclonedx.version>

		<oscal-content.commit>master</oscal-content.commit>
	</properties>

	<repositories>
		<repository>
			<name>Nexus Snapshots</name>
			<id>snapshots-repo</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
			<layout>default</layout>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
				<updatePolicy>daily</updatePolicy>
				<checksumPolicy>fail</checksumPolicy>
			</snapshots>
		</repository>
	</repositories>
	<pluginRepositories>
		<pluginRepository>
			<id>apache.snapshots</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</pluginRepository>
	</pluginRepositories>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.xmlresolver</groupId>
				<artifactId>xmlresolver</artifactId>
				<version>${dependency.xmlresolver.version}</version>
				<classifier>data</classifier>
				<exclusions>
					<exclusion>
						<!-- to avoid duplicate import of XML APIs -->
						<groupId>xml-apis</groupId>
						<artifactId>xml-apis</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.xmlresolver</groupId>
				<artifactId>xmlresolver</artifactId>
				<version>${dependency.xmlresolver.version}</version>
				<exclusions>
					<exclusion>
						<!-- to avoid duplicate import of XML APIs -->
						<groupId>xml-apis</groupId>
						<artifactId>xml-apis</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>gov.nist.secauto.metaschema</groupId>
			<artifactId>metaschema-java-binding</artifactId>
			<version>${dependency.metaschema-framework.version}</version>
		</dependency>

		<dependency>
			<groupId>org.jetbrains</groupId>
			<artifactId>annotations</artifactId>
			<version>${dependency.jetbrains-annotation.version}</version>
			<scope>provided</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>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-params</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jmock</groupId>
			<artifactId>jmock-junit5</artifactId>
			<version>${dependency.jmock-junit5.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jmock</groupId>
			<artifactId>jmock-imposters</artifactId>
			<version>${dependency.jmock-junit5.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<version>3.23.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.xmlunit</groupId>
			<artifactId>xmlunit-core</artifactId>
			<version>2.9.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.xmlunit</groupId>
			<artifactId>xmlunit-assertj3</artifactId>
			<version>2.9.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>net.sf.saxon</groupId>
			<artifactId>Saxon-HE</artifactId>
			<version>${dependency.saxon.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
			</resource>
			<resource>
				<directory>${project.build.directory}/generated-resources/oscal</directory>
				<includes>
					<include>**/*.xsd</include>
					<include>**/*.json</include>
				</includes>
			</resource>
		</resources>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>com.mycila</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<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>
					<configuration>
						<sourceDirectories>
							<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
							<sourceDirectory>${project.build.testSourceDirectory}</sourceDirectory>
						</sourceDirectories>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-pmd-plugin</artifactId>
					<configuration>
						<excludeRoots>
							<excludeRoot>target/generated-sources/metaschema</excludeRoot>
						</excludeRoots>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<configuration>
						<topSiteURL>${site.url}</topSiteURL>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.cyclonedx</groupId>
					<artifactId>cyclonedx-maven-plugin</artifactId>
					<version>${plugin.cyclonedx.version}</version>
					<configuration>
						<projectType>library</projectType>
						<schemaVersion>${cyclonedx.schema.version}</schemaVersion>
						<includeBomSerialNumber>true</includeBomSerialNumber>
						<includeCompileScope>true</includeCompileScope>
						<includeProvidedScope>false</includeProvidedScope>
						<includeRuntimeScope>false</includeRuntimeScope>
						<includeSystemScope>false</includeSystemScope>
						<includeTestScope>false</includeTestScope>
						<includeLicenseText>false</includeLicenseText>
						<outputFormat>all</outputFormat>
						<outputName>${project.artifactId}-${project.version}-cyclonedx</outputName>
					</configuration>
					<executions>
						<execution>
							<phase>package</phase>
							<goals>
								<goal>makeAggregateBom</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>io.github.git-commit-id</groupId>
				<artifactId>git-commit-id-maven-plugin</artifactId>
				<version>5.0.0</version>
				<configuration>
					<dotGitDirectory>${project.basedir}/oscal/.git</dotGitDirectory>
					<generateGitPropertiesFile>true</generateGitPropertiesFile>
					<generateGitPropertiesFilename>${project.build.directory}/oscal-git.properties</generateGitPropertiesFilename>
					<verbose>true</verbose>
					<useNativeGit>false</useNativeGit>
					<prefix>oscal-git</prefix>
				</configuration>
				<executions>
					<execution>
						<id>get-the-git-infos</id>
						<goals>
							<goal>revision</goal>
						</goals>
						<phase>initialize</phase>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-oscal-xml-schema</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/generated-resources/oscal/schema/xml</outputDirectory>
							<resources>
								<resource>
									<directory>${project.basedir}/oscal/xml/schema</directory>
								</resource>
							</resources>
						</configuration>
					</execution>
					<execution>
						<id>copy-oscal-json-schema</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/generated-resources/oscal/schema/json</outputDirectory>
							<resources>
								<resource>
									<directory>${project.basedir}/oscal/json/schema</directory>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>templating-maven-plugin</artifactId>
				<version>1.0.0</version>
				<executions>
					<execution>
						<id>filter-src</id>
						<goals>
							<goal>filter-sources</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>com.googlecode.maven-download-plugin</groupId>
				<artifactId>download-maven-plugin</artifactId>
				<version>1.6.8</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>
					<execution>
						<id>download-low-profile-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_LOW-baseline_profile.xml</uri>
							<outputDirectory>${project.build.directory}/download/content</outputDirectory>
						</configuration>
					</execution>
					<execution>
						<id>download-moderate-profile-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_MODERATE-baseline_profile.json</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.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>add-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>${project.build.directory}/generated-sources/metaschema</source>
							</sources>
						</configuration>
					</execution>
					<execution>
						<id>add-oscal-resources</id>
						<phase>process-resources</phase>
						<goals>
							<goal>add-resource</goal>
						</goals>
						<configuration>
							<resources>
								<resource>
									<directory>${project.build.directory}/generated-resources/oscal</directory>
									<includes>
										<include>**/*.xsd</include>
										<include>**/*.json</include>
									</includes>
								</resource>
							</resources>
						</configuration>
					</execution>
					<!-- <execution> <id>attach-artifacts</id> <phase>package</phase> <goals> 
						<goal>attach-artifact</goal> </goals> <configuration> <artifacts> <artifact> 
						<file>${project.build.directory}/</file> <type>xml</type> <classifier>optional</classifier> 
						</artifact> ... </artifacts> </configuration> </execution> -->
				</executions>
			</plugin>
		</plugins>
	</build>
	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.cyclonedx</groupId>
						<artifactId>cyclonedx-maven-plugin</artifactId>
					</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>
				</plugins>
			</reporting>
		</profile>
	</profiles>
</project>