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

    <parent>
        <groupId>com.icfolson.aem.groovy.extension</groupId>
        <artifactId>aem-groovy-extension</artifactId>
        <version>7.0.0</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>aem-groovy-extension-bundle</artifactId>
    <packaging>bundle</packaging>
    <name>AEM Groovy Extension Bundle</name>

    <properties>
        <maven.test.skip>true</maven.test.skip>
    </properties>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>4.1.0</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Name>${project.name}</Bundle-Name>
                        <Bundle-Vendor>${project.parent.organization.name}</Bundle-Vendor>
                        <Export-Package>!*.impl,com.icfolson.aem.groovy.extension.*</Export-Package>
                        <DynamicImport-Package>*</DynamicImport-Package>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.7</version>
                <executions>
                    <execution>
                        <id>groovydoc</id>
                        <phase>site</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <taskdef name="groovydoc"
                                         classname="org.codehaus.groovy.ant.Groovydoc"
                                         classpathref="maven.compile.classpath"/>
                                <groovydoc destdir="${project.reporting.outputDirectory}/groovydocs"
                                           sourcepath="${basedir}/src/main/groovy"
                                           use="true"
                                           windowtitle="${project.name}"
                                           doctitle="${project.name}">
                                    <link packages="com.day.cq.wcm.api."
                                          href="https://docs.adobe.com/docs/en/aem/6-2/develop/ref/javadoc"/>
                                    <link packages="org.apache.sling."
                                          href="http://sling.apache.org/apidocs/sling7"/>
                                    <link packages="javax.jcr."
                                          href="https://docs.adobe.com/content/docs/en/spec/jsr170/javadocs/jcr-2.0/"/>
                                    <link packages="java."
                                          href="https://docs.oracle.com/javase/7/docs/api"/>
                                    <link packages="javax."
                                          href="https://docs.oracle.com/javaee/7/api"/>
                                    <link packages="groovy.,org.codehaus.groovy."
                                          href="http://groovy.codehaus.org/api/"/>
                                </groovydoc>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.3</version>
                <executions>
                    <execution>
                        <id>javadoc</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/assembly/javadoc.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <phase>deploy</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-gpg-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>deploy</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <configuration>
                    <generateReports>false</generateReports>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
    </dependencies>
</project>