<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>
    <groupId>org.igniterealtime.openfire</groupId>
    <version>4.3.3-SNAPSHOT</version>
    <artifactId>plugins</artifactId>
    <packaging>pom</packaging>
    <name>Openfire Plugins</name>

    <description>Aggregate project for Openfire plugins.</description>
    <url>http://www.igniterealtime.org/projects/openfire/</url>

    <inceptionYear>2003</inceptionYear>

    <issueManagement>
        <system>jira</system>
        <url>http://issues.igniterealtime.org/browse/OF</url>
    </issueManagement>

    <scm>
        <connection>scm:svn:http://svn.igniterealtime.org/svn/repos/openfire/trunk/</connection>
        <developerConnection>scm:svn:https://svn.igniterealtime.org/svn/repos/openfire/trunk/</developerConnection>
        <url>http://fisheye.igniterealtime.org/viewrep/openfire/trunk/</url>
    </scm>

    <developers>
        <developer>
            <name>Guus der Kinderen</name>
            <roles>
                <role>Lead Developer</role>
            </roles>
            <email>guus.der.kinderen@gmail.com</email>
            <timezone>+1</timezone>
            <organization>Ignite Realtime</organization>
            <organizationUrl>http://www.igniterealtime.org</organizationUrl>
        </developer>
        <developer>
            <name>Robin Collier</name>
            <roles>
                <role>Developer</role>
            </roles>
            <email>robincollier@hotmail.com</email>
            <timezone>-5</timezone>
            <organization>Ignite Realtime</organization>
            <organizationUrl>http://www.igniterealtime.org</organizationUrl>
        </developer>
        <developer>
            <name>Matt Tucker</name>
            <roles>
                <role>Original Author</role>
                <role>Developer (inactive)</role>
            </roles>
            <email>matt@jivesoftware.com</email>
            <organization>Jive Software</organization>
            <organizationUrl>http://www.jivesoftware.com</organizationUrl>
            <timezone>-8</timezone>
        </developer>
        <developer>
            <name>Gaston Dombiak</name>
            <roles>
                <role>Original Author</role>
                <role>Lead Developer (inactive)</role>
            </roles>
            <email>gaston@jivesoftware.com</email>
            <organization>Jive Software</organization>
            <organizationUrl>http://www.jivesoftware.com</organizationUrl>
            <timezone>-8</timezone>
        </developer>
        <developer>
            <name>Daniel Henninger</name>
            <roles>
                <role>Developer (inactive)</role>
            </roles>
            <email>daniel@vorpalcloud.org</email>
            <timezone>-5</timezone>
            <organization>Ignite Realtime</organization>
            <organizationUrl>http://www.igniterealtime.org</organizationUrl>
        </developer>
    </developers>

    <contributors>
        <contributor>
            <name>Daryl Herzmann</name>
            <roles>
                <role>Community Organizer</role>
            </roles>
            <email>akrherz@iastate.edu</email>
            <organization>Iowa State University</organization>
            <organizationUrl>http://mesonet.agron.iastate.edu</organizationUrl>
            <timezone>-6</timezone>
        </contributor>
    </contributors>

    <modules>
        <module>openfire-plugin-assembly-descriptor</module>
    </modules>

    <organization>
        <name>Ignite Realtime</name>
        <url>https://www.igniterealtime.org</url>
    </organization>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- The name of the Openfire plugin (defaults to ${project.artifactId}. This value is somewhat particular:
           - * It is used as a Java package name (and thus, cannot contain characters like dashes and dots.
           - * It is also used as a file name for the resulting Openfire plugin.
           - * Finally, it is used to identify resources, such as i18n files.
           - Least issues will occur when this value is all lowercase, simple ASCII text.
           -->
        <plugin.name>${project.artifactId}</plugin.name>

        <!-- Versions -->
        <openfire.version>4.3.3-SNAPSHOT</openfire.version>
        <!-- Note; the following jetty.version should be identical to the jetty.version in xmppserver/pom.xml -->
        <jetty.version>9.4.12.v20180830</jetty.version>
    </properties>

    <profiles>
        <!-- Disable Javadoc linting (which is very error prone) in versions of Java that have it enabled by default. -->
        <profile>
            <id>java8-doclint-disabled</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>
            <properties>
                <additionalparam>-Xdoclint:none</additionalparam>
            </properties>
        </profile>

        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <!--
                    Java has trouble reading translations from UTF-8 files. To work around that,
                    this plugin copies the i18n files from source to the build directory, to be
                    modified later by the native2ascii-maven-plugin.
                  -->
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/i18n/</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${project.build.sourceDirectory}/../i18n/</directory>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!--
                    Java has trouble reading translations from UTF-8 files. To work around that,
                    this plugin ensures that Java-compatible encoding is used.
                    See https://stackoverflow.com/questions/4659929/how-to-use-utf-8-in-resource-properties-with-resourcebundle
                  -->
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>native2ascii-maven-plugin</artifactId>
                <version>1.0-beta-1</version>
                <executions>
                    <execution>
                        <id>native2ascii</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>native2ascii</goal>
                        </goals>
                        <configuration>
                            <encoding>UTF-8</encoding>
                            <workDir>${project.build.directory}/i18n/</workDir>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.0.0-M2</version>
                <executions>
                    <execution>
                        <id>enforce-no-snapshots</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <rules>
                        <requireReleaseDeps>
                            <message>No Snapshots Allowed!</message>
                            <onlyWhenRelease>true</onlyWhenRelease>
                        </requireReleaseDeps>
                    </rules>
                    <fail>true</fail>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <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>true</appendAssemblyId>
                                <finalName>${plugin.name}</finalName>
                                <attach>true</attach>
                                <!-- This is where we use our shared assembly descriptor -->
                                <descriptorRefs>
                                    <descriptorRef>openfire-plugin-assembly</descriptorRef>
                                </descriptorRefs>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <!-- Compile the JSP pages -->
                <plugin>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-jspc-maven-plugin</artifactId>
                    <version>${jetty.version}</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>
                                <useProvidedScope>true</useProvidedScope>
                                <jspc>
                                    <package>org.jivesoftware.openfire.plugin.${plugin.name}</package>
                                </jspc>
                                <sourceVersion>1.8</sourceVersion>
                                <targetVersion>1.8</targetVersion>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.1.1</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.5</version>
                </plugin>

            </plugins>
        </pluginManagement>
    </build>

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

    <distributionManagement>
        <!-- Repository in which we deploy this project, when desired. -->
        <repository>
            <id>igniterealtime</id>
            <name>Ignite Realtime Repository</name>
            <url>https://www.igniterealtime.org/archiva/repository/maven/</url>
        </repository>
    </distributionManagement>

    <repositories>
        <!-- Where we obtain dependencies. -->
        <repository>
            <id>igniterealtime</id>
            <name>Ignite Realtime Repository</name>
            <url>https://igniterealtime.org/archiva/repository/maven/</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <!-- Typically used to retrieve Maven plugins used by this project from. This
             apparently is also used to obtain the dependencies _used by_ plugins
             (eg: openfire-plugin-assembly-descriptor) -->
        <pluginRepository>
            <id>igniterealtime</id>
            <name>Ignite Realtime Repository</name>
            <url>https://igniterealtime.org/archiva/repository/maven/</url>
        </pluginRepository>
    </pluginRepositories>
</project>
