<?xml version="1.0" encoding="UTF-8"?>
<!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements. See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership. The ASF licenses this file
 to you 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.
-->
<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>

  <parent>
    <groupId>org.apache.directory.project</groupId>
    <artifactId>project</artifactId>
    <version>35</version>
    <relativePath />
  </parent>

  <groupId>org.apache.directory.fortress</groupId>
  <artifactId>fortress-realm</artifactId>
  <packaging>pom</packaging>
  <name>Apache Fortress Realm</name>
  <version>2.0.2</version>
  <inceptionYear>2007</inceptionYear>
  <description>
    Apache Fortress Realm provides standards-based Role-Based Access Control security provider to Apache Tomcat.
  </description>
  <url>http://directory.apache.org/fortress/</url>

  <licenses>
    <license>
      <name>Apache License 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:http://git-wip-us.apache.org/repos/asf/directory-fortress-realm.git</connection>
    <developerConnection>
      scm:git:https://git-wip-us.apache.org/repos/asf/directory-fortress-realm.git
    </developerConnection>
    <tag>2.0.2</tag>
  </scm>

  <issueManagement>
    <system>jira</system>
    <url>https://issues.apache.org/jira/browse/DIRFORTRESS</url>
  </issueManagement>

  <!-- ====================================================== -->
  <!-- The list of current developers                         -->
  <!-- ====================================================== -->
  <developers>
    <developer>
      <id>smckinney</id>
      <name>Shawn McKinney</name>
      <email>smckinney@apache.org</email>
    </developer>

    <developer>
      <id>elecharny</id>
      <name>Emmanuel Lecharny</name>
      <email>elecharny@apache.org</email>
    </developer>

    <developer>
      <id>cpike</id>
      <name>Chris Pike</name>
      <email>cpike@apache.org</email>
    </developer>
  </developers>

  <!-- ====================================================== -->
  <!-- The used properties for this project                   -->
  <!-- ====================================================== -->
  <properties>
    <additionalparam>-Xdoclint:none</additionalparam>
    <projectName>apache-directory-fortress-realm</projectName>
    <distMgmtSiteUrl>
      scpexe://people.apache.org/www/directory.apache.org/api/gen-docs/${project.version}/
    </distMgmtSiteUrl>

    <!-- Set versions for depending jars -->
    <fortress-core.version>2.0.2</fortress-core.version>
    <javadoc.version>2.9.1</javadoc.version>
    <junit.version>4.12</junit.version>
    <checkstyle-configuration.version>0.1</checkstyle-configuration.version>
    <findbugs.annotation.version>1.0.0</findbugs.annotation.version>
    <junit-addons.version>0.1</junit-addons.version>
    <skin.version>1.0.2</skin.version>
    <slf4j.api.version>1.7.21</slf4j.api.version>
    <slf4j.log4j12.version>1.7.21</slf4j.log4j12.version>
    <tomcat.catalina.version>7.0.22</tomcat.catalina.version>
    <findbugs.annotations.version>1.0.0</findbugs.annotations.version>
  </properties>

  <mailingLists>
    <mailingList>
      <name>Apache Directory -- Fortress List</name>
      <post>fortress@directory.apache.org</post>
      <archive>http://mail-archives.apache.org/mod_mbox/directory-fortress/</archive>
    </mailingList>
  </mailingLists>

  <modules>
    <module>proxy</module>
    <module>impl</module>
  </modules>

  <build>
    <finalName>${project.artifactId}-${project.version}</finalName>

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

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

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <inherited>true</inherited>
        </plugin>

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

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
        </plugin>
        
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <source>1.8</source>
            <target>1.8</target>
            <optimize>true</optimize>
            <encoding>ISO-8859-1</encoding>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.6</version>
          <configuration>
            <excludes>
              <exclude>**/bootstrap</exclude>
              <exclude>**/config</exclude>
              <exclude>**/*.xml</exclude>
              <exclude>**/*.properties</exclude>
              <exclude>**/*.txt</exclude>
              <exclude>**/*.src</exclude>
            </excludes>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>test-jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <configuration>
            <excludeSubProjects>false</excludeSubProjects>
            <excludes>
              <!-- MAVEN_DEFAULT_EXCLUDES -->
              <exclude>**/target/**/*</exclude>
              <exclude>**/cobertura.ser</exclude>
              <!-- ECLIPSE_DEFAULT_EXCLUDES -->
              <exclude>**/.classpath</exclude>
              <exclude>**/.project</exclude>
              <exclude>**/.settings/**/*</exclude>
              <!-- IDEA_DEFAULT_EXCLUDES -->
              <exclude>**/*.iml</exclude>
              <exclude>**/*.ipr</exclude>
              <exclude>**/*.iws</exclude>
              <!-- MANIFEST_MF_EXCLUDES -->
              <exclude>**/MANIFEST.MF</exclude>
              <!-- Missing license header in dependency reduced pom, see http://jira.codehaus.org/browse/MSHADE-48 -->
              <exclude>**/dependency-reduced-pom.xml</exclude>
            </excludes>
          </configuration>
        </plugin>
        
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <configuration>
            <tagNameFormat>@{project.version}</tagNameFormat>
          </configuration>
        </plugin>

      </plugins>
    </pluginManagement>
    
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <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>
        <configuration>
          <additionalparam>-Xdoclint:none</additionalparam>
          <stylesheet>java</stylesheet>
          <bottom>&lt;small&gt;Copyright &amp;copy; 2003-2016, The Apache Software Foundation. All Rights Reserved. Generated ${maven.build.timestamp}&lt;/small&gt;</bottom>
          <overview>proxy/src/main/java/overview.html</overview>
          <docfilessubdirs>true</docfilessubdirs>
          <includes />
          <version>true</version>
          <author>true</author>
          <doctitle>Fortress Realm Javadoc ${project.version}</doctitle>
          <windowtitle>Apache Fortress Realm Javadoc ${project.version}</windowtitle>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <dependencies>
          <!-- Add support for 'scp'/'sftp' -->
          <dependency>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-ssh</artifactId>
            <version>2.1</version>
          </dependency>
          
          <!-- Add support for 'scpexe' -->
          <dependency>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-ssh-external</artifactId>
            <version>2.1</version>
          </dependency>
        </dependencies>
        
        <configuration>
          <reportPlugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-jxr-plugin</artifactId>
              <configuration>
                <aggregate>true</aggregate>
              </configuration>
            </plugin>

            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-surefire-report-plugin</artifactId>
              <configuration>
                <aggregate>true</aggregate>
              </configuration>
            </plugin>

            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-project-info-reports-plugin</artifactId>
            </plugin>

            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>taglist-maven-plugin</artifactId>
              <configuration>
                <tags>
                  <tag>TODO</tag>
                  <tag>@todo</tag>
                  <tag>@deprecated</tag>
                  <tag>FIXME</tag>
                </tags>
              </configuration>
            </plugin>

            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-javadoc-plugin</artifactId>
              <configuration>
                <minmemory>512m</minmemory>
                <maxmemory>1g</maxmemory>
                <linksource>true</linksource>
                <tags>
                  <tag>
                    <name>todo</name>
                    <!-- todo tag for all places -->
                    <placement>a</placement>
                    <head>To do:</head>
                  </tag>
                </tags>
                <source>1.6</source>
              </configuration>
              <reportSets>
                <reportSet>
                  <reports>
                    <report>aggregate</report>
                    <report>test-aggregate</report>
                  </reports>
                </reportSet>
              </reportSets>
            </plugin>

            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>versions-maven-plugin</artifactId>
              <reportSets>
                <reportSet>
                  <reports>
                    <report>dependency-updates-report</report>
                    <report>plugin-updates-report</report>
                    <report>property-updates-report</report>
                  </reports>
                </reportSet>
              </reportSets>
            </plugin>

            <plugin>
              <groupId>org.apache.rat</groupId>
              <artifactId>apache-rat-plugin</artifactId>
              <!-- must add configuration here too, it isn't inherited from <pluginConfiguration> :-( -->
              <configuration>
                <excludeSubProjects>false</excludeSubProjects>
                <excludes>
                  <!-- MAVEN_DEFAULT_EXCLUDES -->
                  <exclude>**/target/**/*</exclude>
                  <exclude>**/cobertura.ser</exclude>
                  <!-- ECLIPSE_DEFAULT_EXCLUDES -->
                  <exclude>**/.classpath</exclude>
                  <exclude>**/.project</exclude>
                  <exclude>**/.settings/**/*</exclude>
                  <!-- IDEA_DEFAULT_EXCLUDES -->
                  <exclude>**/*.iml</exclude>
                  <exclude>**/*.ipr</exclude>
                  <exclude>**/*.iws</exclude>
                  <!-- MANIFEST_MF_EXCLUDES -->
                  <exclude>**/MANIFEST.MF</exclude>
                  <!-- Missing license header in dependency reduced pom, see http://jira.codehaus.org/browse/MSHADE-48 -->
                  <exclude>**/dependency-reduced-pom.xml</exclude>
                </excludes>
              </configuration>
            </plugin>

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

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

            <!--
                  <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-changes-plugin</artifactId>
                    <configuration>
                    <onlyCurrentVersion>true</onlyCurrentVersion>
                    <resolutionIds>Fixed</resolutionIds>
                    <statusIds>Resolved,Closed</statusIds>
                    <columnNames>Type,Key,Summary,Status,Resolution,Fix Version</columnNames>
                    </configuration>
                    <reportSets>
                    <reportSet>
                      <reports>
                      <report>jira-report</report>
                      </reports>
                    </reportSet>
                    </reportSets>
                  </plugin>
            -->
          </reportPlugins>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencyManagement>
    <dependencies>
      <!-- Project sub-modules dependencies -->
      <dependency>
        <groupId>org.apache.directory.fortress</groupId>
        <artifactId>fortress-core</artifactId>
        <version>${fortress-core.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.tomcat</groupId>
        <artifactId>tomcat-catalina</artifactId>
        <version>${tomcat.catalina.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <!-- for Java5 findbugs annotations are required in each module at compile time -->
    <dependency>
      <groupId>findbugs</groupId>
      <artifactId>annotations</artifactId>
      <scope>provided</scope>
      <version>${findbugs.annotation.version}</version>
    </dependency>

    <!-- common logging interface -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.api.version}</version>
    </dependency>

    <!-- logging implementation used for unit tests -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <scope>test</scope>
      <version>${slf4j.log4j12.version}</version>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
      <version>${junit.version}</version>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <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.5</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>apache-release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <id>source-release-assembly</id>
                <configuration>
                  <skipAssembly>false</skipAssembly>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.rat</groupId>
            <artifactId>apache-rat-plugin</artifactId>
            <executions>
              <execution>
                <phase>verify</phase>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
         </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
