<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.11</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>
      <tag>lint-maven-plugin-0.0.11</tag>
  </scm>

    <distributionManagement>
        <site>
            <id>lint-maven-plugin-site</id>
            <name>lint-maven-plugin site on lewisd.com</name>
            <url>scp://lewisd@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>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <it.extra.maven.opts />
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>3.4</version>
            <!-- annotations are not needed for plugin execution so you can remove this dependency
                 for execution with using provided scope -->
            <scope>provided</scope>
        </dependency>
        <!-- generated help mojo has a dependency to plexus-utils -->
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>3.0.22</version>
        </dependency>
        <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.12</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.8</version>
        </dependency>
        <dependency>
            <groupId>org.jdom</groupId>
            <artifactId>jdom</artifactId>
            <version>2.0.2</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>
        <!-- Log4j is still needed for Spring to log -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</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>18.0</version>
        </dependency>
        <dependency>
            <groupId>org.easytesting</groupId>
            <artifactId>fest-assert-core</artifactId>
            <version>2.0M10</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-validator</groupId>
            <artifactId>commons-validator</artifactId>
            <version>1.4.1</version>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>1.9.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-testing</groupId>
            <artifactId>maven-plugin-testing-harness</artifactId>
            <version>3.3.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-embedder</artifactId>
            <version>${maven.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.sonatype.aether</groupId>
            <artifactId>aether-connector-wagon</artifactId>
            <version>1.13.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-http</artifactId>
            <version>2.9</version>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                    <configuration>
                        <source>1.6</source>
                        <target>1.6</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-invoker-plugin</artifactId>
                    <version>1.8</version>
                </plugin>
                <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.3</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>
                                <version>2.17</version>
                            </plugin>
                            <plugin>
                                <artifactId>maven-plugin-plugin</artifactId>
                            </plugin>
                        </reportPlugins>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.wagon</groupId>
                            <artifactId>wagon-ssh</artifactId>
                            <version>2.9</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>com.lewisd</groupId>
                <artifactId>lint-maven-plugin</artifactId>
                <version>0.0.10</version>
                <executions>
                    <execution>
                        <id>pom-lint</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.15</version>
                <executions>
                    <execution>
                        <id>checkstyle</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>validate</phase>
                    </execution>
                </executions>
                <configuration>
                    <configLocation>src/main/resources/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>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.2</version>
                <configuration>
                    <!-- see http://jira.codehaus.org/browse/MNG-5346 -->
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                </configuration>
                <executions>
                    <execution>
                        <id>mojo-descriptor</id>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>generated-helpmojo</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.17</version>
                <configuration>
                    <parallel>classes</parallel>
                    <threadCount>4</threadCount>
                    <includes>
                        <include>**/*IT.java</include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <id>run-it-tests</id>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <id>run-its</id>
            <build>
                <defaultGoal>verify</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>mrm-maven-plugin</artifactId>
                        <version>1.0-beta-2</version>
                        <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.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
