<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <artifactId>apache-jsieve</artifactId>
        <groupId>org.apache.james</groupId>
        <version>0.7</version>
        <relativePath>..</relativePath>
    </parent>

    <artifactId>apache-jsieve-core</artifactId>
    <packaging>bundle</packaging>
    <inceptionYear>2004</inceptionYear>

    <name>Apache James :: jSieve :: Core</name>
    <description>
        Apache jSieve is a server side mail filtering system
        implementing RFC3028. Apache jSieve is developed by the
        James project.
    </description>

    <distributionManagement>
        <site>
            <id>${james.www.id}</id>
            <url>${james.jsieve.www}/core</url>
        </site>
    </distributionManagement>

    <dependencies>

        <dependency>
            <groupId>org.apache.james</groupId>
            <artifactId>apache-mime4j-core</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>${javax.mail.groupId}</groupId>
            <artifactId>${javax.mail.artifactId}</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>${javax.activation.groupId}</groupId>
            <artifactId>${javax.activation.artifactId}</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${assertj.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>javacc-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>generate-jjtree</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>jjtree-javacc</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.7</version>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${project.build.directory}/generated-sources/javacc</source>
                                <source>${project.build.directory}/generated-sources/jjtree</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!--
            Switches between generating the documentation site (without using this profile) and
            generating the technical reports site (using this profile)
        -->
        <profile>
            <id>site-reports</id>
            <build>
                <plugins>
                    <!-- 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>${project.basedir}/src/site</siteDirectory>
                                    <generateReports>false</generateReports>
                                </configuration>
                            </execution>
                        </executions>
                        <configuration>
                            <siteDirectory>${maven-site-plugin.siteDirectory}</siteDirectory>
                            <generateReports>${maven-site-plugin.generateReports}</generateReports>
                            <reportPlugins combine.children="append">
                                <plugin>
                                    <groupId>org.codehaus.mojo</groupId>
                                    <artifactId>javacc-maven-plugin</artifactId>
                                </plugin>
                            </reportPlugins>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
