<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
    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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.apache.james</groupId>
        <artifactId>apache-jspf-project</artifactId>
        <version>1.0.1</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <groupId>org.apache.james.jspf</groupId>
    <artifactId>apache-jspf-resolver</artifactId>

    <name>Apache JAMES jSPF Resolver</name>
    <description>
    Apache James jSPF Resolver is an SPF spec implementation written in Java
    </description>

    <dependencies>
        <dependency>
            <groupId>dnsjava</groupId>
            <artifactId>dnsjava</artifactId>
        </dependency>
        <dependency>
            <groupId>uk.nominet</groupId>
            <artifactId>dnsjnio</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.james.jspf</groupId>
            <artifactId>apache-jspf-tester</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-cli</groupId>
            <artifactId>commons-cli</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.rat</groupId>
                <artifactId>apache-rat-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <excludes>
                        <!-- 3rd party resources described in NOTICE:
                            see the maven-remote-resources-plugin configuration, in this file -->
                        <exclude>src/test/resources/org/apache/james/jspf/test_live.txt</exclude>
                        <exclude>src/test/resources/org/apache/james/jspf/test_parser.txt</exclude>
                        <exclude>src/test/resources/org/apache/james/jspf/test_rfc_examples.txt</exclude>
                        <!-- maven release temporary file -->
                        <exclude>release.properties</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <!-- Exclude commons-cli in OSGI. See JSPF-90 -->
                        <!-- Mark dnsjnio packages as optional. See JSPF-89 -->
                        <Import-Package>!org.apache.commons.cli,uk.nominet.dnsjnio;resolution:=optional,*</Import-Package>
                        <Export-Package>org.apache.james.jspf.*</Export-Package>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                        <manifest>
                            <mainClass>org.apache.james.jspf.impl.SPFQuery</mainClass>
                            <packageName>org.apache.james.jspf</packageName>
                            <addClasspath>true</addClasspath>
                        </manifest>
                        <manifestEntries>
                            <Specification-Title>${project.name}</Specification-Title>
                            <Specification-Version>${project.version}</Specification-Version>
                            <Specification-Vendor>The Apache Software Foundation</Specification-Vendor>
                            <Implementation-Title>${project.name}</Implementation-Title>
                            <Implementation-Version>${project.version}</Implementation-Version>
                            <Implementation-Vendor>The Apache Software Foundation</Implementation-Vendor>
                            <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
                            <X-Compile-Source-JDK>${target.jdk}</X-Compile-Source-JDK>
                            <X-Compile-Target-JDK>${target.jdk}</X-Compile-Target-JDK>
                            <url>${project.url}</url>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>create-javadocs</id> <!-- this is used for inheritance merges -->
                        <phase>package</phase> <!-- append to the packaging phase. -->
                        <goals>
                            <goal>javadoc</goal> <!-- goals == mojos -->
                            <goal>jar</goal> <!-- goals == mojos -->
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Add NOTICE and LICENSE to generated JAR -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-remote-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <configuration>
                            <resourceBundles>
                                <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
                            </resourceBundles>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
