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

  <parent>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-plugins</artifactId>
    <version>33</version>
    <relativePath>../../pom/maven/maven-plugins/pom.xml</relativePath>
  </parent>

  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.8.1</version>
  <packaging>maven-plugin</packaging>

  <name>Apache Maven Compiler Plugin</name>
  <description>The Compiler Plugin is used to compile the sources of your project.</description>
  <inceptionYear>2001</inceptionYear>

  <prerequisites>
    <maven>${mavenVersion}</maven>
  </prerequisites>

  <scm>
    <connection>scm:git:https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git</connection>
    <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git</developerConnection>
    <url>https://github.com/apache/maven-compiler-plugin/tree/${project.scm.tag}</url>
    <tag>maven-compiler-plugin-3.8.1</tag>
  </scm>
  <issueManagement>
    <system>JIRA</system>
    <url>https://issues.apache.org/jira/browse/MCOMPILER</url>
  </issueManagement>
  <ciManagement>
    <system>Jenkins</system>
    <url>https://builds.apache.org/job/maven-box/job/maven-compiler-plugin/</url>
  </ciManagement>
  <distributionManagement>
    <site>
      <id>apache.website</id>
      <url>scm:svn:https://svn.apache.org/repos/asf/maven/website/components/${maven.site.path}</url>
    </site>
  </distributionManagement>

  <properties>
    <mavenVersion>3.0</mavenVersion>
    <!--
      ! The following property is used in the integration tests MCOMPILER-157
    -->
    <mavenPluginPluginVersion>3.5</mavenPluginPluginVersion>
    <plexusCompilerVersion>2.8.4</plexusCompilerVersion>
    <groovyVersion>1.8.0</groovyVersion>
    <groovyEclipseCompilerVersion>2.7.0-01</groovyEclipseCompilerVersion>
    <groovy-eclipse-batch>2.0.4-04</groovy-eclipse-batch>
    <openJpaVersion>2.4.2</openJpaVersion>
    <javaVersion>7</javaVersion>
    <maven.it.failure.ignore>false</maven.it.failure.ignore>
  </properties>

  <contributors>
    <contributor>
      <name>Jan Sievers</name>
    </contributor>
  </contributors>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <!-- to remove when using plexus-java-1.0.0 -->
        <groupId>com.thoughtworks.qdox</groupId>
        <artifactId>qdox</artifactId>
        <version>2.0-M9</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <scope>provided</scope>
    </dependency>
    <!-- Maven -->
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-artifact</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-shared-utils</artifactId>
      <version>3.2.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-shared-incremental</artifactId>
      <version>1.1</version>
    </dependency>

    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-java</artifactId>
      <version>0.9.10</version>
    </dependency>

    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-compiler-api</artifactId>
      <version>${plexusCompilerVersion}</version>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-compiler-manager</artifactId>
      <version>${plexusCompilerVersion}</version>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-compiler-javac</artifactId>
      <version>${plexusCompilerVersion}</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.plugin-testing</groupId>
      <artifactId>maven-plugin-testing-harness</artifactId>
      <version>2.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-compat</artifactId>
      <version>${mavenVersion}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>1.9.5</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <configuration>
            <excludes combine.children="append">
              <exclude>.java-version</exclude>
            </excludes>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.4.1</version>
          <executions>
            <execution>
              <id>enforce-bytecode-version</id>
              <configuration>
                <rules>
                  <enforceBytecodeVersion>
                    <maxJdkVersion>1.6</maxJdkVersion>
                    <excludes>
                      <exclude>org.ow2.asm:asm</exclude>
                    </excludes>
                  </enforceBytecodeVersion>
                  <requireSameVersions />
                </rules>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-component-metadata</artifactId>
        <version>1.7.1</version>
        <executions>
          <execution>
            <id>descriptors</id>
            <goals>
              <goal>generate-metadata</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>run-its</id>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-invoker-plugin</artifactId>
              <version>3.2.0</version>
              <executions>
                <execution>
                  <id>integration-test</id>
                  <configuration>
                    <environmentVariables>
                      <JENKINS_MAVEN_AGENT_DISABLED>true</JENKINS_MAVEN_AGENT_DISABLED>
                    </environmentVariables>
                    <debug>true</debug>
                    <projectsDirectory>src/it</projectsDirectory>
                    <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                    <pomIncludes>
                      <pomInclude>*/pom.xml</pomInclude>
                      <pomInclude>extras/*/pom.xml</pomInclude>
                      <pomInclude>multirelease-patterns/*/pom.xml</pomInclude>
                    </pomIncludes>
                    <!--
                      ! Unfortunately we can't define an execution order.
                      ! https://issues.apache.org/jira/browse/MINVOKER-174
                      -->
                    <setupIncludes>
                      <setupInclude>setup_jar_module/pom.xml</setupInclude>
                      <setupInclude>setup_jar_automodule/pom.xml</setupInclude>
                      <setupInclude>setup_x/pom.xml</setupInclude>
                    </setupIncludes>
                    <setupExcludes>
                      <setupExclude>setup_x/**</setupExclude>
                    </setupExcludes>
                    <postBuildHookScript>verify</postBuildHookScript>
                    <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
                    <settingsFile>src/it/settings.xml</settingsFile>
                    <ignoreFailures>${maven.it.failure.ignore}</ignoreFailures>
                    <properties>
                      <!-- e.g. ensure that Java7 picks up TLSv1.2 when connecting with Central -->
                      <https.protocols>${https.protocols}</https.protocols>
                    </properties>
                    <goals>
                      <goal>clean</goal>
                      <goal>test-compile</goal>
                    </goals>
                  </configuration>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
      <!--
      add those dependency just to have faster it test (for folks who doesn't have those locally
      they will be downloaded from local repo rather than central
      -->
      <dependencies>
        <dependency>
          <groupId>org.codehaus.groovy</groupId>
          <artifactId>groovy-eclipse-compiler</artifactId>
          <version>${groovyEclipseCompilerVersion}</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.codehaus.groovy</groupId>
          <artifactId>groovy-eclipse-batch</artifactId>
          <version>${groovy-eclipse-batch}</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.codehaus.groovy</groupId>
          <artifactId>groovy-all</artifactId>
          <version>${groovyVersion}</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.apache.openjpa</groupId>
          <artifactId>openjpa</artifactId>
          <version>${openJpaVersion}</version>
          <!-- TODO: scope test? -->
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>Jenkins</id>
      <activation>
        <property>
          <name>env.JENKINS_URL</name>
        </property>
      </activation>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-invoker-plugin</artifactId>
              <configuration>
                <pomExcludes>
                  <pomExclude>multirelease-patterns/singleproject-toolchains/pom.xml</pomExclude>
                </pomExcludes>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
  </profiles>
</project>
