<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>org.scalastyle</groupId>
 <artifactId>scalastyle-maven-plugin</artifactId>
 <packaging>maven-plugin</packaging>
 <version>0.8.0</version>
 <name>Scalastyle Maven Plugin</name>
 <description>Integrates Scalastyle style checker for Scala with maven</description>
 <inceptionYear>2012</inceptionYear>

 <prerequisites>
  <maven>${maven.version}</maven>
 </prerequisites>

 <properties>
  <scalastyle.artifactId>scalastyle_2.11</scalastyle.artifactId>
  <scalastyle.version>0.8.0</scalastyle.version>
  <maven.version>3.0</maven.version>
  <maven.compiler.source>1.5</maven.compiler.source>
  <maven.compiler.target>1.5</maven.compiler.target>
  <junit.version>4.11</junit.version>
 </properties>

 <dependencies>
  <dependency>
   <groupId>org.scalastyle</groupId>
   <artifactId>${scalastyle.artifactId}</artifactId>
   <version>${scalastyle.version}</version>
  </dependency>

  <dependency>
   <groupId>org.apache.maven</groupId>
   <artifactId>maven-plugin-api</artifactId>
   <version>${maven.version}</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.apache.maven</groupId>
   <artifactId>maven-core</artifactId>
   <version>${maven.version}</version>
   <scope>provided</scope>
  </dependency>
  <dependency>
   <groupId>org.codehaus.plexus</groupId>
   <artifactId>plexus-resources</artifactId>
   <version>1.0-alpha-7</version>
  </dependency>

  <dependency>
   <groupId>junit</groupId>
   <artifactId>junit</artifactId>
   <version>${junit.version}</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>

 </dependencies>

 <build>
  <plugins>
   <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-plugin-plugin</artifactId>
    <version>3.2</version>
    <configuration>
     <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
    </configuration>
    <executions>
     <execution>
      <id>mojo-descriptor</id>
      <goals>
       <goal>descriptor</goal>
      </goals>
     </execution>
     <execution>
      <id>help-goal</id>
      <goals>
       <goal>helpmojo</goal>
      </goals>
     </execution>
    </executions>
   </plugin>
   <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>2.3.2</version>
    <configuration>
     <source>1.5</source>
     <target>1.5</target>
     <encoding>UTF-8</encoding>
    </configuration>
   </plugin>
   <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-source-plugin</artifactId>
    <version>2.1.2</version>
    <executions>
     <execution>
      <id>attach-sources</id>
      <phase>verify</phase>
      <goals>
       <goal>jar-no-fork</goal>
      </goals>
     </execution>
    </executions>
   </plugin>
   <plugin>
    <artifactId>maven-invoker-plugin</artifactId>
    <version>1.5</version>
    <configuration>
     <settingsFile>src/it/settings.xml</settingsFile>
     <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
     <debug>false</debug>
     <streamLogs>true</streamLogs>
     <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
     <properties>
      <src.it>${basedir}/src/it</src.it>
     </properties>

     <projectsDirectory>src/it</projectsDirectory>
     <pomIncludes>
      <pomInclude>**/pom.xml</pomInclude>
     </pomIncludes>
     <preBuildHookScript>setup.groovy</preBuildHookScript>
     <postBuildHookScript>validate.groovy</postBuildHookScript>
    </configuration>
    <executions>
     <execution>
      <id>integration-test</id>
      <goals>
       <goal>install</goal>
       <goal>run</goal>
      </goals>
     </execution>
    </executions>
   </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-enforcer-plugin</artifactId>
          <versionRange>[1.0,)</versionRange>
          <goals>
           <goal>enforce</goal>
          </goals>
         </pluginExecutionFilter>
         <action>
          <ignore />
         </action>
        </pluginExecution>
        <pluginExecution>
         <pluginExecutionFilter>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <versionRange>[3.2,)</versionRange>
          <goals>
           <goal>descriptor</goal>
           <goal>helpmojo</goal>
          </goals>
         </pluginExecutionFilter>
         <action>
          <ignore></ignore>
         </action>
        </pluginExecution>
       </pluginExecutions>
      </lifecycleMappingMetadata>
     </configuration>
    </plugin>
   </plugins>
  </pluginManagement>
 </build>

 <profiles>
  <profile>
   <id>release-sign-artifacts</id>
   <activation>
    <property>
     <name>performRelease</name>
     <value>true</value>
    </property>
   </activation>
   <build>
    <plugins>
     <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-gpg-plugin</artifactId>
      <version>1.1</version>
      <executions>
       <execution>
        <id>sign-artifacts</id>
        <phase>verify</phase>
        <goals>
         <goal>sign</goal>
        </goals>
       </execution>
      </executions>
     </plugin>
    </plugins>
   </build>
  </profile>
  <profile>
   <id>scalastyle-test</id>
   <build>
    <plugins>
     <plugin>
      <groupId>org.scalastyle</groupId>
      <artifactId>scalastyle-maven-plugin</artifactId>
      <version>${project.version}</version>
      <configuration>
       <verbose>false</verbose>
       <failOnViolation>true</failOnViolation>
       <includeTestSourceDirectory>true</includeTestSourceDirectory>
       <failOnWarning>false</failOnWarning>
       <sourceDirectory>${basedir}/../../spray</sourceDirectory>
       <testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory>
       <configLocation>${basedir}/build-tools/scalastyle_config.xml</configLocation>
       <outputFile>${project.build.directory}/scalastyle-output.xml</outputFile>
       <outputEncoding>UTF-8</outputEncoding>
      </configuration>
      <executions>
       <execution>
        <goals>
         <goal>check</goal>
        </goals>
       </execution>
      </executions>
     </plugin>
    </plugins>
   </build>
  </profile>
 </profiles>

 <url>http://www.scalastyle.org</url>
 <organization>
  <name>Scalastyle Organization</name>
  <url>https://github.com/scalastyle</url>
 </organization>
 <scm>
  <connection>scm:git:git@github.com:scalastyle/scalastyle-maven-plugin.git</connection>
  <url>scm:git:git@github.com:scalastyle/scalastyle-maven-plugin.git</url>
  <developerConnection>scm:git:git@github.com:scalastyle/scalastyle-maven-plugin.git</developerConnection>
 </scm>
 <issueManagement>
  <system>Github</system>
  <url>https://github.com/scalastyle/scalastyle-maven-plugin/issues</url>
 </issueManagement>
 <licenses>
  <license>
   <name>Apache 2.0</name>
   <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
   <distribution>repo</distribution>
  </license>
 </licenses>
 <developers>
  <developer>
   <id>matthewfarwell</id>
   <name>Matthew Farwell</name>
   <url>http://www.farwell.co.uk</url>
  </developer>
  <developer>
   <id>dasbh</id>
   <name>Bhagavan Das</name>
  </developer>
 </developers>
</project>
