<?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>
    <artifactId>maven-plugins</artifactId>
    <groupId>org.apache.maven.plugins</groupId>
    <version>25</version>
    <relativePath>../maven-plugins/pom.xml</relativePath>
  </parent>

  <artifactId>maven-eclipse-plugin</artifactId>
  <version>2.10</version>
  <packaging>maven-plugin</packaging>

  <name>Apache Maven Eclipse Plugin</name>
  <description>The Eclipse Plugin is used to generate Eclipse IDE files (.project, .classpath and the .settings folder)
    from a POM.
  </description>

  <prerequisites>
    <maven>${mavenVersion}</maven>
  </prerequisites>

  <scm>
    <connection>scm:svn:http://svn.apache.org/repos/asf/maven/plugins/tags/maven-eclipse-plugin-2.10</connection>
    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-eclipse-plugin-2.10
    </developerConnection>
    <url>http://svn.apache.org/viewvc/maven/plugins/tags/maven-eclipse-plugin-2.10</url>
  </scm>
  <issueManagement>
    <system>JIRA</system>
    <url>https://issues.apache.org/jira/browse/MECLIPSE</url>
  </issueManagement>
  <distributionManagement>
    <site>
      <id>apache.website</id>
      <url>scm:svn:https://svn.apache.org/repos/infra/websites/production/maven/components/${maven.site.path}</url>
    </site>
  </distributionManagement>

  <properties>
    <mavenVersion>2.2.1</mavenVersion>
    <maven.test.jvmargs>-Xmx1024m</maven.test.jvmargs>
    <surefire.version>2.18.1</surefire.version>
    <mavenPluginToolsVersion>3.4</mavenPluginToolsVersion>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-project</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-artifact-manager</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</groupId>
      <artifactId>maven-settings</artifactId>
      <version>${mavenVersion}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.wagon</groupId>
      <artifactId>wagon-provider-api</artifactId>
      <version>2.1</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.2</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-archiver</artifactId>
      <version>2.6.3</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>3.0.20</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-interactivity-jline</artifactId>
      <version>1.0-alpha-5</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-archiver</artifactId>
      <version>2.5</version>
    </dependency>
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-resources</artifactId>
      <version>1.0-alpha-7</version>
    </dependency>
    <dependency>
      <groupId>biz.aQute</groupId>
      <artifactId>bndlib</artifactId>
      <version>0.0.145</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-osgi</artifactId>
      <version>0.2.0</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.core</groupId>
      <artifactId>resources</artifactId>
      <version>3.3.0-v20070604</version>
      <exclusions>
        <exclusion>
          <groupId>org.eclipse.ant</groupId>
          <artifactId>core</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.core</groupId>
          <artifactId>expressions</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.core</groupId>
          <artifactId>filesystem</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.core</groupId>
          <artifactId>runtime</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <!-- Tests -->
    <dependency>
      <groupId>easymock</groupId>
      <artifactId>easymock</artifactId>
      <version>1.2_Java1.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>jdom</groupId>
      <artifactId>jdom</artifactId>
      <version>1.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>jaxen</groupId>
      <artifactId>jaxen</artifactId>
      <version>1.0-FCS</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>saxpath</groupId>
      <artifactId>saxpath</artifactId>
      <version>1.0-FCS</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-testing</groupId>
      <artifactId>maven-test-tools</artifactId>
      <version>1.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-testing</groupId>
      <artifactId>maven-plugin-testing-tools</artifactId>
      <version>1.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-testing</groupId>
      <artifactId>maven-plugin-testing-harness</artifactId>
      <version>1.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>maven-invoker</artifactId>
      <version>2.1.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>xmlunit</groupId>
      <artifactId>xmlunit</artifactId>
      <version>1.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>${mavenPluginToolsVersion}</version>
          <executions>
            <execution>
              <id>default-descriptor</id>
              <phase>process-classes</phase>
            </execution>
            <execution>
              <id>generated-helpmojo</id>
              <goals>
                <goal>helpmojo</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.7</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <version>${surefire.version}</version>
          <configuration>
            <reportsDirectories>
              <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
              <reportsDirectory>${project.build.directory}/failsafe-reports</reportsDirectory>
            </reportsDirectories>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${surefire.version}</version>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.surefire</groupId>
              <artifactId>surefire-junit47</artifactId>
              <version>${surefire.version}</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <configuration>
            <excludes>
              <exclude>README-testing.txt</exclude>
              <!--
                These files contain several files for eclipse
                which will let fail the tests if a license header
                is being added.
              -->
              <exclude>src/test/resources/**</exclude>
            </excludes>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>require-maven-2.0.9</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <!-- The tests check file encoding and class path ordering which depends on fixes in latest Maven -->
                  <version>[2.0.9,3.0-SNAPSHOT],[3.0,)</version>
                  <!-- workaround for MENFORCER-94 -->
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <includes>
            <include>**/*Test.java</include>
          </includes>
          <excludes>
            <exclude>**/project/**</exclude>
            <exclude>**/Abstract*.java</exclude>
          </excludes>
          <systemPropertyVariables>
            <maven.home>${maven.home}</maven.home>
            <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
          </systemPropertyVariables>
          <argLine>${maven.test.jvmargs}</argLine>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>maven-repo-local</id>
      <activation>
        <property>
          <name>maven.repo.local</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <systemPropertyVariables>
                <maven.repo.local>${maven.repo.local}</maven.repo.local>
              </systemPropertyVariables>
              <configuration>
                <argLine>${maven.test.jvmargs}</argLine>
              </configuration>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>run-its</id>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-invoker-plugin</artifactId>
              <executions>
                <execution>
                  <id>integration-test</id>
                  <goals>
                    <goal>install</goal>
                    <goal>run</goal>
                  </goals>
                </execution>
              </executions>
              <configuration>
                <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                <postBuildHookScript>verify</postBuildHookScript>
                <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
                <settingsFile>src/it/settings.xml</settingsFile>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>1.7</version>
            <executions>
              <execution>
                <id>copy-it-settings</id>
                <phase>process-resources</phase>
                <configuration>
                  <target>
                    <available property="it_settings_file" file="src/it/settings-${user.name}.xml" value="src/it/settings-${user.name}.xml" />
                    <property name="it_settings_file" location="src/it/settings-default.xml" />
                    <copy file="${it_settings_file}" tofile="src/it/settings.xml" />
                  </target>
                </configuration>
                <goals>
                  <goal>run</goal>
                </goals>
              </execution>
              <execution>
                <id>verify-integration-tests-checks</id>
                <phase>post-integration-test</phase>
                <configuration>
                  <target>
                    <property name="script" location="verify-integration-tests-checks.bsh" />
                    <script language="beanshell" src="${script}" />
                  </target>
                </configuration>
                <goals>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>org.apache.ant</groupId>
                <artifactId>ant-nodeps</artifactId>
                <version>1.7.1</version>
              </dependency>
              <dependency>
                <groupId>org.apache.ant</groupId>
                <artifactId>ant-apache-bsf</artifactId>
                <version>1.7.1</version>
              </dependency>
              <dependency>
                <groupId>org.beanshell</groupId>
                <artifactId>bsh</artifactId>
                <version>2.0b4</version>
              </dependency>
            </dependencies>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                <systemPropertyVariables>
                   <maven.home>${maven.home}</maven.home>
                 </systemPropertyVariables>
                 <argLine>${maven.test.jvmargs}</argLine>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>maven-2</id>
      <activation>
        <file>
          <!--  This employs that the basedir expression is only recognized by Maven 3.x (see MNG-2363) -->
          <missing>${basedir}</missing>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-plugin-plugin</artifactId>
            <configuration>
              <!-- see http://jira.codehaus.org/browse/MNG-5346 -->
              <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
            </configuration>
            <executions>
              <execution>
                <id>mojo-descriptor</id>
                <goals><!-- Maven 2 does not support phase overriding: need to add an execution -->
                  <goal>descriptor</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>    
  </profiles>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>${mavenPluginToolsVersion}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>${surefire.version}</version>
        <reportSets>
          <reportSet>
            <id>integration-tests</id>
            <reports>
              <report>report-only</report>
            </reports>
            <configuration>
              <outputName>failsafe-report</outputName>
              <reportsDirectories>
                <reportsDirectory>${project.build.directory}/failsafe-reports</reportsDirectory>
              </reportsDirectories>
            </configuration>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>
</project>

