<!--

    Copyright 2006-2016 The JGUIraffe Team.

    Licensed under the Apache License, Version 2.0 (the "License")
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<!-- ===================================================================== -->
<!-- $Id: pom.xml 217 2012-11-14 20:58:20Z oheger $ -->
<!-- ===================================================================== -->
<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">

  <modelVersion>4.0.0</modelVersion>
  <groupId>net.sf.jguiraffe</groupId>
  <artifactId>jguiraffe-bom</artifactId>
  <packaging>pom</packaging>
  <version>1.3.1</version>

  <modules>
    <module>parent</module>
  </modules>

  <name>JGUIraffe BOM</name>
  <url>http://jguiraffe.sourceforge.net/</url>
  <organization>
    <name>The JGUIraffe Team</name>
  </organization>
  <description>
    The parent pom of the JGUIraffe project.
  </description>
  <issueManagement>
    <system>SourceForge2</system>
    <url>http://sourceforge.net/p/jguiraffe/</url>
  </issueManagement>
  <scm>
    <connection>scm:git:http://git.code.sf.net/p/jguiraffe/git</connection>
    <url>http://git.code.sf.net/p/jguiraffe/git</url>
  </scm>
  <mailingLists>
    <mailingList>
      <name>JGUIraffe developers</name>
      <post>jguiraffe-developers@lists.sourceforge.net</post>
      <subscribe>http://lists.sourceforge.net/lists/listinfo/jguiraffe-developers</subscribe>
      <archive>http://sourceforge.net/mailarchive/forum.php?forum=jguiraffe-developers</archive>
    </mailingList>
  </mailingLists>

  <developers>
    <developer>
      <id>oheger</id>
      <name>Oliver Heger</name>
      <email>oheger@users.sourceforge.net</email>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>

  <properties>
    <license.file>${basedir}/conf/License-Header.txt</license.file>
  </properties>

  <dependencyManagement>
    <dependencies>

      <dependency>
        <groupId>net.sf.jguiraffe</groupId>
        <artifactId>jguiraffe</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>net.sf.jguiraffe</groupId>
        <artifactId>jguiraffe-swing</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>net.sf.jguiraffe</groupId>
        <artifactId>jguiraffe-java-fx</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>net.sf.jguiraffe</groupId>
        <artifactId>jguiraffe-test-helper</artifactId>
        <version>${project.version}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.5.2</version>
          <executions>
            <execution>
              <phase>package</phase>
              <goals>
                <goal>single</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <finalName>jguiraffe-${project.version}</finalName>
            <descriptors>
              <descriptor>src/assembly/bin.xml</descriptor>
              <descriptor>src/assembly/src.xml</descriptor>
            </descriptors>
            <tarLongFileMode>gnu</tarLongFileMode>
          </configuration>
        </plugin>

        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>2.3</version>
          <configuration>
            <header>${license.file}</header>
            <includes>
              <include>src/**</include>
              <include>pom.xml</include>
              <include>conf/*.xml</include>
            </includes>
            <mapping>
              <java>SLASHSTAR_STYLE</java>
              <scala>SLASHSTAR_STYLE</scala>
              <css>SLASHSTAR_STYLE</css>
              <jelly>XML_STYLE</jelly>
            </mapping>
            <properties>
              <year>2016</year>
            </properties>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.4</version>
          <configuration>
            <archive>
              <manifestEntries>
                <Built-By>${maven.user}</Built-By>
              </manifestEntries>
            </archive>
            <additionalparam>-Xdoclint:none</additionalparam>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.5.1</version>
      </plugin>

      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.3</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>false</autoReleaseAfterClose>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <distributionManagement>
    <site>
      <id>website</id>
      <url>scp://shell.sourceforge.net/home/project-web/jguiraffe/htdocs</url>
    </site>

    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.2</version>
        <configuration>
          <webAccessUrl>http://jguiraffe.svn.sourceforge.net/viewvc/jguiraffe/trunk</webAccessUrl>
          <anonymousConnection>scm:svn:https://jguiraffe.svn.sourceforge.net/svnroot/jguiraffe/trunk</anonymousConnection>
          <developerConnection>scm:svn:https://jguiraffe.svn.sourceforge.net/svnroot/jguiraffe/trunk</developerConnection>
        </configuration>
        <reportSets>
          <reportSet>
            <reports>
              <report>index</report>
              <report>dependencies</report>
              <report>project-team</report>
              <report>mailing-list</report>
              <report>issue-tracking</report>
              <report>license</report>
              <report>scm</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-changes-plugin</artifactId>
        <version>2.6</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>changes-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>2.3</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.5.1</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>2.12</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.7</version>
        <configuration>
          <configLocation>${basedir}/../../conf/checkstyle.xml</configLocation>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>3.0.4</version>
        <configuration>
          <excludeFilterFile>../../conf/findbugs-exclude.xml</excludeFilterFile>
        </configuration>
      </plugin>
<!-- Disabled clirr plugin as it currently cannot be invoked on Java 8.
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>clirr-maven-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <minSeverity>info</minSeverity>
        </configuration>
      </plugin>
-->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <reportSets>
          <reportSet>
            <id>aggregate</id>
            <reports>
              <report>aggregate</report>
            </reports>
          </reportSet>
          <reportSet>
            <id>moduleSpecific</id>
            <reports>
              <report>javadoc</report>
              <report>test-javadoc</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <!--
      Configure site plugin to support both Maven2 and Maven3, see:
      http://maven.apache.org/plugins/maven-site-plugin/maven-3.html#Using_the_same_version_of_maven-site-plugin_for_both_Maven_2_and_Maven_3
    -->
    <profile>
      <id>maven-3</id>
      <activation>
        <file>
          <exists>${basedir}</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-site-plugin</artifactId>
            <dependencies>
              <dependency>
                  <groupId>org.apache.maven.wagon</groupId>
                  <artifactId>wagon-ssh</artifactId>
                  <version>2.2</version>
                </dependency>
              </dependencies>
            <executions>
              <execution>
                <id>attach-descriptor</id>
                <goals>
                  <goal>attach-descriptor</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

  <!--
    The following profiles are used to create the artifacts required for a
    release. The required command is as follows:

    mvn clean deploy site:site -P release -Dmaven.user=user -Dgpg.passphrase=***

    The signed distribution artifacts are then available in the target directory
    of the distribution module.
  -->
    <profile>
      <id>release</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>

      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <artifactId>maven-antrun-plugin</artifactId>
              <version>1.7</version>
            </plugin>
          </plugins>
        </pluginManagement>

        <plugins>
          <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>

          <!--
              A configuration of the antrun plugin which copies the license files
              into the generated jar artifacts.
          -->
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>1.7</version>
            <executions>
              <execution>
                <id>javadoc.licenses</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <tasks>
                    <copy todir="target/apidocs/META-INF">
                      <fileset dir="../../">
                        <include name="LICENSE.txt"/>
                        <include name="NOTICE.txt"/>
                      </fileset>
                    </copy>
                  </tasks>
                </configuration>
              </execution>
              <execution>
                <id>jar.licenses</id>
                <phase>process-resources</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <tasks>
                    <copy todir="${project.build.outputDirectory}/META-INF">
                      <fileset dir="../../">
                        <include name="LICENSE.txt"/>
                        <include name="NOTICE.txt"/>
                      </fileset>
                    </copy>
                  </tasks>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <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>

          <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>false</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
