<?xml version="1.0" encoding="iso-8859-1"?>
<!--

    Copyright (c) 1997, 2019 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->

<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.6.5</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.sun.mail</groupId>
    <artifactId>javadoc</artifactId>
    <packaging>pom</packaging>
    <version>1.6.5</version>
    <name>Jakarta Mail 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/package.html,
			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/imap/SortTerm.java,
			com/sun/mail/imap/ResyncData.java,
			com/sun/mail/imap/OlderTerm.java,
			com/sun/mail/imap/YoungerTerm.java,
			com/sun/mail/imap/MessageVanishedEvent.java,
			com/sun/mail/imap/ModifiedSinceTerm.java,
			com/sun/mail/imap/IdleManager.java,
			com/sun/mail/imap/ReferralException.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/SMTPSenderFailedException.java,
			com/sun/mail/smtp/SMTPTransport.java,
			com/sun/mail/smtp/SMTPSSLTransport.java,
			com/sun/mail/util/MailConnectException.java,
			com/sun/mail/util/MailSSLSocketFactory.java,
			com/sun/mail/util/ReadableMime.java,
			com/sun/mail/util/logging/*.java
					"/>
				    <fileset dir="../dsn/src/main/java"
					includes="
			com/sun/mail/dsn/package.html,
			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
					"/>
				    <fileset dir="../gimap/src/main/java"
					includes="
			com/sun/mail/gimap/package.html,
			com/sun/mail/gimap/*.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>
			    <additionalJOption>-J-Xmx256m</additionalJOption>
			    <author>false</author>
			    <description>
				Jakarta Mail API documentation
			    </description>
			    <doctitle>
				Jakarta Mail API documentation
			    </doctitle>
			    <windowtitle>
				Jakarta Mail API documentation
			    </windowtitle>
			    <splitindex>true</splitindex>
			    <use>true</use>
			    <notimestamp>true</notimestamp>
			    <serialwarn>true</serialwarn>
			    <quiet>true</quiet>
			    <overview>
				${basedir}/target/javadoc/overview.html
			    </overview>
			    <bottom>
<![CDATA[Copyright &#169; 2019 Eclipse Foundation.
    Use is subject to
    <a href="{@docRoot}/doc-files/speclicense.html" target="_top">license terms</a>.
]]>
			    </bottom>
			    <groups>
				<group>
				    <title>Jakarta Mail API Packages</title>
				    <packages>javax.*</packages>
				</group>
				<group>
				    <title>Implementation-specific Packages</title>
				    <packages>com.sun.*</packages>
				</group>
			    </groups>
			    <!--
				Force javadoc to produce non-module docs
				since the module definition isn't part of
				the API specification.
			    -->
			    <source>8</source>
			    <sourceFileExcludes>
				<sourceFileExclude>module-info.java</sourceFileExclude>
				<sourceFileExclude>com/sun/mail/imap/protocol/**</sourceFileExclude>
				<sourceFileExclude>com/sun/mail/gimap/protocol/**</sourceFileExclude>
			    </sourceFileExcludes>
			    <!-- force the doc-files directory to be copied -->
			    <docfilessubdirs>true</docfilessubdirs>
			    <detectJavaApiLink>false</detectJavaApiLink>
			    <sourcepath>${basedir}/target/javadoc</sourcepath>
			</configuration>
		    </execution>
                </executions>
	    </plugin>
	</plugins>
    </build>

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