<?xml version="1.0" encoding="iso-8859-1"?>
<!--
    DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

    Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.

    The contents of this file are subject to the terms of either the GNU
    General Public License Version 2 only ("GPL") or the Common Development
    and Distribution License("CDDL") (collectively, the "License").  You
    may not use this file except in compliance with the License. You can obtain
    a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
    or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
    language governing permissions and limitations under the License.

    When distributing the software, include this License Header Notice in each
    file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
    Sun designates this particular file as subject to the "Classpath" exception
    as provided by Sun in the GPL Version 2 section of the License file that
    accompanied this code.  If applicable, add the following below the License
    Header, with the fields enclosed by brackets [] replaced by your own
    identifying information: "Portions Copyrighted [year]
    [name of copyright owner]"

    Contributor(s):

    If you wish your version of this file to be governed by only the CDDL or
    only the GPL Version 2, indicate your decision by adding "[Contributor]
    elects to include this software in this distribution under the [CDDL or GPL
    Version 2] license."  If you don't indicate a single choice of license, a
    recipient has the option to distribute your version of this file under
    either the CDDL, the GPL Version 2 or to extend the choice of license to
    its licensees as provided above.  However, if you add GPL Version 2 code
    and therefore, elected the GPL Version 2 license, then the option applies
    only if the new code is made subject to such option by the copyright
    holder.
-->

<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>
	<groupId>com.sun.mail</groupId>
	<artifactId>all</artifactId>
	<version>1.4.3</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.sun.mail</groupId>
    <artifactId>javadoc</artifactId>
    <packaging>pom</packaging>
    <version>1.4.3</version>
    <name>JavaMail API javadocs</name>
    <description>${project.name}</description>

    <build>
        <plugins>
	    <!--
		To allow us to generate javadocs that only include some
		classes in certain packages, we need to copy the sources
		to another location and run javadoc against that subset
		of the sources.  This ant task does the copy.
	    -->
	    <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
		<inherited>false</inherited>
                <executions>
		    <execution>
			<phase>package</phase>
			<configuration>
			    <tasks>

				<copy todir="target/javadoc">
				    <fileset dir="../mail/src/main/java">
					<include name="**/*.html"/>
					<include name="javax/mail/**"/>
				    </fileset>
				    <fileset dir="../mail/src/main/java"
					includes="
			com/sun/mail/imap/IMAPFolder.java,
			com/sun/mail/imap/IMAPMessage.java,
			com/sun/mail/imap/IMAPStore.java,
			com/sun/mail/imap/IMAPSSLStore.java
			com/sun/mail/imap/ACL.java,
			com/sun/mail/imap/Rights.java,
			com/sun/mail/imap/Quota.java,
			com/sun/mail/pop3/POP3Store.java,
			com/sun/mail/pop3/POP3SSLStore.java,
			com/sun/mail/pop3/POP3Folder.java,
			com/sun/mail/pop3/POP3Message.java,
			com/sun/mail/smtp/SMTPMessage.java,
			com/sun/mail/smtp/SMTPAddressFailedException.java,
			com/sun/mail/smtp/SMTPAddressSucceededException.java,
			com/sun/mail/smtp/SMTPSendFailedException.java,
			com/sun/mail/smtp/SMTPTransport.java,
			com/sun/mail/smtp/SMTPSSLTransport.java,
			com/sun/mail/util/MailSSLSocketFactory.java,
			com/sun/mail/util/logging/MailHandler.java
					"/>
				    <fileset dir="../dsn/src/main/java"
					includes="
			com/sun/mail/dsn/DeliveryStatus.java,
			com/sun/mail/dsn/DispositionNotification.java,
			com/sun/mail/dsn/MessageHeaders.java,
			com/sun/mail/dsn/MultipartReport.java,
			com/sun/mail/dsn/Report.java
					"/>
				</copy>

			    </tasks>
			</configuration>
			<goals>
			    <goal>run</goal>
			</goals>
		    </execution>
                </executions>
            </plugin>                                 

	    <plugin>
		<artifactId>maven-javadoc-plugin</artifactId>
		<inherited>false</inherited>
                <executions>
		    <execution>
			<phase>package</phase>
			<goals>
			    <goal>javadoc</goal>
			</goals>
			<configuration>
			    <!-- aggregate not really needed -->
			    <aggregate>false</aggregate>
			    <additionalJOption>-J-Xmx32m</additionalJOption>
			    <author>false</author>
			    <description>
				JavaMail API documentation
			    </description>
			    <doctitle>
				JavaMail API documentation
			    </doctitle>
			    <windowtitle>
				JavaMail API documentation
			    </windowtitle>
			    <splitindex>true</splitindex>
			    <use>true</use>
			    <overview>
				${basedir}/target/javadoc/overview.html
			    </overview>
			    <groups>
				<group>
				    <title>JavaMail API Packages</title>
				    <packages>javax.*</packages>
				</group>
				<group>
				    <title>Sun-specific Packages</title>
				    <packages>com.sun.*</packages>
				</group>
			    </groups>
			    <subpackages>
javax:com.sun.mail.imap:com.sun.mail.pop3:com.sun.mail.smtp:com.sun.mail.dsn:com.sun.mail.util:com.sun.mail.util.logging
			    </subpackages>
			    <!-- XXX - following should work, but doesn't -->
			    <excludePackageNames>
				com.sun.mail.imap.protocol
			    </excludePackageNames>
			    <!-- have to kludge it with this instead...  -->
			    <additionalparam>
				-exclude com.sun.mail.imap.protocol
			    </additionalparam>
			    <sourcepath>${basedir}/target/javadoc</sourcepath>
			    <links>
				<link>http://java.sun.com/j2se/1.4.2/docs/api</link>
				<link>http://java.sun.com/javase/technologies/desktop/javabeans/glasgow/javadocs</link>
			    </links>
			</configuration>
		    </execution>
                </executions>
	    </plugin>
	</plugins>

	<!--
	<resources>
	    <resource>
		<directory>../src/main/resources</directory>
	    </resource>
	</resources>
	-->
    </build>

    <dependencies>
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.mail</groupId>
            <artifactId>dsn</artifactId>
        </dependency>
    </dependencies>
</project>
