<?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>
        <artifactId>plugins</artifactId>
        <groupId>org.igniterealtime.openfire</groupId>
        <version>4.3.0</version>
    </parent>
    <groupId>org.igniterealtime.openfire.plugins</groupId>
    <artifactId>exampleplugin</artifactId>
    <version>4.2.0-SNAPSHOT</version>

    <properties>
        <openfire.version>4.2.0</openfire.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.igniterealtime.openfire</groupId>
            <artifactId>xmppserver</artifactId>
            <version>${openfire.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.6</version>
                <dependencies>
                    <dependency>
                        <groupId>org.igniterealtime.openfire.plugins</groupId>
                        <artifactId>openfire-plugin-assembly-descriptor</artifactId>
                        <version>${openfire.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <finalName>${project.artifactId}</finalName>
                            <attach>false</attach>
                            <descriptorRefs>
                                <descriptorRef>openfire-plugin-assembly</descriptorRef>
                            </descriptorRefs>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Admin console pages -->
            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-jspc-maven-plugin</artifactId>
                <version>9.2.14.v20151106</version>
                <configuration>
                    <webAppSourceDirectory>${project.build.sourceDirectory}/../web</webAppSourceDirectory>
                    <webXml>${project.build.sourceDirectory}/../web/WEB-INF/web.xml</webXml>
                </configuration>
                <executions>
                    <execution>
                        <id>jspc</id>
                        <goals>
                            <goal>jspc</goal>
                        </goals>
                        <configuration>
                            <jspc>
                                <package>org.jivesoftware.openfire.plugin.${project.artifactId}</package>
                            </jspc>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.igniterealtime.openfire</groupId>
                        <artifactId>xmppserver</artifactId>
                        <version>${openfire.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.igniterealtime.openfire</groupId>
                        <artifactId>webadmintld</artifactId>
                        <version>${openfire.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>3.0.0</version>
                <extensions>true</extensions>
            </plugin>
        </plugins>
    </build>

</project>
