<?xml version="1.0"?>
<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>
    
    <groupId>top.marchand.xml</groupId>
    <artifactId>xsl-doc</artifactId>
    <version>1.7</version>
    <packaging>jar</packaging>
    
    <name>xsl-doc</name>
    
    <url>https://github.com/cmarchand/xsl-doc</url>
    
    <description>A project to generate documentation from a XSL</description>
    
    <developers>
        <developer>
            <name>Christophe Marchand</name>
            <email>christophe@marchand.top</email>
            <roles>
                <role>developer</role>
                <role>project owner</role>
            </roles>
            <timezone>UTC+1</timezone>
            <url>https://github.com/cmarchand/</url>
        </developer>
    </developers>
    
    <inceptionYear>2016</inceptionYear>
    
    <scm>
        <connection>scm:git:https://github.com/cmarchand/xsl-doc.git</connection>
        <url>scm:git:https://github.com/cmarchand/xsl-doc.git</url>
        <developerConnection>scm:git:git@github.com:cmarchand/xsl-doc.git</developerConnection>
    </scm>
    
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <licenses>
        <license>
            <name>MPL 2.0</name>
            <url>https://www.mozilla.org/en-US/MPL/2.0/</url>
        </license>
    </licenses>
    
    <dependencies>
        <dependency>
            <groupId>top.marchand.xml</groupId>
            <artifactId>gaulois-pipe</artifactId>
            <version>1.01.07</version>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/xsl</directory>
                <filtering>false</filtering>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>io.xspec.maven</groupId>
                <artifactId>xspec-maven-plugin</artifactId>
                <version>1.5.0</version>
                <dependencies>
                    <dependency>
                        <groupId>net.sf.saxon</groupId>
                        <artifactId>Saxon-HE</artifactId>
                        <version>9.7.0-1</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <generateSurefireReport>true</generateSurefireReport>
                </configuration>
                <executions>
                    <execution>
                        <phase>test</phase>
                        <goals>
                            <goal>run-xspec</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <execution>
                        <phase>clean</phase>
                        <configuration>
                            <target>
                                <delete file="catalog.xml"/>
                                <delete dir="debug"/>
                            </target>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.5.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <executable>java</executable>
                    <longClasspath>true</longClasspath>
                    <arguments>
                        <argument>-Dgaulois.debug.dir=debug</argument>
                        <argument>-classpath</argument>
                        <classpath/>
                        <argument>top.marchand.xml.xsl.doc.GauloisPipeRunner</argument>
                        <argument>${project.name}</argument>
                        <argument>fr.efl.chaine.xslt.GauloisPipe</argument>
                        <argument>--config</argument>
                        <argument>cp:/xsl-doc_gp.xml</argument>
                        <argument>--instance-name</argument>
                        <argument>XSL-DOC</argument>
                        <argument>PARAMS</argument>
                        <argument>outputFolder=file:${project.build.directory}/generated-test-files</argument>
                        <argument>sources=src/test/run</argument>
                        <argument>basedir=${basedir}</argument>
                    </arguments>
                </configuration>
            </plugin>
            <!--plugin>
                <groupId>top.marchand.xml</groupId>
                <artifactId>xslDoc-maven-plugin</artifactId>
                <version>0.2-SNAPSHOT</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>xsl-doc</goal>
                        </goals>
                        <configuration>
                            <keepConfigFile>false</keepConfigFile>
                            <xslDirectories>
                                <xslDirectory>src/main/xsl</xslDirectory>
                                <xslDirectory>src/main/resources</xslDirectory>
                            </xslDirectories>
                        </configuration>
                    </execution>
                </executions>
            </plugin-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    
    <!--reporting>
        <plugins>
            <plugin>
                <groupId>top.marchand.xml</groupId>
                <artifactId>xslDoc-maven-plugin</artifactId>
                <version>0.1-SNAPSHOT</version>
            </plugin>
        </plugins>
    </reporting-->
</project>
