<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>mojo-parent</artifactId>
        <version>33</version>
    </parent>

    <artifactId>aspectj-maven-plugin</artifactId>
    <version>1.7</version>
    <packaging>maven-plugin</packaging>

    <name>Mojo's AspectJ Maven Plugin</name>
    <description>
        Handles AspectJ usage within Maven.
        Functionality provided is: weaving of aspects (or existing aspects from libraries) with the
        test and/or main classes, weaving of pre-existing jars and ajdoc reporting.
    </description>
    <url>http://mojo.codehaus.org/aspectj-maven-plugin</url>
    <inceptionYear>2005</inceptionYear>
    <licenses>
        <license>
            <name>The MIT License</name>
            <url>LICENSE.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <aspectjVersion>1.8.2</aspectjVersion>
        <mavenVersion>2.2.1</mavenVersion>
        <changesPluginVersion>2.10</changesPluginVersion>
        <mojo.java.target>1.6</mojo.java.target> <!-- to ensure correct JDK requirement om project summary page, otherwise 1.5 would be enough to compile -->
    </properties>

    <prerequisites>
        <maven>${mavenVersion}</maven>
    </prerequisites>

    <scm>
        <connection>scm:svn:http://svn.codehaus.org/mojo/tags/aspectj-maven-plugin-1.7</connection>
        <developerConnection>scm:svn:https://svn.codehaus.org/mojo/tags/aspectj-maven-plugin-1.7
        </developerConnection>
        <url>http://fisheye.codehaus.org/browse/mojo/tags/aspectj-maven-plugin-1.7</url>
    </scm>
    <issueManagement>
        <system>jira</system>
        <url>http://jira.codehaus.org/browse/MASPECTJ</url>
    </issueManagement>
    <ciManagement>
        <system>bamboo</system>
        <url>http://bamboo-ci.codehaus.org/browse/MOJO-MASPECTJ</url>
        <notifiers>
            <notifier>
                <type>mail</type>
                <sendOnError>true</sendOnError>
                <sendOnFailure>true</sendOnFailure>
                <sendOnSuccess>true</sendOnSuccess>
                <sendOnWarning>true</sendOnWarning>
                <configuration>
                    <address>david@codehaus.org</address>
                </configuration>
            </notifier>
        </notifiers>
    </ciManagement>

    <developers>
        <developer>
            <id>kaare</id>
            <name>Kaare Nilsen</name>
            <email>kaare.nilsen@gmail.com</email>
            <organization>Arktekk</organization>
            <organizationUrl>http://arktekk.no</organizationUrl>
            <roles>
                <role>Java Developer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
        <developer>
            <name>Lennart Jörelid</name>
            <email>lj@jguru.se</email>
            <organization>jGuru Europe AB</organization>
            <roles>
                <role>Java Developer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
    </developers>
    <contributors>
        <contributor>
            <name>Thor Age Eldby</name>
            <email>tel@objectnet.no</email>
            <roles>
                <role>Java Developer</role>
            </roles>
            <timezone>+1</timezone>
        </contributor>
        <contributor>
            <name>David J. M. Karlsen</name>
            <email>david@codehaus.org</email>
            <organization>davidkarlsen.com</organization>
            <organizationUrl>http://www.davidkarlsen.com</organizationUrl>
            <url>http://xircles.codehaus.org/users/david</url>
            <roles>
                <role>Java Developer</role>
            </roles>
            <timezone>+1</timezone>
        </contributor>
        <contributor>
            <name>Marvin Froeder</name>
            <email>velo.br@gmail.com</email>
            <timezone>-3</timezone>
        </contributor>
        <contributor>
            <name>Krzysztof Debski</name>
            <email>kdebski85@gmail.com</email>
            <timezone>+1</timezone>
        </contributor>
    </contributors>

    <dependencies>
        <!-- Maven core -->
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>3.0.10</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>${mavenVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model</artifactId>
            <version>${mavenVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-project</artifactId>
            <version>${mavenVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.reporting</groupId>
            <artifactId>maven-reporting-api</artifactId>
            <version>${mavenVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${mavenVersion}</version>
        </dependency>
        <!-- Other -->
        <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-site-renderer</artifactId>
            <version>1.1.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.reporting</groupId>
            <artifactId>maven-reporting-impl</artifactId>
            <version>2.1</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjtools</artifactId>
            <version>${aspectjVersion}</version>
        </dependency>
        <!--
            This is required to make the ajdoc tool work properly.
            When generating the AspectJ site documentation, the following debug statement is emitted onto the log:

            [DEBUG] Running : ajdoc  -classpath [... a long classpath follows ...]
            ajdoc requires a JDK 1.4 or later tools jar - exiting
        -->
        <dependency>
            <groupId>com.sun</groupId>
            <artifactId>tools</artifactId>
            <version>${java.version}</version>
            <scope>system</scope>
            <systemPath>${toolsjarSystemPath}</systemPath>
        </dependency>
        <!-- Test -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-testing</groupId>
            <artifactId>maven-plugin-testing-harness</artifactId>
            <version>1.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>3.3</version>
                    <executions>
                        <execution>
                            <id>help-mojo</id>
                            <goals>
                                <goal>helpmojo</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-changes-plugin</artifactId>
                    <version>${changesPluginVersion}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.8</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.3</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>2.7</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.3.1</version>
                <executions>
                    <execution>
                        <id>enforce-bytecode-version</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <enforceBytecodeVersion>
                                    <maxJdkVersion>1.6</maxJdkVersion>
                                    <excludes>
                                        <exclude>com.sun:tools</exclude>
                                    </excludes>
                                </enforceBytecodeVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>extra-enforcer-rules</artifactId>
                        <version>1.0-beta-2</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.17</version>
                <configuration>
                    <skip>false</skip>
                    <excludes>
                        <exclude>**/test-project/**/*.java</exclude>
                        <exclude>**/parent-child-test-project/**/*.java</exclude>
                        <exclude>**/AbstractAjcMojoTest.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-invoker-plugin</artifactId>
                <executions>
                    <execution>
                        <id>integration-test</id>
                        <goals>
                            <goal>install</goal>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <projectsDirectory>src/it</projectsDirectory>
                    <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                    <postBuildHookScript>verify</postBuildHookScript>
                    <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
                    <goals>
                        <goal>clean</goal>
                        <goal>test</goal>
                    </goals>
                    <settingsFile>src/it/settings.xml</settingsFile>
                    <debug>true</debug>
                </configuration>
            </plugin>

            <!--
              Provides PlantUML integration into site deployments.
            -->
            <plugin>
                <groupId>com.github.jeluard</groupId>
                <artifactId>plantuml-maven-plugin</artifactId>
                <version>7954</version>
                <configuration>
                    <sourceFiles>
                        <directory>${basedir}</directory>
                        <includes>
                            <include>src/site/**/*.puml</include>
                        </includes>
                    </sourceFiles>
                    <outputDirectory>${project.build.directory}/site/images/plantuml</outputDirectory>
                </configuration>
                <executions>
                    <execution>
                        <id>generate-plantuml-diagrams</id>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <phase>pre-site</phase>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>net.sourceforge.plantuml</groupId>
                        <artifactId>plantuml</artifactId>
                        <version>7985</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <artifactId>maven-plugin-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-changes-plugin</artifactId>
                <version>${changesPluginVersion}</version>
                <configuration>
                    <columnNames>Type,Key,Summary,Assignee,Status,Resolution,Created</columnNames>
                    <generateJiraAnnouncement>true</generateJiraAnnouncement>
                    <issueTypes>
                        <Task>update</Task>
                    </issueTypes>
                    <maxEntries>200</maxEntries>
                    <onlyCurrentVersion>true</onlyCurrentVersion>
                    <sortColumnNames>Type,Key</sortColumnNames>
                    <toAddresses>
                        <toAddress>dev@mojo.codehaus.org</toAddress>
                        <toAddress>user@mojo.codehaus.org</toAddress>
                        <toAddress>users@maven.apache.org</toAddress>
                        <toAddress>aspectj-users@eclipse.org</toAddress>
                    </toAddresses>
                    <urlDownload>${project.url}</urlDownload>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>l10n-maven-plugin</artifactId>
                <version>1.0-alpha-2</version>
                <configuration>
                    <locales>
                        <locale>nl</locale>
                        <locale>sv</locale>
                    </locales>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.7</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>cim</report>
                            <report>dependency-info</report>
                            <report>index</report>
                            <report>issue-tracking</report>
                            <report>mailing-list</report>
                            <report>project-team</report>
                            <report>scm</report>
                            <report>summary</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <!--
          The AspectJ compilation requires that tools.jar (or its equivalent for some JDKs) is found on the classpath.
          The profiles named [something]toolsJar-profile define the systemPath for the tools.jar dependency.
        -->
        <profile>
            <id>standardToolsJar-profile</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <file>
                    <exists>${java.home}/../lib/tools.jar</exists>
                </file>
            </activation>
            <properties>
                <toolsjarSystemPath>${java.home}/../lib/tools.jar</toolsjarSystemPath>
            </properties>
        </profile>
        <profile>
            <id>appleJdkToolsJar-profile</id>
            <activation>
                <activeByDefault>false</activeByDefault>
                <file>
                    <exists>${java.home}/../Classes/classes.jar</exists>
                </file>
            </activation>
            <properties>
                <toolsjarSystemPath>${java.home}/../Classes/classes.jar</toolsjarSystemPath>
            </properties>
        </profile>

        <profile>
            <id>maven-repo-local</id>
            <activation>
                <property>
                    <name>maven.repo.local</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <systemProperties>
                                <property>
                                    <!--
                                        Pass this through to the tests (if set!) to
                                        have them pick the right repository
                                    -->
                                    <name>maven.repo.local</name>
                                    <value>${maven.repo.local}</value>
                                </property>
                            </systemProperties>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
