<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.github.tommyettinger</groupId>
    <artifactId>regexodus</artifactId>
    <version>0.1.13</version>
    <packaging>jar</packaging>

    <name>RegExodus</name>
    <description>
        A modern fork of jregex meant to increase compatibility with Java variants like GWT.
    </description>
    <url>https://github.com/tommyettinger/RegExodus</url>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Nexus Release Repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.version>3.8.1</maven.compiler.version>
        <maven.javadoc.version>3.2.0</maven.javadoc.version>
        <maven.resources.version>3.2.0</maven.resources.version>
        <maven.source.version>3.2.1</maven.source.version>
        <maven.surefire.version>3.0.0-M5</maven.surefire.version>
        <maven.gpg.version>1.6</maven.gpg.version>
        <jdk.version>1.7</jdk.version>
        <junit.version>4.13.2</junit.version>
    </properties>

    <profiles>
        <profile>
            <id>doclint-java8-disable</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <doclint>none</doclint>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <!--
            To sign (only needed for Maven Central), add this argument to the mvn command line, just after mvn...
            -DperformRelease=true
            ...
            as in:
            mvn -DperformRelease=true clean deploy
            -->
            <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>${maven.gpg.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <licenses>
        <license>
            <name>BSD License</name>
            <url>https://raw.githubusercontent.com/tommyettinger/RegExodus/master/LICENSE</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>tommyettinger</id>
            <name>Tommy Ettinger</name>
            <email>tommy.ettinger@gmail.com</email>
            <url>https://github.com/tommyettinger/</url>
            <roles>
                <role>Maintainer</role>
                <role>Developer</role>
            </roles>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:tommyettinger/RegExodus.git</connection>
        <developerConnection>scm:git:git@github.com:tommyettinger/RegExodus.git</developerConnection>
        <url>git@github.com:tommyettinger/RegExodus.git</url>
    </scm>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <testSourceDirectory>src/test/java</testSourceDirectory>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
            </testResource>
        </testResources>
        <testOutputDirectory>target/test-classes</testOutputDirectory>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.version}</version>
                <configuration>
                    <source>${jdk.version}</source>
                    <target>${jdk.version}</target>
                    <excludes>
                        <exclude>**/emu/**</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
				<artifactId>maven-source-plugin</artifactId>
				<version>${maven.source.version}</version>
				<executions>
					<execution>
						<id>package-jars</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
							<!--<goal>test-jar</goal>-->
						</goals>
						<configuration>
							<includePom>true</includePom>
						</configuration>
					</execution>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
				</executions>
				<configuration>
					<includePom>true</includePom>
				</configuration>
			</plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.version}</version>
                <configuration>
                    <argLine>-Dfile.encoding=${project.build.sourceEncoding}</argLine>
                </configuration>
            </plugin>
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven.javadoc.version}</version>
				<inherited>true</inherited>
				<executions>
					<execution>
						<id>package-jars</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
						</configuration>
					</execution>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<debug>false</debug>
					<minmemory>256m</minmemory>
					<maxmemory>1024m</maxmemory>
					<quiet>true</quiet>
					<doctitle>${project.name} ${project.version}</doctitle>
					<windowtitle>${project.name} ${project.version}</windowtitle>
					<splitindex>true</splitindex>
					<encoding>${project.build.sourceEncoding}</encoding>
					<javadocVersion>${jdk.version}</javadocVersion>
                    <linksource>true</linksource>
                    <detectLinks>false</detectLinks>
                    <detectJavaApiLink>false</detectJavaApiLink>
                    <detectOfflineLinks>false</detectOfflineLinks>
                    <excludePackageNames>regexodus.emu.java.util.regex</excludePackageNames>
                    <javadocExecutable>${env.JAVA_HOME}/bin/javadoc</javadocExecutable>
				</configuration>
			</plugin>
        </plugins>
    </build>
</project>
