<?xml version="1.0"?>
<!--
 *
 * Copyright (c) 2011-2016, Qulice.com
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met: 1) Redistributions of source code must retain the above
 * copyright notice, this list of conditions and the following
 * disclaimer. 2) Redistributions in binary form must reproduce the above
 * copyright notice, this list of conditions and the following
 * disclaimer in the documentation and/or other materials provided
 * with the distribution. 3) Neither the name of the Qulice.com nor
 * the names of its contributors may be used to endorse or promote
 * products derived from this software without specific prior written
 * permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * @version $Id$
 -->
<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>com.qulice</groupId>
        <artifactId>qulice</artifactId>
        <version>0.17.1</version>
    </parent>
    <artifactId>qulice-maven-plugin</artifactId>
    <packaging>maven-plugin</packaging>
    <name>qulice-maven-plugin</name>
    <properties>
        <maven.version>3.0.5</maven.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>com.qulice</groupId>
            <artifactId>qulice-spi</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>3.3</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.qulice</groupId>
            <artifactId>qulice-checkstyle</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.reporting</groupId>
            <artifactId>maven-reporting-exec</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>com.qulice</groupId>
            <artifactId>qulice-pmd</artifactId>
            <version>${project.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>ant</groupId>
                    <artifactId>ant</artifactId>
                </exclusion>
                <exclusion>
                    <!-- http://jira.codehaus.org/browse/MPLUGIN-221 -->
                    <groupId>com.ibm.icu</groupId>
                    <artifactId>icu4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xerces</groupId>
                    <artifactId>xmlParserAPIs</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>net.java.dev.javacc</groupId>
                    <artifactId>javacc</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>2.0.3</version>
        </dependency>
        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xmlParserAPIs</artifactId>
            <version>2.6.2</version>
        </dependency>
        <dependency>
            <groupId>com.qulice</groupId>
            <artifactId>qulice-codenarc</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.qulice</groupId>
            <artifactId>qulice-findbugs</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.qulice</groupId>
            <artifactId>qulice-xml</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
        </dependency>
        <dependency>
            <groupId>com.jcabi</groupId>
            <artifactId>jcabi-log</artifactId>
        </dependency>
        <dependency>
            <groupId>com.jcabi</groupId>
            <artifactId>jcabi-xml</artifactId>
        </dependency>
        <dependency>
            <!-- Forward all calls to SLF4J to Maven log. -->
            <groupId>com.jcabi</groupId>
            <artifactId>jcabi-maven-slf4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${maven.version}</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</artifactId>
            <version>${maven.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>${maven.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-dependency-analyzer</artifactId>
            <version>1.5</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-project</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-artifact-manager</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-testing</groupId>
            <artifactId>maven-plugin-testing-harness</artifactId>
            <version>3.1.0</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>3.0.17</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-container-default</artifactId>
            <version>1.5.5</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.sonatype.sisu</groupId>
            <artifactId>sisu-inject-plexus</artifactId>
            <version>2.6.0</version>
            <scope>runtime</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>5.0.0.Final</version>
            <scope>runtime</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-compile</id>
                        <configuration>
                            <excludes>
                                <exclude>**/HelpMojo.java</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>default-testCompile</id>
                        <configuration>
                            <compilerArgument>-Xlint:-processing</compilerArgument>
                        </configuration>
                    </execution>
                    <execution>
                        <id>compile-helpmojo</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <includes>
                                <include>**/HelpMojo.java</include>
                            </includes>
                            <compilerArgument>-Xlint:-unchecked,-rawtypes</compilerArgument>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>helpmojo</goal>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-invoker-plugin</artifactId>
                <configuration combine.children="append">
                    <mergeUserSettings>true</mergeUserSettings>
                    <!--
                    With this construct you can exclude certain IT projects.
                    -->
                    <pomIncludes>
                        <pomInclude>checkstyle-exceptions/pom.xml</pomInclude>
                        <pomInclude>checkstyle-violations/pom.xml</pomInclude>
                        <pomInclude>checkstyle-newlines/pom.xml</pomInclude>
                        <pomInclude>checkstyle-locale/pom.xml</pomInclude>
                        <pomInclude>pmd-violations/pom.xml</pomInclude>
                        <pomInclude>codenarc-violations/pom.xml</pomInclude>
                        <pomInclude>findbugs-exclude/pom.xml</pomInclude>
                        <pomInclude>findbugs-violations/pom.xml</pomInclude>
                        <pomInclude>dependency-violations/pom.xml</pomInclude>
                        <pomInclude>dependency-violations-exclude/pom.xml</pomInclude>
                        <pomInclude>multi-module/pom.xml</pomInclude>
                        <pomInclude>multi-run/pom.xml</pomInclude>
                        <pomInclude>relocation/pom.xml</pomInclude>
                        <pomInclude>pom-xpath-validator-violations</pomInclude>
                        <pomInclude>duplicate-finder-violations</pomInclude>
                        <!--<pomInclude>duplicate-finder-ignore-deps</pomInclude>-->
                        <pomInclude>js-violations/pom.xml</pomInclude>
                        <pomInclude>xml-violations/pom.xml</pomInclude>
                        <pomInclude>log-check/pom.xml</pomInclude>
                        <pomInclude>hibernate-validator-check/pom.xml</pomInclude>
                        <pomInclude>pmd-duplicate-string-literals-violations/pom.xml</pomInclude>
                        <pomInclude>dependency-not-matches-exclude/pom.xml</pomInclude>
                        <pomInclude>findbugs-bed-bogus-exception-declaration/pom.xml</pomInclude>
                    </pomIncludes>
                    <extraArtifacts>
                        <extraArtifact>${project.groupId}:qulice-checkstyle:${project.version}:jar</extraArtifact>
                        <extraArtifact>${project.groupId}:qulice-codenarc:${project.version}:jar</extraArtifact>
                        <extraArtifact>${project.groupId}:qulice-findbugs:${project.version}:jar</extraArtifact>
                        <extraArtifact>${project.groupId}:qulice-pmd:${project.version}:jar</extraArtifact>
                        <extraArtifact>${project.groupId}:qulice-spi:${project.version}:jar</extraArtifact>
                        <extraArtifact>${project.groupId}:qulice-xml:${project.version}:jar</extraArtifact>
                    </extraArtifacts>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>${project.groupId}</groupId>
                        <artifactId>qulice-checkstyle</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>${project.groupId}</groupId>
                        <artifactId>qulice-codenarc</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>${project.groupId}</groupId>
                        <artifactId>qulice-findbugs</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>${project.groupId}</groupId>
                        <artifactId>qulice-pmd</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>${project.groupId}</groupId>
                        <artifactId>qulice-spi</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>${project.groupId}</groupId>
                        <artifactId>qulice-xml</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>com.github.github</groupId>
                <artifactId>site-maven-plugin</artifactId>
                <configuration>
                    <path>${project.artifactId}</path>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>qulice</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.qulice</groupId>
                        <artifactId>qulice-maven-plugin</artifactId>
                        <configuration>
                            <excludes combine.children="append">
                                <!-- generated class -->
                                <exclude>findbugs:com.qulice.maven.HelpMojo</exclude>
                                <exclude>checkstyle:/src/it/.*</exclude>
                                <exclude>pmd:.*/src/it/.*</exclude>
                                <exclude>xml:/src/it/.*</exclude>
                                <exclude>duplicatefinder:.*</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
