<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>

  <artifactId>main</artifactId>
  <packaging>jar</packaging>

  <name>OpenRefine - main</name>
  <description>OpenRefine is a free, open source power tool for working with messy data and improving it</description>
  <url>http://openrefine.org/</url>
  <parent>
    <groupId>org.openrefine</groupId>
    <artifactId>openrefine</artifactId>
    <version>3.9.5</version>
  </parent>

  <properties>
    <jee.path>/</jee.path>
    <jee.port>3333</jee.port>
    <refine.data>/tmp/refine</refine.data>
  </properties>

  <scm>
    <connection>scm:git:http://github.com/OpenRefine/OpenRefine</connection>
    <url>http://github.com/OpenRefine/OpenRefine</url>
  </scm>

  <build>
    <finalName>openrefine-main</finalName>
    <resources>
      <resource>
        <directory>src</directory>
      </resource>
      <resource>
        <directory>resources</directory>
      </resource>
    </resources>
    <sourceDirectory>src</sourceDirectory>
    <testSourceDirectory>tests/server/src</testSourceDirectory>
    <testResources>
      <testResource>
        <directory>tests/data</directory>
      </testResource>
    </testResources>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
	<version>${build-helper-maven-plugin.version}</version>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>src</source>
                <source>${project.build.directory}/generated-sources/</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${surefire.version}</version>
        <configuration>
          <suiteXmlFiles>
            <suiteXmlFile>tests/server/conf/tests.xml</suiteXmlFile>
          </suiteXmlFiles>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
	<version>${maven-dependency-plugin.version}</version>
        <executions>
            <execution>
            <phase>compile</phase>
            <goals>
                <goal>copy-dependencies</goal>
            </goals>
            <configuration>
                <outputDirectory>webapp/WEB-INF/lib</outputDirectory>
                <includeScope>runtime</includeScope>
            </configuration>
            </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
	<version>${maven-jar-plugin.version}</version>
        <executions>
          <execution>
            <id>default-jar</id>
            <phase>compile</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <outputDirectory>webapp/WEB-INF/lib</outputDirectory>
            </configuration>
          </execution>
          <execution>
            <id>test-jar</id>
            <goals>
              <goal>test-jar</goal>
            </goals>
            <configuration>
              <skip>${skipTests}</skip>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
	<version>${maven-clean-plugin.version}</version>
        <configuration>
          <filesets>
            <fileset>
              <directory>webapp/WEB-INF/lib</directory>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
    <plugin>
        <groupId>pl.project13.maven</groupId>
        <artifactId>git-commit-id-plugin</artifactId>
	<version>${git-commit-id-plugin.version}</version>
        <executions>
            <execution>
                <id>get-the-git-infos</id>
                <goals>
                    <goal>revision</goal>
                </goals>
            </execution>
        </executions>
        <configuration>
            <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
            <verbose>false</verbose>
            <generateGitPropertiesFile>true</generateGitPropertiesFile>
            <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
            <failOnNoGitDirectory>false</failOnNoGitDirectory>
            <failOnUnableToExtractRepoInfo>false</failOnUnableToExtractRepoInfo>
            <format>json</format>
            <gitDescribe>
                <skip>false</skip>
                <always>false</always>
                <dirty>-dirty</dirty>
            </gitDescribe>
            <includeOnlyProperties>
              <includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
              <includeOnlyProperty>^git.branch</includeOnlyProperty>
              <includeOnlyProperty>^git.commit.id.(abbrev|full|describe)$</includeOnlyProperty>
            </includeOnlyProperties>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>org/marc4j/converter/impl/*CodeTableGenerated*</exclude>
            <!-- Metaphone3 should be an external library and has many instructions, dominating our actual code in coverage reports -->
            <exclude>com/google/refine/clustering/binning/Metaphone3.class</exclude>
          </excludes>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>${servlet-api.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.openrefine</groupId>
      <artifactId>core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.openrefine</groupId>
      <artifactId>grel</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.openrefine.dependencies</groupId>
      <artifactId>butterfly</artifactId>
      <version>${butterfly.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j-1.2-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j-slf4j2-impl</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>${jackson.version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
      <version>${jackson.version}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>${commons-lang3.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>commons-fileupload</groupId>
      <artifactId>commons-fileupload</artifactId>
      <version>${commons-fileupload.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-text</artifactId>
	<version>${commons-text.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.velocity</groupId>
      <artifactId>velocity-engine-core</artifactId>
      <version>${velocity.version}</version>
    </dependency>
    <dependency>
      <groupId>org.marc4j</groupId>
      <artifactId>marc4j</artifactId>
      <version>${marc4j.version}</version>
    </dependency>
    <dependency>
      <groupId>com.univocity</groupId>
      <artifactId>univocity-parsers</artifactId>
      <version>${univocity-csv.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.poi</groupId>
      <artifactId>poi</artifactId>
      <version>${poi.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.poi</groupId>
      <artifactId>poi-ooxml</artifactId>
      <version>${poi.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.odftoolkit</groupId>
      <artifactId>odfdom-java</artifactId>
      <version>${odfdom-java.version}</version>
      <!-- workaround for https://github.com/tdf/odftoolkit/issues/131,
	 which is unfortunately still not solved after
         https://github.com/tdf/odftoolkit/pull/132
	 because xml-apis remains an indirect dependency of this library
	 through xercesImpl.
      -->
      <exclusions>
        <exclusion>
          <groupId>xml-apis</groupId>
          <artifactId>xml-apis</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.openrefine.dependencies</groupId>
      <artifactId>vicino</artifactId>
      <version>${vicino.version}</version>
      <exclusions>
	<exclusion>
	  <groupId>log4j</groupId>
	  <artifactId>log4j</artifactId>
	</exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.clojure</groupId>
      <artifactId>clojure</artifactId>
      <version>${clojure.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents.client5</groupId>
      <artifactId>httpclient5</artifactId>
      <version>${httpclient5.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents.core5</groupId>
      <artifactId>httpcore5</artifactId>
      <version>${httpcore5.version}</version>
    </dependency>
    <dependency>
      <groupId>org.sweble.wikitext</groupId>
      <artifactId>swc-parser-lazy</artifactId>
      <version>${swc-parser-lazy.version}</version>
    </dependency>

    <dependency> <!-- reported as unused by dependency:analyze, but tests fail without -->
      <groupId>org.apache.jena</groupId>
      <artifactId>jena-arq</artifactId>
      <version>${jena.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.jena</groupId>
      <artifactId>jena-core</artifactId>
      <version>${jena.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
      <version>${commons-codec.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>${commons-io.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>${guava.version}</version>
    </dependency>
    <dependency>
      <groupId>javax.xml.bind</groupId>
      <artifactId>jaxb-api</artifactId>
      <version>${jaxb-api.version}</version>
    </dependency>
    <dependency> <!-- Mozilla Public License Version 1.1 - for details see /OpenRefine/packaging/manual_licenses.xml -->
      <groupId>com.github.albfernandez</groupId>
      <artifactId>juniversalchardet</artifactId>
      <version>${juniversalchardet.version}</version>
    </dependency>
    <dependency> <!-- reported as unused by dependency:analyze, but broken without it -->
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-servlets</artifactId>
      <version>${jetty.version}</version>
    </dependency>

    <!-- test dependencies -->

    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>${testng.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.openrefine</groupId>
      <artifactId>core</artifactId>
      <version>${project.version}</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.squareup.okhttp3</groupId>
      <artifactId>mockwebserver</artifactId>
      <version>${okhttp.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>${mockito.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpmime</artifactId>
      <version>${httpmime.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>${log4j.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j2-impl</artifactId>
      <version>${log4j.version}</version>
      <scope>test</scope>
    </dependency>

  </dependencies>
</project>
