<?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>
    <groupId>com.github.thesmartenergy</groupId>
    <artifactId>sparql-generate-jena</artifactId>
    <version>0.9</version>
    <packaging>jar</packaging>
       
    <name>SPARQL Generate over Apache Jena</name>
    <description>An implementation of SPARQL-Generate over Apache Jena</description>
    <url>http://${repository.domain}/${repository.user}/${repository.name}</url>
    <inceptionYear>2016</inceptionYear>

    <prerequisites>
        <!-- Would prefer 3.0.4+, but 3.0.3 will work -->
        <maven>3.0.3</maven>
    </prerequisites>

    <developers>
        <developer>
            <name>Maxime Lefrançois</name>            
            <email>maxime.lefrancois.86@gmail.com</email>
            <url>http://maxime-lefrancois.info/</url>
            <organization>Ecole des mines de Saint-Etienne</organization>
            <organizationUrl>http://www.mines-stetienne.fr/</organizationUrl>
            <timezone>UTC+01:00</timezone>
            <properties>
                <picUrl>http://0.gravatar.com/userimage/102097381/dac8aeb15edac9a93e09a7974743957f</picUrl>
            </properties>        
        </developer>
    </developers>
    
    <!-- command to deploy to maven: mvn install gpg:sign deploy -->
    <!-- command to deploy site mvn site:deploy -->

    <organization>
        <name>ITEA 12004 SEAS Project</name>
        <url>https://itea3.org/project/seas.html</url>
    </organization>

    <scm>
        <connection>scm:git:https://${repository.domain}/${repository.user}/${repository.name}.git</connection>
        <url>https://${repository.domain}/${repository.user}/${repository.name}</url>
        <developerConnection>scm:git:ssh://${repository.domain}/${repository.user}/${repository.name}.git
        </developerConnection>
        <tag>sparql-generate-jena-0.9</tag>
    </scm>
    
    <issueManagement>
        <url>http://${repository.domain}/${repository.user}/${repository.name}/issues</url>
        <system>GitHub Issues</system>
    </issueManagement>
        
    <mailingLists>
        <mailingList>
            <name>Mailing list</name>
            <post>sparql-generate-jena@googlegroups.com</post>
            <archive>https://groups.google.com/d/forum/sparql-generate-jena</archive>
        </mailingList>
    </mailingLists>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <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>

    <properties>
        
        <!-- ========================  -->
        <!--    GitHub PROPERTIES      -->
        <!-- ========================  -->

        <github.global.server>github.com</github.global.server>
        
        <!-- ========================  -->
        <!--    SITE DOC PROPERTIES    -->
        <!-- ========================  -->

        <repository.domain>github.com</repository.domain>
        <repository.user>thesmartenergy</repository.user>
        <repository.name>sparql-generate-jena</repository.name>

        <!-- ========================  -->
        <!--    PROJECT PROPERTIES     -->
        <!-- ========================  -->
        
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
        <jdk.version>1.7</jdk.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>        
        <project.scm.id>git</project.scm.id>
        <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format>

        <!-- ==========================  -->
        <!--    CHANGE LOG PROPERTIES    -->
        <!-- ==========================  -->
        <!-- GitHub Changelog Parameters -->
        <changelog.github.fileUri>${project.scm.url}/tree/master/%FILE%</changelog.github.fileUri>
        <changelog.revision.github.fileUri>${project.scm.url}/commit</changelog.revision.github.fileUri>
        <changelog.fileUri>${changelog.github.fileUri}</changelog.fileUri>
        <changelog.revision.fileUri>${changelog.revision.github.fileUri}</changelog.revision.fileUri>
    </properties>
    
    <dependencies>
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-arq</artifactId>
            <version>3.0.1</version>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <version>2.1.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.2.2</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <extensions>
            <extension>
                <!-- add support for ssh/scp -->
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh</artifactId>
                <version>2.10</version>
            </extension>
        </extensions>

        <pluginManagement>
            <plugins>

                <!-- ========================  -->
                <!--    DEFAULT LIFECYCLE      -->
                <!-- ========================  -->

                <!-- configure validate -->
                <plugin>
                    <groupId>org.apache.rat</groupId>
                    <artifactId>apache-rat-plugin</artifactId>
                    <version>0.11</version>
                    <executions>
                        <execution>
                            <id>rat-checks</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <excludeSubProjects>true</excludeSubProjects>
                        <excludes>
                            <exclude>**/src/site/**/*.*</exclude>
                            <exclude>**/*.xml</exclude>
                            <exclude>**/src/main/resources/**/*.json</exclude>
                            <exclude>**/src/main/resources/**/*.ttl</exclude>
                            <exclude>**/src/main/resources/**/*.rqg</exclude>
                            <exclude>**/src/main/**/*.html</exclude>
                            <exclude>**/src/test/**/*.*</exclude>
                            <exclude>**/src/**/package-info.java</exclude>
                            <exclude>**/*.txt</exclude>
                            <exclude>**/*.md</exclude>
                            <exclude>**/nbproject/*</exclude>
                            <exclude>**/log4j.properties</exclude>
                            <exclude>**/log4j-testing.properties</exclude>
                            <exclude>**/*.classpath</exclude>
                            <exclude>**/target/**/*</exclude>
                            <exclude>**/dependency-reduced-pom.xml</exclude>
                        </excludes>
                    </configuration>
                </plugin>

                <!-- configure generate-source -->
                <plugin>
                    <groupId>com.helger.maven</groupId>
                    <artifactId>ph-javacc-maven-plugin</artifactId>
                    <version>2.8.0</version>
                    <executions>
                        <execution>
                            <id>javacc</id>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>javacc</goal>
                            </goals>
                            <configuration>
                                <jdkVersion>1.7</jdkVersion>
                                <javadocFriendlyComments>true</javadocFriendlyComments>
                                <packageName>com.github.thesmartenergy.sparql.generate.jena.lang</packageName>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <!-- configure process-sources -->            
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jxr-plugin</artifactId>
                    <version>2.5</version>
                    <inherited>true</inherited>
                    <configuration>
                        <aggregate>true</aggregate>
                    </configuration>
                    <executions>
                        <execution>
                            <id>run-jxr</id>
                            <phase>process-resources</phase>
                            <goals>
                                <goal>jxr</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <!-- configure verify -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>taglist-maven-plugin</artifactId>
                    <version>2.4</version>
                    <!-- needs XRef --> 
                    <inherited>true</inherited>
                    <configuration>
                        <aggregate>true</aggregate>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <sourceFileLocale>en</sourceFileLocale>
                        <tagListOptions>
                            <tagClasses>
                                <tagClass>
                                    <displayName>Code sections needing review</displayName>
                                    <tags>
                                        <tag>
                                            <matchString>REVIEWREQUIRED</matchString>
                                            <matchType>exact</matchType>
                                        </tag>
                                    </tags>
                                </tagClass>
                                <tagClass>
                                    <displayName>Todo Work</displayName>
                                    <tags>
                                        <tag>
                                            <matchString>todo</matchString>
                                            <matchType>ignoreCase</matchType>
                                        </tag>
                                        <tag>
                                            <matchString>@todo</matchString>
                                            <matchType>ignoreCase</matchType>
                                        </tag>
                                    </tags>
                                </tagClass>
                                <tagClass>
                                    <displayName>Noted Bugs</displayName>
                                    <tag>
                                        <matchString>fixme</matchString>
                                        <matchType>ignoreCase</matchType>
                                    </tag>
                                </tagClass>
                                <tagClass>
                                    <displayName>Deprecated Items</displayName>
                                    <tag>
                                        <matchString>@deprecated</matchString>
                                        <matchType>ignoreCase</matchType>
                                    </tag>
                                </tagClass>
                            </tagClasses>
                        </tagListOptions>
                    </configuration>
                    <executions>
                        <execution>
                            <id>run-taglist</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>taglist</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>2.17</version>
                    <inherited>true</inherited>
                    <configuration>
                        <skip>${checkstyle.skip}</skip>
                        <configLocation>${maven-checkstyle-plugin.configLocation}</configLocation>
                        <failsOnError>false</failsOnError>
                        <enableRulesSummary>true</enableRulesSummary>
                        <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    </configuration>
                    <executions>
                        <execution>
                            <id>run-checkstyle</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>checkstyle</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>3.0.3</version>
                    <inherited>true</inherited>
                    <configuration>
                        <skip>${findbugs.skip}</skip>
                        <maxHeap>512</maxHeap>
                        <xmlOutput>true</xmlOutput>
                        <includeTests>true</includeTests>
                        <effort>max</effort>
                        <sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
                    </configuration>
                    <executions>
                        <execution>
                            <id>run-findbugs</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>findbugs</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>


                <!-- ========================  -->
                <!--    PACKAGE LIFECYCLE      -->
                <!-- ========================  -->

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.0</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar</goal>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.10.3</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <failOnError>false</failOnError>
                        <links>
                            <link>https://jena.apache.org/documentation/javadoc/arq/</link>
                            <link>https://jena.apache.org/documentation/javadoc/jena/</link>
                        </links>
                    </configuration>
                </plugin>

                <!-- ========================  -->
                <!--    SITE LIFECYCLE         -->
                <!-- ========================  -->

                <!-- configure attach-descriptor  -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.5</version>
                    <inherited>true</inherited>
                    <configuration>
                        <attach>true</attach>
                        <reportPlugins>
                            <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-project-info-reports-plugin</artifactId>
                                <configuration>
                                    <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
                                    <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                                </configuration>
                                <reports>
                                    <report>summary</report>
                                    <report>scm</report>
                                    <report>issue-tracking</report>
                                    <report>mailing-list</report>
                                    <report>license</report>
                                    <report>project-team</report>
                                </reports>
                            </plugin>
                            <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-javadoc-plugin</artifactId>
                                <configuration>
                                    <failOnError>false</failOnError>
                                    <links>
                                        <link>https://jena.apache.org/documentation/javadoc/arq/</link>
                                        <link>https://jena.apache.org/documentation/javadoc/jena/</link>
                                    </links>
                                </configuration>
                                <reports>
                                    <report>javadoc</report>
                                </reports>
                            </plugin>
                        </reportPlugins>
                    </configuration>        
                </plugin>

                <!-- configure site-deploy  -->
                <plugin>
                    <groupId>com.github.github</groupId>
                    <artifactId>site-maven-plugin</artifactId>
                    <version>0.12</version>
                    <configuration>
                        <message>Creating site for ${project.version}</message>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>site</goal>
                            </goals>
                            <phase>site</phase>
                        </execution>
                    </executions>
                </plugin>

                <!-- ========================  -->
                <!-- CUSTOM RELEASE LIFECYCLE  -->
                <!-- ========================  -->

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                    <inherited>true</inherited>
                    <configuration>
                        <releaseProfiles>gpg</releaseProfiles>
                    </configuration>
                </plugin>

            </plugins>
        </pluginManagement>

        <!-- actual enabled plugins -->
        <plugins>

            <!-- ========================  -->
            <!--    DEFAULT LIFECYCLE      -->
            <!-- ========================  -->

            <!-- validate -->
            <plugin>
                <groupId>org.apache.rat</groupId>
                <artifactId>apache-rat-plugin</artifactId>
            </plugin>

            <!-- generate-source -->
            <plugin>
                <groupId>com.helger.maven</groupId>
                <artifactId>ph-javacc-maven-plugin</artifactId>
            </plugin>

            <!-- process-sources -->            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
    
            </plugin>

            <!-- verify -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>taglist-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
            </plugin>

            <!-- ========================  -->
            <!--    PACKAGE LIFECYCLE      -->
            <!-- ========================  -->

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
                
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>

            <!-- ========================  -->
            <!--    SITE LIFECYCLE         -->
            <!-- ========================  -->

            <!-- attach-descriptor  -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
            </plugin>

            <!-- site-deploy  -->
            <plugin>
                <groupId>com.github.github</groupId>
                <artifactId>site-maven-plugin</artifactId>
            </plugin>


            <!-- ========================  -->
            <!-- CUSTOM RELEASE LIFECYCLE  -->
            <!-- ========================  -->

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
            </plugin>
            
        </plugins>
    </build>
    
    <!-- ========================  -->
    <!--        GnuPG PLUGIN       -->
    <!-- ========================  -->

    <profiles>
        <profile>
            <id>release-sign-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.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <keyname>maxime.lefrancois.86@gmail.com</keyname>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>