<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements. See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership. The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License. You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied. See the License for the
  specific language governing permissions and limitations
  under the License.
-->
<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>
  <!-- This artifact name follows the conventions described http://books.sonatype.com/mvnref-book/reference/writing-plugins-sect-custom-plugin.html
    where patterns like xxx-maven-plugin and maven-xxx-plugin can be invoked just using xxx if the right
    settings are in place -->
  <artifactId>ruta-maven-plugin</artifactId>
  <packaging>maven-plugin</packaging>
  <name>Apache UIMA Maven: ${project.artifactId}</name>
  <description>A Maven Plugin for generating descriptors from UIMA Ruta script files.</description>
  <prerequisites>
    <maven>3.0</maven>
  </prerequisites>
  <parent>
    <groupId>org.apache.uima</groupId>
    <artifactId>ruta-parent</artifactId>
    <version>3.2.0</version>
    <relativePath>../ruta-parent/pom.xml</relativePath>
  </parent>
  <properties>
    <postNoticeText />
  </properties>
  <url>${uimaWebsiteUrl}</url>

  <scm>
    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>
    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>
    <url>https://github.com/apache/uima-ruta/</url>
    <tag>ruta-3.2.0</tag>
  </scm>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${spring-version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-core</artifactId>
        <version>${spring-version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-beans</artifactId>
        <version>${spring-version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <!-- Dependencies on the Maven Plugin API and friends -->
    <dependency>
      <groupId>org.apache.uima</groupId>
      <artifactId>ruta-core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>3.0.3</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>3.0.3</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>3.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.sonatype.plexus</groupId>
      <artifactId>plexus-build-api</artifactId>
      <version>0.0.7</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-testing</groupId>
      <artifactId>maven-plugin-testing-harness</artifactId>
      <version>2.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-jdk14</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <!-- <version>2.8.1</version> -->
          <configuration>
            <!-- avoiding javadoc warnings caused by Mojo annotations -->
            <tagletArtifacts>
              <tagletArtifact>
                <groupId>org.apache.maven.plugin-tools</groupId>
                <artifactId>maven-plugin-tools-javadoc</artifactId>
                <version>2.9</version>
              </tagletArtifact>
            </tagletArtifacts>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <executions>
            <execution>
              <id>default-cli</id>
              <configuration>
                <excludes combine.children="append">
                  <exclude>src/test/**/*.ruta</exclude> <!-- test data -->
                  <exclude>src/it/**/*.ruta</exclude> <!-- test data -->
                  <exclude>src/it/**/*.txt</exclude> <!-- test data -->
                </excludes>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence
          on the Maven build itself. -->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <versionRange>[3.3,)</versionRange>
                    <goals>
                      <goal>descriptor</goal>
                      <goal>helpmojo</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-invoker-plugin</artifactId>
          <version>2.0.0</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-invoker-plugin</artifactId>
        <configuration>
          <projectsDirectory>src/it</projectsDirectory>
          <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
          <pomIncludes>
            <pomInclude>*/pom.xml</pomInclude>
          </pomIncludes>
          <settingsFile>src/it/settings.xml</settingsFile>
          <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
          <postBuildHookScript>verify.bsh</postBuildHookScript>
          <goals>
            <goal>clean</goal>
            <goal>package</goal>
            <goal>integration-test</goal>
          </goals>
          <invokerTest>conflictingShortName,importByName,multimodule,wordlists</invokerTest>
        </configuration>
        <executions>
          <execution>
            <id>integration-test</id>
            <goals>
              <goal>install</goal>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
