<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>com.danidemi</groupId>
    <artifactId>template-generator-maven-plugin</artifactId>
    <version>0.0.7</version>
    <packaging>maven-plugin</packaging>

    <name>template-generator-maven-plugin</name>
    <description>Generates code and text content merging data from CSV files with a Velocity template.</description>
    <url>https://github.com/danidemi/template-generator-maven-plugin</url>
    <inceptionYear>2017</inceptionYear>
    <organization>
        <name>Studio DaniDemi</name>
        <url>http://danidemi.com</url>
    </organization>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Daniele Demichelis</name>
            <email>demichelis@danidemi.com</email>
            <organization>Studio DaniDemi</organization>
            <organizationUrl>http://www.danidemi.com</organizationUrl>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:https://github.com/danidemi/template-generator-maven-plugin</connection>
        <developerConnection>scm:git:https://github.com/danidemi/template-generator-maven-plugin</developerConnection>
        <url>https://github.com/danidemi/template-generator-maven-plugin</url>
        <tag>HEAD</tag>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <javaVersion>1.7</javaVersion>
        <maven.compiler.source>${javaVersion}</maven.compiler.source>
        <maven.compiler.target>${javaVersion}</maven.compiler.target>
        <mavenVersion>3.3.9</mavenVersion>
        <mavenPluginPluginVersion>3.3</mavenPluginPluginVersion>
        <juel-api.version>2.2.7</juel-api.version>
    </properties>

    <dependencies>

        <!-- MAVEN -->
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>3.2</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>3.3.3</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>3.3.3</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-testing</groupId>
            <artifactId>maven-plugin-testing-harness</artifactId>
            <version>3.3.0</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-compat</artifactId>
            <version>3.3.3</version>
            <scope>test</scope>
        </dependency>
        <!-- MAVEN -->

        <!-- JUEL -->
        <dependency>
            <groupId>de.odysseus.juel</groupId>
            <artifactId>juel-api</artifactId>
            <version>${juel-api.version}</version>
        </dependency>
        <dependency>
            <groupId>de.odysseus.juel</groupId>
            <artifactId>juel-impl</artifactId>
            <version>${juel-api.version}</version>
        </dependency>
        <!-- JUEL -->


        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity</artifactId>
            <version>1.7</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-csv</artifactId>
            <version>1.4</version>
        </dependency>
    </dependencies>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <build>
        <plugins>


            <!-- Controls Nexus Staging workflow. -->
            <!-- Doc:    https://github.com/sonatype/nexus-maven-plugins/tree/master/staging/maven-plugin -->
            <!-- Latest: https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.sonatype.plugins%22%20AND%20a%3A%22nexus-staging-maven-plugin%22 -->
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.8</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>

            <!--
            mvn org.pitest:pitest-maven:mutationCoverage
            -->
            <plugin>
                <groupId>org.pitest</groupId>
                <artifactId>pitest-maven</artifactId>
                <version>1.1.11</version>
            </plugin>



            <!--
            <plugin>
                <groupId>${project.groupId}</groupId>
                <artifactId>${project.artifactId}</artifactId>
                <version>${project.version}</version>
            </plugin>
            -->
            <!--
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.5</version>
                <configuration>
                    <goalPrefix>template-generator</goalPrefix>
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                </configuration>
                <executions>
                    <execution>
                        <id>mojo-descriptor</id>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>help-goal</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            -->

            <!-- https://maven.apache.org/plugin-tools/maven-plugin-plugin -->
            <!-- Extract Maven descriptor file from Mojo annotations. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.5</version>
                <executions>
                    <execution>
                        <id>default-descriptor</id>
                        <phase>process-classes</phase>
                    </execution>
                    <!-- if you want to generate help goal -->
                    <!--
                    <execution>
                        <id>help-goal</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                    -->
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.4.1</version>
                <executions>
                    <execution>
                        <id>enforce-java-7</id>
                        <goals>
                            <goal>display-info</goal>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <message>This project should be compiled on JDK 1.7</message>
                                    <version>[1.7.0,1.8.0)</version>
                                </requireJavaVersion>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>
    <profiles>
        <profile>
            <id>release</id>

            <build>
                <plugins>

                    <!-- Manages the license of a maven project. -->
                    <!-- Doc:    http://www.mojohaus.org/license-maven-plugin/index.html -->
                    <!-- Latest: https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.codehaus.mojo%22%20AND%20a%3A%22license-maven-plugin%22 -->
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <version>1.12</version>
                        <configuration>
                            <verbose>false</verbose>
                            <addSvnKeyWords>true</addSvnKeyWords>
                        </configuration>
                        <executions>
                            <execution>
                                <id>first</id>
                                <goals>
                                    <goal>update-file-header</goal>
                                </goals>
                                <phase>process-sources</phase>
                                <configuration>
                                    <!--
                                    * agpl_v3   : GNU Affero General Public License (AGPL) version 3.0
                                    * apache_v2 : Apache License version 2.0
                                    * bsd_2     : BSD 2-Clause License
                                    * bsd_3     : BSD 3-Clause License
                                    * cddl_v1   : COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
                                    * epl_v1    : Eclipse Public License - v 1.0
                                    * eupl_v1_1 : European Union Public License v1.1
                                    * fdl_v1_3  : GNU Free Documentation License (FDL) version 1.3
                                    * gpl_v1    : GNU General Public License (GPL) version 1.0
                                    * gpl_v2    : GNU General Public License (GPL) version 2.0
                                    * gpl_v3    : GNU General Public License (GPL) version 3.0
                                    * lgpl_v2_1 : GNU General Lesser Public License (LGPL) version 2.1
                                    * lgpl_v3   : GNU General Lesser Public License (LGPL) version 3.0
                                    * mit       : MIT-License
                                    -->
                                    <licenseName>apache_v2</licenseName>
                                    <roots>
                                        <root>src/main/java</root>
                                        <root>src/test/java</root>
                                    </roots>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- https://maven.apache.org/plugins/maven-source-plugin/ -->
                    <!-- Creates a jar archive of the source files of the current project. -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- https://maven.apache.org/plugins/maven-javadoc-plugin/ -->
                    <!-- Uses javadoc to generate project documentation. -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- https://maven.apache.org/plugins/maven-gpg-plugin/ -->
                    <!-- Signs all of the project's attached artifacts with GnuPG -->
                    <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>
        <!--
        <profile>
            <id>run-its</id>
            <build>

                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-invoker-plugin</artifactId>
                        <version>2.0.0</version>
                        <configuration>
                            <debug>true</debug>
                            <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                            <pomIncludes>
                                <pomInclude>*/pom.xml</pomInclude>
                            </pomIncludes>
                            <postBuildHookScript>verify</postBuildHookScript>
                            <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
                            <settingsFile>src/it/settings.xml</settingsFile>
                            <goals>
                                <goal>clean</goal>
                                <goal>test-compile</goal>
                            </goals>
                        </configuration>
                        <executions>
                            <execution>
                                <id>integration-test</id>
                                <goals>
                                    <goal>install</goal>
                                    <goal>integration-test</goal>
                                    <goal>verify</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>

            </build>
        </profile>
        -->
    </profiles>
</project>
