<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>org.ibissource</groupId>
	<artifactId>frank-doc</artifactId>
	<version>1.1</version>
	<packaging>jar</packaging>

	<name>Frank!Doc</name>
	<url>https://ibissource.org</url>
	<description>Frank!Doc</description>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<log4j2.version>2.17.1</log4j2.version>
		<argLine /> <!-- add empty default argLine so Surefire won't fail when JaCoCo isn't present -->
	</properties>

	<organization>
		<name>Ibissource.org</name>
		<url>https://ibissource.org</url>
	</organization>

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>manual</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Martijn Dirkse</name>
			<email>martijn@ibissource.org</email>
			<organization>WeAreFrank!</organization>
			<organizationUrl>https://wearefrank.nl</organizationUrl>
		</developer>
		<developer>
			<name>Niels Meijer</name>
			<email>niels@ibissource.org</email>
			<organization>Ibissource</organization>
			<organizationUrl>https://ibissource.org</organizationUrl>
		</developer>
		<developer>
			<name>Gerrit van Brakel</name>
			<email>gerrit@ibissource.org</email>
			<organization>Ibissource</organization>
			<organizationUrl>https://ibissource.org</organizationUrl>
		</developer>
	</developers>

	<build>
		<defaultGoal>install</defaultGoal>

		<testResources>
			<testResource>
				<directory>src/test/resources</directory>
				<filtering>false</filtering>
				<excludes>
					<exclude>build.properties</exclude>
				</excludes>
			</testResource>
			<testResource>
				<directory>src/test/resources</directory>
				<includes>
					<include>build.properties</include>
				</includes>
				<filtering>true</filtering>
			</testResource>
		</testResources>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<!-- This manifest makes the JAR file executable. When you use the JAR as executable,
						     you can use it to verify an XML file against an XSD file.
						     You can still use this JAR file as a doclet, because in a pom.xml file you
						     pass the class name of the doclet to javadoc.
						-->
					  	<manifest>
					  		<addClasspath>true</addClasspath>
					  		<mainClass>org.frankframework.frankdoc.cmd.XmlAgainstXsdValidator</mainClass>
					  	</manifest>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.glassfish.copyright</groupId>
				<artifactId>glassfish-copyright-maven-plugin</artifactId>
				<version>2.4</version>
				<executions>
					<execution>
						<?m2e ignore?> <!-- Eclipse doesn't seem to like this plugin, it doesn't need to be executed 
							by Eclipse so ignore it -->
						<id>Check-CopyRight-Notice</id>
						<goals>
							<goal>copyright</goal><!-- Checks for Copyright notices -->
							<goal>check</goal><!-- Fails the build -->
						</goals>
						<phase>process-sources</phase>
					</execution>
				</executions>
				<configuration>
					<excludeFile>${project.basedir}/copyrightExcludeFile.txt</excludeFile>
					<ignoreYear>true</ignoreYear>
					<useDash>true</useDash>
					<templateFile>${project.basedir}/copyrightTemplateFile.txt</templateFile>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.22.2</version>
				<configuration>
					<redirectTestOutputToFile>true</redirectTestOutputToFile>
					<reuseForks>true</reuseForks>
					<includes>
						<include>**/*.java</include>
					</includes>
					<argLine>@{argLine} -Dfile.encoding=UTF-8</argLine>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>2.7</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.3</version>
				<configuration>
					<tagNameFormat>v@{project.version}</tagNameFormat>
					<autoVersionSubmodules>true</autoVersionSubmodules>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>3.9.1</version>
			</plugin>
			<!-- http://maven.apache.org/plugins/maven-javadoc-plugin/usage.html Generate 
				Javadocs As Part Of Project Reports -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
			</plugin>
			<plugin>
				<artifactId>maven-shade-plugin</artifactId>
				<version>3.2.4</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<createDependencyReducedPom>false</createDependencyReducedPom>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>

		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.8.1</version>
					<configuration>
						<source>1.8</source>
						<target>1.8</target>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.2.0</version>
					<configuration>
						<archive>
							<addMavenDescriptor>true</addMavenDescriptor>
							<manifest>
								<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
								<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							</manifest>
						</archive>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.2.1</version>
					<executions>
						<execution>
							<id>attach-sources</id>
							<phase>prepare-package</phase>
							<goals>
								<goal>jar-no-fork</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.2.0</version>
					<configuration>
						<doclint>none</doclint>
						<useStandardDocletOptions>true</useStandardDocletOptions>
					</configuration>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<goals>
								<goal>jar</goal>
							</goals>
							<configuration>
								<failOnError>false</failOnError>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<configuration>
						<skip>true</skip>
						<skipDeploy>true</skipDeploy>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<dependencies>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
			<version>${log4j2.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.12.0</version>
		</dependency>
		<dependency>
			<groupId>org.jdom</groupId>
			<artifactId>jdom2</artifactId>
			<version>2.0.6.1</version>
		</dependency>
		<dependency>
			<groupId>org.glassfish</groupId>
			<artifactId>javax.json</artifactId>
			<version>1.0.4</version>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.13</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>1.18.22</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.sun</groupId>
			<artifactId>tools</artifactId>
			<version>1.8</version>
			<scope>provided</scope>
		</dependency>
	</dependencies>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-project-info-reports-plugin</artifactId>
				<version>3.1.0</version>
			</plugin>
		</plugins>
	</reporting>

	<scm>
		<url>https://github.com/ibissource/frank-doc</url>
		<connection>scm:git:https://github.com/ibissource/frank-doc.git</connection>
		<developerConnection>scm:git:https://github.com/ibissource/frank-doc.git</developerConnection>
		<tag>v1.1</tag>
	</scm>

	<profiles>
		<profile>
			<id>ibissource</id>
			<distributionManagement>
				<repository>
					<id>ibissource</id>
					<url>https://nexus.ibissource.org/content/repositories/releases</url>
				</repository>
				<snapshotRepository>
					<id>ibissource</id>
					<url>https://nexus.ibissource.org/content/repositories/snapshots</url>
				</snapshotRepository>
				<site>
					<id>www.ibissource.org</id>
					<url>file:target/site-deploy</url>
				</site>
			</distributionManagement>
			<repositories>
				<repository>
					<id>ibissource</id>
					<url>https://nexus.ibissource.org/content/groups/public</url>
				</repository>
			</repositories>
		</profile>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<configuration>
							<passphrase>${gpg.passphrase}</passphrase>
							<gpgArguments>
								<!-- This is necessary for gpg to not try to use the pinentry programs -->
								<arg>--batch</arg>
								<arg>--no-tty</arg>
								<arg>--pinentry-mode</arg>
								<arg>loopback</arg>
							</gpgArguments>
						</configuration>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.8</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>ossrh</id>
			<distributionManagement>
				<repository>
					<id>ossrh</id>
					<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
				</repository>
				<snapshotRepository>
					<id>ossrh</id>
					<url>https://oss.sonatype.org/content/repositories/snapshots</url>
				</snapshotRepository>
				<site>
					<id>www.ibissource.org</id>
					<url>file:target/site-deploy</url>
				</site>
			</distributionManagement>
		</profile>
		<profile>
			<id>codecoverage</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<version>0.8.6</version>
						<executions>
							<execution>
								<id>prepare-jacoco</id>
								<phase>initialize</phase>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
							<execution>
								<id>generate-jacoco-report</id>
								<phase>test</phase>
								<goals>
									<goal>report</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
