<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.openrefine</groupId>
  <artifactId>openrefine</artifactId>
  <packaging>pom</packaging>
  <version>3.6.1</version>

  <name>OpenRefine</name>
  <description>OpenRefine is a free, open source power tool for working with messy data and improving it</description>
  <url>http://openrefine.org/</url>
  <inceptionYear>2010</inceptionYear>
  <organization>
    <name>Code for Science &amp; Society Inc.</name>
    <url>https://codeforscience.org/</url>
  </organization>
  <licenses>
    <license>
      <name>BSD-3-Clause</name>
      <url>https://raw.githubusercontent.com/OpenRefine/OpenRefine/master/LICENSE.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <mailingLists>
    <mailingList>
      <name>Dev</name>
        <post>openrefine-dev@googlegroups.com</post>
        <archive>https://groups.google.com/group/openrefine-dev/</archive>
     </mailingList>
     <mailingList>
       <name>Users</name>
       <post>openrefine@googlegroups.com</post>
       <archive>https://groups.google.com/group/openrefine/</archive>
     </mailingList>
  </mailingLists>
  <scm>
      <connection>scm:git:git://github.com//OpenRefine/OpenRefine.git</connection>
      <developerConnection>scm:git:https://github.com/OpenRefine/OpenRefine</developerConnection>
      <url>https://github.com/OpenRefine/OpenRefine.git</url>
      <tag>HEAD</tag>
  </scm>
  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/openrefine/openrefine/issues</url>
  </issueManagement>

  <developers>
    <developer>
      <id>dfhuynh</id>
      <name>David F. Huynh</name>
      <email>dfhuynh@google.com</email>
    </developer>
  </developers>

  <modules>
        <module>main</module>
        <module>server</module>
        <module>extensions</module>
        <module>packaging</module>
        <module>benchmark</module>
  </modules>


  <properties>
    <java.minversion>11</java.minversion>
    <java.maxversion>17</java.maxversion>
    <jee.path>/</jee.path>
    <jee.port>3333</jee.port>
    <refine.data>/tmp/refine</refine.data>
    <surefireArgs/>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <!-- dependency versions -->
    <jackson.version>2.13.3</jackson.version>
    <servlet-api.version>4.0.1</servlet-api.version>
    <butterfly.version>1.2.3</butterfly.version>
    <slf4j.version>1.7.36</slf4j.version>
    <log4j.version>2.17.2</log4j.version>
    <jetty.version>9.4.46.v20220331</jetty.version>
    <okhttp.version>4.9.3</okhttp.version>
    <jena.version>4.5.0</jena.version>
    <poi.version>5.2.2</poi.version>
    <commons-lang3.version>3.12.0</commons-lang3.version>
    <commons-fileupload.version>1.4</commons-fileupload.version>
    <commons-collections.version>3.2.2</commons-collections.version>
    <commons-text.version>1.9</commons-text.version>
    <commons-validator.version>1.7</commons-validator.version>
    <!-- v1.15 of commons-codec is needed for Jena 3.14+ - copied from org.apache.jena:jena:pom -->
    <commons-codec.version>1.15</commons-codec.version>
    <commons-compress.version>1.21</commons-compress.version>
    <velocity.version>1.5</velocity.version>
    <marc4j.version>2.9.2</marc4j.version>
    <jsoup.version>1.14.2</jsoup.version>
    <odfdom-java.version>0.9.0</odfdom-java.version> <!-- do not update to 0.10.0, see issue #4397 -->
    <vicino.version>1.2</vicino.version>
    <clojure.version>1.11.1</clojure.version>
    <httpclient5.version>5.1.3</httpclient5.version>
    <httpcore.version>4.4.15</httpcore.version>
    <opencsv-multichar.version>2.4</opencsv-multichar.version>
    <swc-parser-lazy.version>3.1.9</swc-parser-lazy.version>
    <commons-io.version>2.11.0</commons-io.version>
    <guava.version>31.1-jre</guava.version>
    <jaxb-api.version>2.3.1</jaxb-api.version>
    <juniversalchardet.version>2.4.0</juniversalchardet.version>
    <testng.version>7.6.0</testng.version>
    <httpmime.version>4.5.13</httpmime.version>
    <owasp-encoder.version>1.2.3</owasp-encoder.version>
    <jasypt.version>1.9.3</jasypt.version>
    <mockito.version>4.6.1</mockito.version>

    <!-- plugin versions -->
    <build-helper-maven-plugin.version>3.3.0</build-helper-maven-plugin.version>
    <maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
    <maven-resources-plugin.version>3.2.0</maven-resources-plugin.version>
    <exec-maven-plugin.version>3.0.0</exec-maven-plugin.version>
    <maven-dependency-plugin.version>3.3.0</maven-dependency-plugin.version>
    <jacoco-maven-plugin.version>0.8.8</jacoco-maven-plugin.version>
    <coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version>
    <surefire.version>2.22.2</surefire.version>
    <maven-jar-plugin.version>3.2.2</maven-jar-plugin.version>
    <maven-clean-plugin.version>3.2.0</maven-clean-plugin.version>
    <git-commit-id-plugin.version>4.9.10</git-commit-id-plugin.version>
    <maven-deploy-plugin.version>3.0.0-M2</maven-deploy-plugin.version>
    <license-plugin.version>2.0.0</license-plugin.version>
  </properties>


  <build>
    <!-- It is nice for "mvn" with no arguments to do a reasonable default. -->
    <defaultGoal>install</defaultGoal>
    
    <finalName>openrefine</finalName>
    <resources>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
	<version>${maven-compiler-plugin.version}</version>
        <configuration>
          <source>${java.minversion}</source>
          <target>${java.minversion}</target>
          <encoding>UTF-8</encoding>
          <showDeprecation>false</showDeprecation>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
	<version>${maven-resources-plugin.version}</version>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
	<version>${exec-maven-plugin.version}</version>
        <configuration>
          <skip>true</skip>
          <mainClass>none</mainClass>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
	<version>${maven-dependency-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${surefire.version}</version>
        <configuration>
          <argLine>@{surefireArgs} -Dfile.encoding=cp1252</argLine>
          <suiteXmlFiles>
            <suiteXmlFile>main/tests/server/conf/tests.xml</suiteXmlFile>
          </suiteXmlFiles>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
	<version>${jacoco-maven-plugin.version}</version>
        <executions>
            <execution>
                <id>prepare-agent</id>
                <goals>
                    <goal>prepare-agent</goal>
                </goals>
                <phase>process-test-resources</phase>
                <configuration>
                    <destFile>${project.build.directory}/report/${project.name}.exec</destFile>
                    <propertyName>surefireArgs</propertyName>
                </configuration>
            </execution>
            <execution>
                <phase>test</phase>
                <goals>
                    <goal>report</goal>
                </goals>
                <configuration>
                    <dataFile>${project.build.directory}/report/${project.name}.exec</dataFile>
                    <outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
                </configuration>
            </execution>
            <execution>
                <id>merge</id>
                <goals>
                     <goal>merge</goal>
                </goals>
                <phase>test</phase>
               <configuration>
                     <destFile>${project.build.directory}/report/jacoco-merged.exec</destFile>
                     <fileSets>
                        <fileSet>
                            <directory>main/target/report</directory>
                            <includes>
                                <include>*.exec</include>
                            </includes>
                        </fileSet>
                        <fileSet>
                            <directory>extensions/target/report</directory>
                            <includes>
                                <include>*.exec</include>
                            </includes>
                        </fileSet>
                     </fileSets> 
                </configuration>
             </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.eluder.coveralls</groupId>
        <artifactId>coveralls-maven-plugin</artifactId>
	<version>${coveralls-maven-plugin.version}</version>
        <dependencies>
          <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.3.1</version>
          </dependency>
        </dependencies>
        <configuration>
          <sourceDirectories>
             <sourceDirectory>main/src</sourceDirectory>
             <sourceDirectory>extensions/jython/src</sourceDirectory>
             <sourceDirectory>extensions/wikidata/src</sourceDirectory>
             <sourceDirectory>extensions/database/src</sourceDirectory>
             <sourceDirectory>extensions/phonetic/src</sourceDirectory>
             <sourceDirectory>extensions/gdata/src</sourceDirectory>
          </sourceDirectories>
        </configuration>
      </plugin>
      <plugin>
        <!-- Pluging to generate release source -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <!-- Plugin for creating Javadocs; goal for preparing docs for upload to github: javadoc:aggregate -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.3.2</version>
        <configuration>
            <bottom>
                    <![CDATA[Copyright &#169; {inceptionYear}&#x2013;{currentYear} {organizationName}. Generated from source code published under the BSD Clause-3 license. For more information, see the <a href="https://openrefine.org">OpenRefine website</a>]]></bottom>
            <source>11</source>
            <!-- disable error checks for now (TODO: clean up those errors) -->
            <doclint>none</doclint>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>net.revelc.code.formatter</groupId>
        <artifactId>formatter-maven-plugin</artifactId>
        <version>2.17.1</version>
        <configuration>
          <configFile>${maven.multiModuleProjectDirectory}/IDEs/eclipse/Refine.style.xml</configFile>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-eclipse-plugin</artifactId>
        <version>2.10</version>
        <configuration>
          <workspaceCodeStylesURL>${maven.multiModuleProjectDirectory}/IDEs/eclipse/Refine.style.xml</workspaceCodeStylesURL>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>${build-helper-maven-plugin.version}</version>
        <inherited>false</inherited>
        <executions>
          <!-- Attach tar.gz artifact for linux -->
          <execution>
              <id>attach-linux</id>
              <phase>deploy</phase>
              <goals>
                  <goal>attach-artifact</goal>
              </goals>
              <configuration>
                  <artifacts>
                      <artifact>
                          <file>packaging/target/${project.build.finalName}-linux-${project.version}.tar.gz</file>
                          <type>tar.gz</type>
                          <classifier>linux</classifier>
                      </artifact>
                  </artifacts>
              </configuration>
          </execution>
          
          <!-- Attach the zip file for windows, without embedded JRE -->
          <execution>
              <id>attach-win-without-jre</id>
              <phase>deploy</phase>
              <goals>
                  <goal>attach-artifact</goal>
              </goals>
              <configuration>
                  <skipAttach>${skipCreateExe}</skipAttach>
                  <artifacts>
                      <artifact>
                          <file>packaging/target/${project.build.finalName}-win-${project.version}.zip</file>
                          <type>zip</type>
                          <classifier>win</classifier>
                      </artifact>
                  </artifacts>
              </configuration>
          </execution>
          
          <!-- Attach the zip file for windows, with embedded JRE -->
          <execution>
              <id>attach-win-with-jre</id>
              <phase>deploy</phase>
              <goals>
                  <goal>attach-artifact</goal>
              </goals>
              <configuration>
                  <skipAttach>${skipCreateExe}</skipAttach>
                  <artifacts>
                      <artifact>
                          <file>packaging/target/${project.build.finalName}-win-with-java-${project.version}.zip</file>
                          <type>zip</type>
                          <classifier>win-with-java</classifier>
                      </artifact>
                  </artifacts>
              </configuration>
          </execution>

          <!-- Attach the final DMG for MacOS -->
          <execution>
              <id>attach-dmg</id>
              <phase>deploy</phase>
              <goals>
                  <goal>attach-artifact</goal>
              </goals>
              <configuration>
                  <artifacts>
                      <artifact>
                          <file>packaging/target/${project.build.finalName}-mac-${project.version}.dmg</file>
                          <type>dmg</type>
                          <classifier>mac</classifier>
                      </artifact>
                  </artifacts>
              </configuration>
            </execution>
          </executions>
      </plugin>
      <plugin>
        <!-- Signature -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>3.0.1</version>
        <executions>
            <execution>
                <id>sign-artifacts</id>
                <phase>deploy</phase>
                <goals>
                    <goal>sign</goal>
                </goals>
            </execution>
        </executions>
      </plugin>
      <plugin>
        <!-- Staging plugin -->
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.12</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>


    </plugins>
  </build>

  <dependencies>
    <!-- dependencies are stored in the relevant submodules:
          see main/pom.xml, server/pom.xml and each extension.
    -->
  </dependencies>

  <!-- enabled to access our snapshots of Wikidata-Toolkit -->
  <repositories>
    <repository>
      <id>snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <!-- Locations of the artifacts published -->
  <distributionManagement>
     <snapshotRepository>
       <id>ossrh</id>
       <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
     </snapshotRepository>
     <repository>
       <id>ossrh</id>
       <url>https://oss.sonatype.org/content/repositories/snapshots</url>
     </repository>
  </distributionManagement>
 
</project>
