<!--

    Copyright (C) 2006-2017 INRIA and contributors
    Spoon - http://spoon.gforge.inria.fr/

    This software is governed by the CeCILL-C License under French law and
    abiding by the rules of distribution of free software. You can use, modify
    and/or redistribute the software under the terms of the CeCILL-C license as
    circulated by CEA, CNRS and INRIA at http://www.cecill.info.

    This program is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE. See the CeCILL-C License for more details.

    The fact that you are presently reading this means that you have had
    knowledge of the CeCILL-C license and that you accept its terms.

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

  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>

  <groupId>fr.inria.gforge.spoon</groupId>
  <artifactId>spoon-core</artifactId>
  <packaging>jar</packaging>
  <version>7.0.0</version>
  <name>Spoon Core</name>
  <description>Spoon is a tool for meta-programming, analysis and transformation of Java programs.</description>
  <url>http://spoon.gforge.inria.fr/</url>
  <inceptionYear>2007</inceptionYear>

  <licenses>
    <license>
      <name>CeCILL-C</name>
      <comments>French equivalent to LGPL</comments>
      <url>http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <organization>
    <name>Inria</name>
    <url>http://www.inria.fr</url>
  </organization>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/INRIA/spoon/issues</url>
  </issueManagement>

  <!-- to generate the list for the README -->
  <!-- xmlstarlet sel -t -m "//_:developer/_:name" -o "* " -v . -n  pom.xml -->
  <developers>
    <developer>
      <name>Olivier Barais</name>
      <roles>
        <role>Contributor</role>
      </roles>
    </developer>
    <developer>
      <name>David Bernard</name>
      <roles>
        <role>Contributor</role>
      </roles>
    </developer>
    <developer>
      <name>Benoit Cornu</name>
      <roles>
        <role>Contributor</role>
      </roles>
    </developer>
    <developer>
      <name>Didier Donsez</name>
      <roles>
        <role>Contributor</role>
      </roles>
    </developer>
    <developer>
      <name>Favio DeMarco</name>
      <roles>
        <role>Contributor</role>
      </roles>
    </developer>
    <developer>
      <name>Christophe Dufour</name>
      <roles>
        <role>Contributor</role>
      </roles>
    </developer>
    <developer>
      <name>Sebastian Lamelas Marcote</name>
      <roles>
        <role>Contributor</role>
      </roles>
    </developer>
    <developer>
      <name>Matias Martinez</name>
      <roles>
        <role>Contributor</role>
      </roles>
    </developer>
    <developer>
      <name>Martin Monperrus</name>
      <roles>
        <role>Contributor</role>
      </roles>
    </developer>
    <developer>
      <name>Carlos Noguera</name>
      <roles>
        <role>Contributor</role>
      </roles>
    </developer>
    <developer>
      <name>Renaud Pawlak</name>
      <roles>
        <role>Contributor</role>
      </roles>
    </developer>
    <developer>
      <name>Nicolas Pessemier</name>
      <roles>
        <role>Contributor</role>
      </roles>
    </developer>
    <developer>
      <name>Nicolas Petitprez</name>
      <roles>
        <role>Contributor</role>
      </roles>
    </developer>
    <developer>
      <name>Phillip Schichtel</name>
      <roles>
        <role>Contributor</role>
      </roles>
    </developer>
    <developer>
      <name>Lionel Seinturier</name>
      <roles>
        <role>Contributor</role>
      </roles>
    </developer>
    <developer>
      <name>Stefan Wolf</name>
      <roles>
        <role>Contributor</role>
      </roles>
    </developer>
    <developer>
      <name>Gérard Paligot</name>
      <roles>
        <role>Contributor</role>
      </roles>
    </developer>
    <developer>
      <name>Alcides Fonseca</name>
      <roles>
        <role>Contributor</role>
      </roles>
    </developer>
  </developers>

  <scm>
    <url>https://github.com/INRIA/spoon</url>
    <connection>scm:git:https://github.com/INRIA/spoon.git</connection>
    <developerConnection>scm:git:ssh://github.com/INRIA/spoon.git</developerConnection>
    <tag>spoon-core-7.0.0</tag>
  </scm>

  <properties>
    <java.src.version>1.8</java.src.version>
    <java.test.version>1.8</java.test.version>
    <runtime.log>target/velocity.log</runtime.log>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <distributionManagement>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>maven.inria.fr-snapshot</id>
      <name>Maven Repository for Spoon Snapshots</name>
      <url>http://maven.inria.fr/artifactory/spoon-public-snapshot</url>
    </snapshotRepository>
    <site>
      <id>gforge.inria.fr-site</id>
      <name>inria</name>
      <url>scp://scm.gforge.inria.fr/home/groups/spoon/htdocs/mvnsites/spoon-core</url>
    </site>
  </distributionManagement>

  <!-- This repository is actually needed for revapi to compare against the last Spoon Snapshot -->
  <repositories>
    <repository>
      <id>maven.inria.fr-snapshot</id>
      <name>Maven Repository for Spoon Snapshots</name>
      <url>http://maven.inria.fr/artifactory/spoon-public-snapshot</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>org.eclipse.jdt</groupId>
      <artifactId>org.eclipse.jdt.core</artifactId>
      <version>3.13.102</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.github.stefanbirkner</groupId>
      <artifactId>system-rules</artifactId>
      <version>1.9.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <version>2.0.2-beta</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.martiansoftware</groupId>
      <artifactId>jsap</artifactId>
      <version>2.1</version>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.17</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.5</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <version>3.3.9</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>3.5</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.9.2</version>
    </dependency>
    <dependency>
      <!-- to reproduce JTD error with nullable annotation -->
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>18.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <!-- to reproduce and fix a bug -->
      <groupId>com.mysema.querydsl</groupId>
      <artifactId>querydsl-core</artifactId>
      <version>3.6.9</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>com.google.code.findbugs</groupId>
          <artifactId>jsr305</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.mysema.commons</groupId>
          <artifactId>mysema-commons-lang</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>

  <build>
    <defaultGoal>clean install</defaultGoal>

    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
        <excludes>
          <exclude>log4j.properties</exclude>
        </excludes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>false</filtering>
        <includes>
          <include>log4j.properties</include>
        </includes>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.21.0</version>
        <configuration>
          <!-- "If you want to use a basic plain old Java classpath, [...] set useManifestOnlyJar=false and useSystemClassLoader=true".
          https://maven.apache.org/surefire/maven-surefire-plugin/examples/class-loading.html -->
          <useSystemClassLoader>true</useSystemClassLoader>
          <useManifestOnlyJar>false</useManifestOnlyJar>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.7.0</version>
        <configuration>
          <source>${java.src.version}</source>
          <target>${java.src.version}</target>
          <testSource>${java.test.version}</testSource>
          <testTarget>${java.test.version}</testTarget>
          <showWarnings>true</showWarnings>
          <compilerArgs>
              <arg>-Xlint:deprecation,unchecked</arg>
              <!-- always generate class files for package-info -->
              <arg>-Xpkginfo:always</arg>
          </compilerArgs>
          <!-- incremental compilation is broken in maven, see https://issues.apache.org/jira/browse/MCOMPILER-205  -->
          <!-- useIncrementalCompilation=false actually means that we won't recompile everything each time -->
          <!-- it's not a joka, test by yourself :-) -->
          <useIncrementalCompilation>false</useIncrementalCompilation>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.8.1</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.0.0-M1</version>
      </plugin>

      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.8</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
        <dependencies>
          <dependency>
              <groupId>org.apache.maven.wagon</groupId>
              <artifactId>wagon-ssh</artifactId>
            <version>2.12</version>
          </dependency>
        </dependencies>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <archive>
            <manifest>
              <mainClass>spoon.Launcher</mainClass>
              <addClasspath>true</addClasspath>
            </manifest>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.8</version>
        <executions>
          <execution>
            <id>copy-dependencies</id>
            <phase>package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/</outputDirectory>
              <overWriteReleases>false</overWriteReleases>
              <overWriteSnapshots>false</overWriteSnapshots>
              <overWriteIfNewer>true</overWriteIfNewer>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <archive>
            <manifest>
                <mainClass>spoon.Launcher</mainClass>
            </manifest>
          </archive>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
            <!-- descriptorRef>project</descriptorRef -->
          </descriptorRefs>
          <!-- descriptor>src/main/assembly/project.xml</descriptor -->
        </configuration>
        <executions>
          <execution>
            <id>make-assembly</id><!-- this is used for inheritance merges -->
            <phase>package</phase><!-- append to the packaging phase. -->
            <goals>
              <goal>attached</goal><!-- goals == mojos -->
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <goals>deploy</goals>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.17</version>
        <configuration>
          <failsOnError>true</failsOnError>
          <configLocation>checkstyle.xml</configLocation>
          <consoleOutput>true</consoleOutput>
	  <!-- we exclude the generated files, see CtGenerationTest -->
	  <excludes>spoon/support/visitor/clone/CloneBuilder.java</excludes>
	  <excludes>spoon/reflect/visitor/CtBiScannerDefault.java</excludes>
	  <excludes>spoon/support/visitor/equals/EqualsVisitor.java</excludes>
	  <excludes>spoon/support/visitor/replace/ReplacementVisitor.java</excludes>
	</configuration>
	<executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>checkstyle</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
	<groupId>org.jacoco</groupId>
	<artifactId>jacoco-maven-plugin</artifactId>
	<version>0.8.1</version>
	<executions>
	  <execution>
	    <goals>
	      <goal>prepare-agent</goal>
	    </goals>
	  </execution>
	  <execution>
	    <id>report</id>
	    <phase>prepare-package</phase>
	    <goals>
	      <goal>report</goal>
	    </goals>
	  </execution>
	</executions>
      </plugin>

      <!-- Used for checking backward compatibility (binary and source) -->
      <plugin>
        <groupId>org.revapi</groupId>
        <artifactId>revapi-maven-plugin</artifactId>
        <!-- Lock down plugin version for build reproducibility -->
        <version>0.9.5</version>
        <dependencies>
          <dependency>
            <groupId>org.revapi</groupId>
            <artifactId>revapi-java</artifactId>
            <version>0.14.4</version>
          </dependency>
          <dependency>
            <groupId>org.revapi</groupId>
            <artifactId>revapi-reporter-text</artifactId>
            <version>0.8.1</version>
          </dependency>
        </dependencies>
        <configuration>
          <failSeverity>breaking</failSeverity>
          <alwaysCheckForReleaseVersion>false</alwaysCheckForReleaseVersion>
          <oldVersion>LATEST</oldVersion>
          <analysisConfigurationFiles>
            <file>${project.basedir}/revapi.json</file>
          </analysisConfigurationFiles>
        </configuration>
      </plugin>

      <plugin>
            <groupId>org.pitest</groupId>
            <artifactId>pitest-maven</artifactId>
            <!--           We use the latest, so we don't specify an actual version number       -->
            <!--          <version></version>-->
      </plugin>
    </plugins>


    <pluginManagement>
      <plugins>
        <!--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-dependency-plugin
                    </artifactId>
                    <versionRange>
                      [2.8,)
                    </versionRange>
                    <goals>
                      <goal>
                        copy-dependencies
                      </goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.0.0-M1</version>
        </plugin>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <configuration>
            <header>LICENSE-short.txt</header>
            <basedir>src</basedir>
            <includes>
              <include>main/java/**</include>
              <!-- We also want to check the license in templates to generate files with the proper header -->
              <include>test/java/spoon/generating/clone/*</include>
            </includes>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

      </plugins>
    </pluginManagement>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
         <artifactId>wagon-ssh</artifactId>
      </extension>
    </extensions>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.9</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.0.0-M1</version>
        <configuration>
          <quiet>true</quiet>
          <additionalparam>-Xdoclint:none</additionalparam>
          <!--maven-javadoc-plugin version 2.9 onwards uses additionalJOption, see https://stackoverflow.com/questions/39616344/how-to-disable-javadoc-warnings-in-maven-javadoc-plugin/48511911#48511911 -->
          <additionalJOption>-Xdoclint:none</additionalJOption>
      </configuration>
        <reportSets>
          <reportSet>
            <id>html</id>
            <reports>
              <report>javadoc</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>coveralls</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.eluder.coveralls</groupId>
            <artifactId>coveralls-maven-plugin</artifactId>
            <version>4.3.0</version>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.3</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.0.0-M1</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.5</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
