<?xml version="1.0" encoding="ISO-8859-15"?>
<!--
  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/maven-v4_0_0.xsd">
  <parent>
    <artifactId>james-project</artifactId>
    <groupId>org.apache.james</groupId>
    <version>1.6</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.apache.james</groupId>
  <artifactId>protocols</artifactId>
  <name>Apache James Protocols</name>
  <version>1.5</version>
  <description>James Protocols</description>
  <url>http://james.apache.org/protocols</url>
  <inceptionYear>2010</inceptionYear>
  <packaging>pom</packaging>
  
  <modules>
    <module>api</module>
    <module>smtp</module>
    <module>impl</module>
  </modules>
  <ciManagement>
    <system>hudson</system>
    <url>http://hudson.zones.apache.org/hudson/view/James/job/james-protocols-trunk/</url>
    <notifiers>
      <notifier>
        <type>mail</type>
      </notifier>
    </notifiers>
  </ciManagement>
  <scm>
    <connection>scm:svn:http://svn.apache.org/repos/asf/james/protocols/tags/protocols-1.5</connection>
    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/james/protocols/tags/protocols-1.5</developerConnection>
    <url>http://svn.apache.org/viewcvs.cgi/james/protocols/trunk/tags/protocols-1.5?root=Apache-SVN</url>
  </scm>
  
  <repositories>
   
    <!-- needed for javamail -->
    <repository>
      <id>maven2-repository.dev.java.net</id>
      <name>Java.net Repository for Maven</name>
      <url>http://download.java.net/maven/2/</url>
      <layout>default</layout>
    </repository>
  </repositories>
  
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.3.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.3.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>2.4.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.7</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jxr-plugin</artifactId>
          <version>2.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.0-beta-3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-changes-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.7.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <version>2.7.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>2.3.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>2.3.4</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>2.3.2</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <optimize>true</optimize>
          <source>${target.jdk}</source>
          <target>${target.jdk}</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset>
              <!-- just delete the bin directory -->
              <directory>bin</directory>
              <followSymlinks>false</followSymlinks>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
      
      <!-- Site generation -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-descriptor</id>
            <goals>
              <goal>attach-descriptor</goal>
            </goals>
            <configuration>
              <siteDirectory>${basedir}/src/site</siteDirectory>
              <generateReports>false</generateReports>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <siteDirectory>${maven-site-plugin.siteDirectory}</siteDirectory>
          <generateReports>${maven-site-plugin.generateReports}</generateReports>
          <reportPlugins>
            <!-- Order matters. First project-info-reports, second jxr. -->
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-project-info-reports-plugin</artifactId>
              <reports>
                <report>dependencies</report>
                <report>dependency-management</report>
                <report>dependency-convergence</report>
                <report>distribution-management</report>
                <report>index</report>
                <report>license</report>
                <report>mailing-list</report>
                <report>modules</report>
                <report>plugin-management</report>
                <report>plugins</report>
                <report>project-team</report>
                <report>scm</report>
                <report>summary</report>
              </reports>
            </plugin>
            <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.codehaus.mojo</groupId>
              <artifactId>rat-maven-plugin</artifactId>
              <version>1.0-alpha-3</version>
              <configuration>
                <excludes>
                  <exclude>NOTICE.*</exclude>
                  <exclude>LICENSE.*</exclude>
                  <!-- Generated by Maven -->
                  <exclude>release.properties</exclude>
                  <exclude>dist/**/*</exclude>
                  <!-- Eclipse -->
                  <exclude>**/.*</exclude>
                  <exclude>.*/**/*</exclude>
                </excludes>
              </configuration>
            </plugin>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-pmd-plugin</artifactId>
              <configuration>
                <aggregate>true</aggregate>
                <targetJdk>${target.jdk}</targetJdk>
                <rulesets>
                  <ruleset>/rulesets/basic.xml</ruleset>
                  <ruleset>/rulesets/controversial.xml</ruleset>
                </rulesets>
                <format>xml</format>
                <linkXref>true</linkXref>
                <sourceEncoding>utf-8</sourceEncoding>
                <minimumTokens>100</minimumTokens>
              </configuration>
            </plugin>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-javadoc-plugin</artifactId>
              <configuration>
                <minmemory>256m</minmemory>
                <maxmemory>1g</maxmemory>
                <linksource>true</linksource>
                <tags>
                  <tag>
                    <name>note</name>
                    <placement>a</placement>
                    <head>NOTE</head>
                  </tag>
                  <tag>
                    <name>todo</name>
                    <placement>a</placement>
                    <head>TODO</head>
                  </tag>
                  <tag>
                    <name>warning</name>
                    <placement>a</placement>
                    <head>WARNING</head>
                  </tag>
                </tags>
                <source>1.5</source>
              </configuration>
              <reportSets>
                <reportSet>
                  <reports>
                    <report>aggregate</report>
                    <report>test-aggregate</report>
                  </reports>
                </reportSet>
              </reportSets>
            </plugin>
            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>findbugs-maven-plugin</artifactId>
              <configuration>
                <xrefLocation>${project.reporting.outputDirectory}/xref</xrefLocation>
                <xrefTestLocation>${project.reporting.outputDirectory}/xref-test</xrefTestLocation>
                <!-- required by dashboard plugin and hudson -->
                <xmlOutput>true</xmlOutput>
                <effort>Max</effort>
                <findbugsXmlOutput>true</findbugsXmlOutput>
                <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
              </configuration>
            </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>

  <distributionManagement>
    <site>
      <id>server-trunk-website</id>
      <url>scp://people.apache.org/www/james.apache.org/protocols/trunk/</url>
    </site>
  </distributionManagement>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.james.protocols</groupId>
        <artifactId>protocols-smtp</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.james.protocols</groupId>
        <artifactId>protocols-api</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.james.protocols</groupId>
        <artifactId>protocols-impl</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.6.1</version>
      </dependency>
      
      <dependency>
        <groupId>commons-configuration</groupId>
        <artifactId>commons-configuration</artifactId>
        <version>1.6</version>
        <exclusions>
          <exclusion>
            <artifactId>commons-digester</artifactId>
            <groupId>commons-digester</groupId>
          </exclusion>
          <exclusion>
            <artifactId>commons-beanutils-core</artifactId>
            <groupId>commons-beanutils</groupId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.6.1</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.james</groupId>
        <artifactId>apache-mailet</artifactId>
        <version>2.4</version>
        <exclusions>
          <exclusion>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.james</groupId>
        <artifactId>apache-mailet-base</artifactId>
        <version>1.0</version>
        <exclusions>
          <exclusion>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>javax.mail</groupId>
        <artifactId>mail</artifactId>
        <version>1.4.4</version>
      </dependency>
      <dependency>
        <groupId>javax.activation</groupId>
        <artifactId>activation</artifactId>
        <version>1.1.1</version>
      </dependency>
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.4</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.netty</groupId>
        <artifactId>netty</artifactId>
        <version>3.2.4.Final</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.1</version>
        <scope>test</scope>
      </dependency>
    </dependencies>  
  </dependencyManagement>
  
  <profiles>
    <!-- TODO: Move this to james parent pom -->
    <!-- This take care of generate a zip and tar.gz file for the source -->
    <profile>
      <id>apache-release</id>
      <activation>
        <property>
          <name>apache-release</name>
        </property>
      </activation>
      <build>
        <plugins>
          <!-- waiting for release -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>single</goal>
                </goals>
                <phase>package</phase>
                <configuration>
                  <tarLongFileMode>gnu</tarLongFileMode>
                  <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
                  <descriptorRefs>
                    <descriptorRef>source-release</descriptorRef>
                  </descriptorRefs>
                </configuration>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <!-- apache version not yet released -->
                <!--<groupId>org.apache</groupId>-->
                <groupId>org.apache.geronimo.genesis</groupId>
                <artifactId>apache-source-release-assembly-descriptor</artifactId>
                <!-- apache version not yet known -->
                <version>2.0</version>
              </dependency>
            </dependencies>
          </plugin>
        </plugins>
      </build>
    </profile>    
  </profiles>

  <properties>
    <target.jdk>1.5</target.jdk>
  </properties>
  
</project>
