<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>com.darwinsys</groupId>
	<artifactId>darwinsys-api</artifactId>
	<version>1.7.2</version>

	<packaging>jar</packaging>
	<inceptionYear>1995</inceptionYear>

	<!-- The configured plugins let us do
	 mvn -Prelease test javadoc:jar # No point continuing until this works
	 mvn release:clean release:prepare
	 mvn -Prelease -DskipTests -Dmaven.test.skip release:perform
	 -->

	<name>DarwinSys API</name>
	<description>
		Ian Darwin's assorted Java stuff,
		assembled as an API.
	</description>
	<url>http://darwinsys.com/darwinsys-api/</url>
	<licenses>
		<license>
		<name>BSD 2-Clause "New" or "Revised" license</name>
		<url>http://opensource.org/licenses/BSD-2-Clause</url>
		<distribution>repo</distribution>
		</license>
	</licenses>
	<scm>
		<connection>scm:git:git@github.com:IanDarwin/darwinsys-api.git</connection>
		<developerConnection>scm:git:git@github.com:IanDarwin/darwinsys-api.git</developerConnection>
		<url>git@github.com:IanDarwin/darwinsys-api.git</url>
	  <tag>darwinsys-api-1.7.2</tag>
  </scm>
	<developers>
		<developer>
		<id>ian</id>
		<name>Ian Darwin</name>
		</developer>
	</developers>
	
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<javase.version>17</javase.version>
		<maven.compiler.source>${javase.version}</maven.compiler.source>
		<maven.compiler.target>${javase.version}</maven.compiler.target>
		<maven.compiler.testSource>${javase.version}</maven.compiler.testSource>
		<maven.compiler.testTarget>${javase.version}</maven.compiler.testTarget>
		<maven.findbugs.version>3.0.5</maven.findbugs.version>
		<javaee.version>8.0</javaee.version>
		<junit4.version>[4.13.1,)</junit4.version>
		<junit5.version>5.7.1</junit5.version>
	</properties>

	<dependencies>
<!--
		<dependency>
			<groupId>jakarta.mail</groupId>
			<artifactId>jakarta.mail-api</artifactId>
			<version>1.6.4</version>
			<scope>provided</scope>
		</dependency>
-->
		<dependency>
			<groupId>com.sun.mail</groupId>
			<artifactId>jakarta.mail</artifactId>
			<version>1.6.4</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>javax.persistence</groupId>
			<artifactId>javax.persistence-api</artifactId>
			<version>2.2</version>
<!--
			<groupId>jakarta.persistence</groupId>
			<artifactId>jakarta.persistence-api</artifactId>
			<version>2.2.3</version>
-->
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<version>${junit5.version}</version>
			<!-- Do not change this scope to test unless you exclude the testing/ directory -->
			<scope>compile</scope>
		</dependency>
		<!-- Backwards compat: IF you have a mix of JUnit 4 and 5 tests, you should add this: -->
		<dependency>
			<groupId>org.junit.vintage</groupId>
			<artifactId>junit-vintage-engine</artifactId>
			<version>${junit5.version}</version>
			<!-- Do not change this scope to test unless you exclude the testing/ directory -->
			<scope>compile</scope>
		</dependency>
	</dependencies>

	<build>
		<defaultGoal>install</defaultGoal>

		<plugins>

			<!-- Ensure that JUnit5 surefire test runner is used -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>3.0.0-M5</version>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.surefire</groupId>
						<artifactId>surefire-junit-platform</artifactId>
						<version>3.0.0-M5</version>
					</dependency>
				</dependencies>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>findbugs-maven-plugin</artifactId>
				<version>${maven.findbugs.version}</version>
				<configuration>
					<xmlOutput>false</xmlOutput>
					<!-- <excludeFilterFile>src/main/resources/MyFindBugsExcludes.xml</excludeFilterFile> -->
				</configuration>
			</plugin>
		</plugins>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>2.7</version>
				<configuration>
					<formats>
						<format>html</format>
						<format>xml</format>
					</formats>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>findbugs-maven-plugin</artifactId>
				<version>${maven.findbugs.version}</version>
			</plugin>
		</plugins>
	</reporting>

	<!-- The only profile we use is for releases. -->
		<profiles>
			<profile> 
			<id>release</id>
			<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>
			<build>
			<pluginManagement>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.2.0</version>
					</plugin>
				</plugins>
			</pluginManagement>
				<plugins>
					<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>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-release-plugin</artifactId>
						<version>2.5</version>
						<configuration>
							<autoVersionSubmodules>true</autoVersionSubmodules>
							<useReleaseProfile>false</useReleaseProfile>
							<releaseProfiles>release</releaseProfiles>
							<mavenExecutorId>forked-path</mavenExecutorId>
							<goals>deploy</goals>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.2.0</version>
						<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>
						<version>3.2.0</version>
						<configuration>
							<failOnError>false</failOnError>
							<show>protected</show>
							<use>false</use>
							<source>${javase.version}</source>
							<links>
								<link>http://docs.oracle.com/javase/11/docs/api/</link>
							</links>
						</configuration>
						<executions>
						<execution>
							<id>attach-javadocs</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
						</executions>
					</plugin>
					<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>
								<configuration>
									<keyname>${gpg.keyname}</keyname>
									<passphraseServerId>${gpg.keyname}</passphraseServerId>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
			</profile>
	</profiles>
</project>
