<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>com.lewisd</groupId>
  <artifactId>lint-maven-plugin</artifactId>
  <version>0.0.6</version>
  <packaging>maven-plugin</packaging>

  <name>Maven POM lint plugin</name>
  <description>Generates a report of suspicious/inconsistent POM elements, and optionally fails the build if violations are found.</description>

  <url>https://github.com/lewisd32/lint-maven-plugin</url>

  <licenses>
  	<license>
  	  <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
  	</license>
  </licenses>

  <scm>
    <url>https://github.com/lewisd32/lint-maven-plugin</url>
    <connection>scm:git:git@github.com:lewisd32/lint-maven-plugin.git</connection>
    <developerConnection>scm:git:git@github.com:lewisd32/lint-maven-plugin.git</developerConnection>
  </scm>
  
  <distributionManagement>
    <site>
      <id>lint-maven-plugin-site</id>
      <name>lint-maven-plugin site on lewisd.com</name>
      <url>scp://lewisd.com:/home/lewisd/public_html/lewisd.com/docs/projects/lint-maven-plugin</url>
    </site>
  </distributionManagement>  
  
  <inceptionYear>2012</inceptionYear>
  
  <developers>
    <developer>
      <id>lewisd32</id>
      <name>Derek Lewis</name>
      <email>github@lewisd.com</email>
    </developer>
  </developers>
  
  <prerequisites>
    <maven>3.0.0</maven>
  </prerequisites>
  
  <properties>
    <maven.version>3.0</maven.version>
    <spring.version>3.1.1.RELEASE</spring.version>
    
    <it.extra.maven.opts />
  </properties>
  
  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${maven.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model-builder</artifactId>
      <version>${maven.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${maven.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-compat</artifactId>
      <version>${maven.version}</version>
    </dependency>
    
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-core</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
      <version>${spring.version}</version>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.10</version>
      <scope>test</scope>
    </dependency>
    <dependency>
    	<groupId>org.jmock</groupId>
    	<artifactId>jmock</artifactId>
    	<version>2.5.1</version>
    	<scope>test</scope>
    </dependency>
    <dependency>
    	<groupId>org.jmock</groupId>
    	<artifactId>jmock-junit4</artifactId>
    	<version>2.5.1</version>
    </dependency>

    <dependency>
      <groupId>com.thoughtworks.xstream</groupId>
      <artifactId>xstream</artifactId>
      <version>1.4.2</version>
    </dependency>
    <dependency>
      <groupId>org.jdom</groupId>
      <artifactId>jdom</artifactId>
      <version>2.0.0</version>
    </dependency>
    <dependency>
      <groupId>org.jdom</groupId>
      <artifactId>jaxen-jdom</artifactId>
      <version>1.0-FCS</version>
    </dependency>
    <dependency>
      <groupId>org.jdom</groupId>
      <artifactId>jaxen-core</artifactId>
      <version>1.0-FCS</version>
    </dependency>
    <dependency>
      <groupId>org.jdom</groupId>
      <artifactId>saxpath</artifactId>
      <version>1.0-FCS</version>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.14</version>
    </dependency>
    <dependency>
      <groupId>com.google.collections</groupId>
      <artifactId>google-collections</artifactId>
      <version>1.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.velocity</groupId>
      <artifactId>velocity</artifactId>
      <version>1.7</version>
    </dependency>
    <dependency>
      <groupId>org.apache.velocity</groupId>
      <artifactId>velocity-tools</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
      <groupId>commons-jxpath</groupId>
      <artifactId>commons-jxpath</artifactId>
      <version>1.3</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>12.0</version>
    </dependency>
  </dependencies>
  
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
        	<artifactId>maven-compiler-plugin</artifactId>
        	<configuration>
        		<source>1.6</source>
        		<target>1.6</target>
        	</configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>mrm-maven-plugin</artifactId>
	        <version>1.0-alpha-1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-invoker-plugin</artifactId>
          <version>1.5</version>
        </plugin>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.1</version>
          <configuration>
            <reportPlugins>
              <plugin>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                  <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                  <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
                </configuration>
              </plugin>
              <plugin>
                <artifactId>maven-surefire-report-plugin</artifactId>
              </plugin>
              <plugin>
                <artifactId>maven-plugin-plugin</artifactId>
              </plugin>
            </reportPlugins>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.wagon</groupId>
              <artifactId>wagon-ssh</artifactId>
              <version>1.0-beta-7</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.2.1</version>
        </plugin>
      </plugins>
    </pluginManagement>
  
    <plugins>
    <!-- 
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.9.1</version>
        <executions>
          <execution>
            <id>checkstyle</id>
            <goals>
              <goal>check</goal>
            </goals>
            <phase>verify</phase>
          </execution>
        </executions>
        <configuration>
          <configLocation>config/checkstyle.xml</configLocation>
        </configuration>
      </plugin>
    -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <configuration>
            <!-- Workaround for CENTRALSRV-35 -->
            <arguments>-Psonatype-oss-release ${arguments}</arguments>
          </configuration>
        </plugin>
    </plugins>
  </build>
  
  <profiles>
    <profile>
      <id>run-its</id>
      <build>
        <defaultGoal>verify</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>mrm-maven-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>start</goal>
                  <goal>stop</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <propertyName>repository.proxy.url</propertyName>
              <repositories>
                <mockRepo>
                  <source>src/it-repo</source>
                </mockRepo>
                <proxyRepo />
              </repositories>
            </configuration>
          </plugin>
          <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>
                <configuration>
                  <streamLogs>false</streamLogs>
                  <debug>true</debug>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <projectsDirectory>src/it</projectsDirectory>
              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
              <settingsFile>src/it/settings.xml</settingsFile>
              <showErrors>true</showErrors>
              <streamLogs>true</streamLogs>
              <pomIncludes>
                <pomInclude>*/pom.xml</pomInclude>
              </pomIncludes>
              <postBuildHookScript>verify.bsh</postBuildHookScript>
              <filterProperties>
                <repository.proxy.url>${repository.proxy.url}</repository.proxy.url>
              </filterProperties>
              <mavenOpts>-Xmx256m ${it.extra.maven.opts}</mavenOpts>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>debug-its</id>
      <properties>
        <it.extra.maven.opts>-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000</it.extra.maven.opts>
      </properties>
    </profile>
    <profile>
      <id>gpg-sign-release-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.4</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  
</project>
