<?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/maven-v4_0_0.xsd">

  <parent>
      <artifactId>maven-confluence-parent</artifactId>
      <groupId>org.bsc.maven</groupId>
      <version>6.7.2</version>
  </parent>

   <prerequisites>
      <maven>3.3.1</maven>
   </prerequisites>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>confluence-reporting-maven-plugin</artifactId>
    <packaging>maven-plugin</packaging>

    <description>
  plugin that document a project (using maven site style) and send result to a live confluence site [http://www.atlassian.com/software/confluence/]
    </description>
    <url>https://github.com/bsorrentino/maven-confluence-plugin</url>
    <name>CONFLUENCE-REPORTING::Plugin</name>
    <organization>
        <name>Bartolomeo Sorrentino</name>
        <url>http://soulsoftware-bsc.blogspot.it/</url>
    </organization>

    <properties>
    </properties>

  <scm>
	<connection>scm:git:https://github.com/bsorrentino/maven-confluence-plugin.git</connection>
	<developerConnection>scm:git:https://github.com/bsorrentino/maven-confluence-plugin.git</developerConnection>
	<url>https://github.com/bsorrentino/maven-confluence-plugin.git</url>
    <tag>HEAD</tag>
  </scm>

    <developers>
        <developer>
            <id>bsorrentino</id>
            <name>Bartolomeo Sorrentino</name>
            <email>bartolomeo.sorrentino@gmail.com</email>
        </developer>
    </developers>
    <licenses>
        <license>
            <name>Apache License Version 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <reporting>
      <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>${pluginToolsVersion}</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>${reports-plugin-version}</version>

                <configuration>
                    <!-- @see https://www.mkyong.com/maven/maven-site-build-is-very-slow-dependency-report/ -->
                    <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                </configuration>
            </plugin>
      </plugins>
    </reporting>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <configuration>
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                </configuration>
                <executions>
                    <execution>
                        <id>mojo-descriptor</id>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
            <!-- if you want to generate help goal -->
                    <execution>
                        <id>help-goal</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!--
            =====================================================
            MAVEN3 SITE GENERATION
            =====================================================
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.4</version>

                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.plugin-tools</groupId>
                        <artifactId>maven-plugin-annotations</artifactId>
                        <version>${pluginToolsVersion}</version>
                        <scope>runtime</scope>
                    </dependency>

                    <dependency>
                        <groupId>org.apache.maven.reporting</groupId>
                        <artifactId>maven-reporting-exec</artifactId>
                        <version>1.2</version>
                    </dependency>

                    <dependency>
                        <groupId>org.apache.maven.doxia</groupId>
                        <artifactId>doxia-module-markdown</artifactId>
                        <version>1.6</version>
                    </dependency>

                </dependencies>
                <configuration>
                </configuration>
            </plugin>

        </plugins>
    </build>

    <dependencies>


        <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-project-info-reports-plugin</artifactId>
            <version>${reports-plugin-version}</version>
        </dependency>


        <dependency>
            <groupId>org.bsc.maven</groupId>
            <artifactId>maven-confluence-core</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.bsc.maven</groupId>
            <artifactId>maven-confluence-scrollversions-addon</artifactId>
            <version>${project.version}</version>
        </dependency>
<!--
=================================
NEEDS FOR PASSWORD ENCRYPTION
=================================
-->
        <dependency>
            <groupId>org.sonatype.plexus</groupId>
            <artifactId>plexus-sec-dispatcher</artifactId>
            <version>1.4</version>
        </dependency>
<!--
        <dependency>
            <groupId>org.sonatype.plexus</groupId>
            <artifactId>plexus-cipher</artifactId>
            <version>1.7</version>
            <scope>runtime</scope>
        </dependency>
-->
<!--
=================================
NEEDS FOR PLUGIN DOCUMENTATION
=================================
-->
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
        </dependency>

        <dependency>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-tools-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-tools-generators</artifactId>
        </dependency>


<!--
================
TEST
================
-->

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-aether-provider</artifactId>
            <scope>test</scope>
        </dependency>

         <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.plugin-testing</groupId>
            <artifactId>maven-plugin-testing-harness</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>2.2.7-b41</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.eclipse.jgit</groupId>
            <artifactId>org.eclipse.jgit</artifactId>
            <version>4.0.1.201506240215-r</version>
            <exclusions>
                <exclusion>
                    <groupId>com.jcraft</groupId>
                    <artifactId>jsch</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpclient</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- to prevent "SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" messages -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-nop</artifactId>
            <version>1.7.12</version>
        </dependency>


        <dependency>
            <groupId>org.exparity</groupId>
            <artifactId>hamcrest-date</artifactId>
            <version>1.1.0</version>
            <scope>test</scope>
        </dependency>


   </dependencies>


<profiles>

    <profile>
        <id>report</id>

        <build>
            <plugins>
                <!--
                =====================================================
                DEPLOY SITE TO GITHUB
                =====================================================
                 -->

                <plugin>
                    <groupId>com.github.github</groupId>
                    <artifactId>site-maven-plugin</artifactId>
                    <version>0.10</version>
                    <configuration>
                        <message>Creating site for ${project.version}</message>
                        <server>github</server>
                        <repositoryName>maven-confluence-plugin</repositoryName>
                        <repositoryOwner>bsorrentino</repositoryOwner>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>site</goal>
                            </goals>
                            <phase>site</phase>
                        </execution>
                    </executions>
                </plugin>


            </plugins>

        </build>
    </profile>

    <profile>
        <id>confluence</id>

        <properties>
          <confluence.endPoint>http://softwarefactory.softphone.it/confluence/rpc/xmlrpc</confluence.endPoint>
          <confluence.spaceKey>~bsorrentino</confluence.spaceKey>
          <confluence.parentPage>Home</confluence.parentPage>
          <confluence.serverId>softphone-server</confluence.serverId>
        </properties>

        <build>

            <plugins>

                <plugin>
                    <dependencies>

                        <dependency>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-plugin-plugin</artifactId>
                            <version>${pluginToolsVersion}</version>
                            <scope>runtime</scope>
                        </dependency>

                    </dependencies>

                    <groupId>org.bsc.maven</groupId>
                    <artifactId>confluence-reporting-maven-plugin</artifactId>
                    <version>${project.version}</version>

                    <configuration>
                        <!--
                        <endPoint>http://softwarefactory.softphone.it/confluence/rpc/xmlrpc</endPoint>
                        <spaceKey>~bsorrentino</spaceKey>
                        <parentPageTitle>Home</parentPageTitle>
                        <serverId>softphone-server</serverId>
                        -->
                        <wikiFilesExt>.confluence</wikiFilesExt>
                        <deployState/>
                        <failOnError>false</failOnError>
                        <!--
                        <templateWiki>${basedir}/src/site/confluence/index.confluence</templateWiki>
                        -->
                        <removeSnapshots>true</removeSnapshots>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>deploy</goal>
                            </goals>
                            <phase>package</phase>
                        </execution>
                    </executions>
                </plugin>

            </plugins>
        </build>


    </profile>


</profiles>
</project>
