<?xml version="1.0" encoding="UTF-8"?>
<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>net.tlabs-data</groupId>
    <artifactId>tablesaw-parent</artifactId>
    <version>0.43.3</version>
    <name>Tablesaw</name>
    <description>High-performance Java Dataframe</description>
    <url>https://github.com/tlabs-data/tablesaw</url>
    <scm>
        <connection>scm:git:https://github.com/tlabs-data/tablesaw.git</connection>
        <developerConnection>scm:git:https://github.com/tlabs-data/tablesaw.git</developerConnection>
        <url>https://github.com/tlabs-data/tablesaw.git</url>
        <tag>v0.43.3</tag>
    </scm>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <packaging>pom</packaging>
    <developers>
        <developer>
            <name>Larry White</name>
            <email>ljw1001@gmail.com</email>
        </developer>
        <developer>
          <name>Tlabs-data</name>
          <email>contact@tlabs-data.net</email>
          <organization>Tlabs-data</organization>
          <organizationUrl>https://tlabs-data.net</organizationUrl>
        </developer>
    </developers>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jackson.version>2.18.2</jackson.version>
        <junit.jupiter.version>5.11.3</junit.jupiter.version>
        <!-- Sonar Cloud integration -->
        <sonar.projectKey>tlabs-data_tablesaw</sonar.projectKey>
        <sonar.organization>tlabs-data</sonar.organization>
        <sonar.host.url>https://sonarcloud.io</sonar.host.url>
        <sonar.moduleKey>${project.groupId}:${project.artifactId}</sonar.moduleKey>
    </properties>
    <distributionManagement>
      <snapshotRepository>
        <id>ossrh</id>
        <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
      </snapshotRepository>
    </distributionManagement>

    <modules>
        <module>core</module>
        <module>aggregate</module>
        <module>beakerx</module>
        <module>excel</module>
        <module>html</module>
        <module>json</module>
        <module>jsplot</module>
        <module>saw</module>
        <module>docs-src</module>
    </modules>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>release</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>versions-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.18.0</version>
                    <configuration>
						<ignoredVersions>(?i).*-(alpha|beta|m|rc)([-.]?\d+)?</ignoredVersions>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.11.2</version>
                    <configuration>
                        <source>1.8</source>
                        <detectOfflineLinks>false</detectOfflineLinks>
                        <failOnError>false</failOnError>
                        <quiet>true</quiet>
                        <additionalOptions>-Xdoclint:none</additionalOptions>
                        <additionalJOption>-Xdoclint:none</additionalJOption>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.3.1</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-surefire-plugin</artifactId>
                    <version>3.5.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>3.2.7</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>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>3.1.1</version>
                    <configuration>
                        <tagNameFormat>v@{project.version}</tagNameFormat>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <useReleaseProfile>false</useReleaseProfile>
                        <releaseProfiles>release</releaseProfiles>
                        <goals>deploy</goals>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.7.0</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>ossrh</serverId>
                        <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.13.0</version>
                    <executions>
                        <!-- Replacing default-compile as it is treated specially by maven -->
                        <execution>
                            <id>default-compile</id>
                            <phase>none</phase>
                        </execution>
                        <!-- Replacing default-testCompile as it is treated specially by maven -->
                        <execution>
                            <id>default-testCompile</id>
                            <phase>none</phase>
                        </execution>
                        <execution>
                            <id>java-compile</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>java-test-compile</id>
                            <phase>test-compile</phase>
                            <goals>
                                <goal>testCompile</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <release>8</release>
                        <source>8</source>
                        <target>8</target>
                        <compilerArgument>-Xlint:all</compilerArgument>
                    </configuration>
                </plugin>
                <plugin>
                  <groupId>org.sonarsource.scanner.maven</groupId>
                  <artifactId>sonar-maven-plugin</artifactId>
                  <version>3.11.0.3922</version>
                </plugin>
                <plugin>
	                <groupId>org.apache.maven.plugins</groupId>
	                <artifactId>maven-jar-plugin</artifactId>
	                <version>3.4.2</version>
                </plugin>
		      	<plugin>
		          	<groupId>org.apache.maven.plugins</groupId>
		          	<artifactId>maven-shade-plugin</artifactId>
		          	<version>3.1.0</version>
				</plugin>
				<plugin>
	                <groupId>org.codehaus.mojo</groupId>
	                <artifactId>exec-maven-plugin</artifactId>
	                <version>3.5.0</version>
	            </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <inherited>false</inherited>
                <configuration>
                    <reportOutputDirectory>docs</reportOutputDirectory>
                    <destDir>apidocs</destDir>
                </configuration>
                <executions>
                    <execution>
                        <id>aggregate</id>
                        <phase>site</phase>
                        <goals>
                            <goal>aggregate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.12</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <printSummary>false</printSummary>
                    <!-- Jacoco prepare-agent builds some command-line params without -->
                    <!-- which jacoco will not instrument. Hence it is important to add -->
                    <!-- those command-line params here (${argLine} holds those params) -->
                    <argLine>${argLine} -Xms256m -Xmx2048m -Duser.language=en-US -Duser.region=US</argLine>
                    <forkCount>1</forkCount>
                    <runOrder>random</runOrder>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.cosium.code</groupId>
                <artifactId>git-code-format-maven-plugin</artifactId>
                <version>4.3</version>
                <executions>
                    <!-- On commit, format the modified java files -->
                    <execution>
                        <id>install-formatter-hook</id>
                            <goals>
                                <goal>install-hooks</goal>
                            </goals>
                    </execution>
                </executions>
            </plugin>
	      <plugin>
	        <groupId>org.apache.maven.plugins</groupId>
	        <artifactId>maven-enforcer-plugin</artifactId>
	        <version>3.5.0</version>
	        <executions>
	          <execution>
	            <id>enforce-maven</id>
	            <goals>
	              <goal>enforce</goal>
	            </goals>
	            <configuration>
	              <rules>
	                <requireMavenVersion>
	                  <version>[3.6.3,)</version>
	                </requireMavenVersion>
	              </rules>    
	            </configuration>
	          </execution>
	        </executions>
	      </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-jsr310</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>2.0.16</version>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <version>${junit.jupiter.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-params</artifactId>
                <version>${junit.jupiter.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
</project>
