<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.buschmais.jqassistant</groupId>
        <artifactId>jqassistant</artifactId>
        <version>1.0.0-M3</version>
    </parent>
    <groupId>com.buschmais.jqassistant.plugin</groupId>
    <artifactId>jqassistant.plugin</artifactId>
    <packaging>pom</packaging>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.7</version>
                    <executions>
                        <execution>
                            <id>copy-asciidoc-stylesheets</id>
                            <goals>
                                <goal>copy-dependencies</goal>
                            </goals>
                            <phase>initialize</phase>
                            <configuration>
                                <outputDirectory>${project.build.directory}/xml2asciidoc</outputDirectory>
                                <includeTypes>xsl</includeTypes>
                                <includeClassifiers>rules2asciidoc,plugin2asciidoc</includeClassifiers>
                                <stripVersion>true</stripVersion>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>xml-maven-plugin</artifactId>
                    <version>1.0</version>
                    <executions>
                        <execution>
                            <id>transform-xml2asciidoc</id>
                            <goals>
                                <goal>transform</goal>
                            </goals>
                            <phase>process-sources</phase>
                            <configuration>
                                <transformationSets>
                                    <transformationSet>
                                        <dir>src/main/resources/META-INF</dir>
                                        <includes>
                                            <include>jqassistant-plugin.xml</include>
                                        </includes>
                                        <stylesheet>
                                            ${project.build.directory}/xml2asciidoc/jqassistant.plugin.common-plugin2asciidoc.xsl
                                        </stylesheet>
                                        <outputDir>${project.build.directory}/generated-sources/asciidoc</outputDir>
                                        <fileMappers>
                                            <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
                                                <pattern>^jqassistant-plugin\.xml$</pattern>
                                                <replacement>plugin.adoc</replacement>
                                            </fileMapper>
                                        </fileMappers>
                                        <parameters>
                                            <parameter>
                                                <name>pluginName</name>
                                                <value>${project.artifactId}</value>
                                            </parameter>
                                        </parameters>
                                    </transformationSet>
                                    <transformationSet>
                                        <dir>src/main/resources/META-INF/jqassistant-rules</dir>
                                        <includes>
                                            <include>*.xml</include>
                                        </includes>
                                        <stylesheet>
                                            ${project.build.directory}/xml2asciidoc/jqassistant.plugin.common-rules2asciidoc.xsl
                                        </stylesheet>
                                        <outputDir>${project.build.directory}/generated-sources/asciidoc</outputDir>
                                        <fileMappers>
                                            <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.RegExpFileMapper">
                                                <pattern>^(.*)\.xml$</pattern>
                                                <replacement>$1.xml.adoc</replacement>
                                            </fileMapper>
                                        </fileMappers>
                                    </transformationSet>
                                </transformationSets>
                            </configuration>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>net.sf.saxon</groupId>
                            <artifactId>saxon</artifactId>
                            <version>8.7</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.codehaus.mojo</groupId>
                                        <artifactId>xml-maven-plugin</artifactId>
                                        <versionRange>[1.0.0,)</versionRange>
                                        <goals>
                                            <goal>transform</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.buschmais.jqassistant.plugin</groupId>
                <artifactId>jqassistant.plugin.ejb3</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.buschmais.jqassistant.plugin</groupId>
                <artifactId>jqassistant.plugin.jaxrs</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.buschmais.jqassistant.plugin</groupId>
                <artifactId>jqassistant.plugin.jpa2</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.buschmais.jqassistant.plugin</groupId>
                <artifactId>jqassistant.plugin.junit4</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.buschmais.jqassistant.plugin</groupId>
                <artifactId>jqassistant.plugin.osgi</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.buschmais.jqassistant.plugin</groupId>
                <artifactId>jqassistant.plugin.maven3</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.buschmais.jqassistant.plugin</groupId>
                <artifactId>jqassistant.plugin.tycho</artifactId>
                <version>${project.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <modules>
        <module>bom</module>
        <module>common</module>
        <module>java</module>
        <module>java8</module>
        <module>jpa2</module>
        <module>ejb3</module>
        <module>jaxrs</module>
        <module>javaee6</module>
        <module>junit4</module>
        <module>maven3</module>
        <module>osgi</module>
        <module>tycho</module>
    </modules>

</project>