<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>
    <groupId>org.primefaces.extensions</groupId>
    <artifactId>primefaces-extensions-parent</artifactId>
    <packaging>pom</packaging>
    <version>12.0.5</version>
    <name>PrimeFaces Extensions Parent</name>
    <description>
        <![CDATA[PrimeFaces Extensions Parent Project for Maven multi-module build.]]>
    </description>
    <url>https://github.com/primefaces-extensions</url>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/primefaces-extensions/primefaces-extensions/issues</url>
    </issueManagement>

    <inceptionYear>2011</inceptionYear>

    <scm>
        <connection>scm:git:git@github.com:primefaces-extensions/primefaces-extensions.git</connection>
        <developerConnection>scm:git:git@github.com:primefaces-extensions/primefaces-extensions.git</developerConnection>
        <url>https://github.com/primefaces-extensions/primefaces-extensions</url>
        <tag>HEAD</tag>
    </scm>

    <properties>
        <resources.dir.compressed>${project.build.directory}/classes/META-INF/resources/primefaces-extensions</resources.dir.compressed>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <maven.compiler.release>8</maven.compiler.release>
        <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
        <main.basedir>${project.basedir}</main.basedir>
        <jsf.stage>Development</jsf.stage>

        <apache-faces.version>2.3.10</apache-faces.version>
        <commonmark.version>0.21.0</commonmark.version>
        <commons-collections.version>4.4</commons-collections.version>
        <commons-fileupload.version>1.5</commons-fileupload.version>
        <commons-io.version>2.11.0</commons-io.version>
        <commons-lang3.version>3.12.0</commons-lang3.version>
        <gson.version>2.10.1</gson.version>
        <jakarta-faces.version>2.3.19</jakarta-faces.version>
        <libphonenumber.version>8.13.7</libphonenumber.version>
        <morphia.version>2.3.0</morphia.version>

        <primefaces.core.version>12.0.0</primefaces.core.version>
        <primefaces.optimizer.version>2.5.4</primefaces.optimizer.version>

        <withoutCompress>true</withoutCompress>
    </properties>

    <modules>
        <module>core</module>
        <module>monacoeditor</module>
        <module>showcase</module>
    </modules>

    <developers>
        <developer>
            <id>tandraschko</id>
            <name>Thomas Andraschko</name>
            <email>andraschko.thomas@gmail.com</email>
            <roles>
                <role>Owner</role>
                <role>Buildmaster</role>
                <role>Developer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
        <developer>
            <id>varaksin</id>
            <name>Oleg Varaksin</name>
            <email>ovaraksin@googlemail.com</email>
            <roles>
                <role>Owner</role>
                <role>Buildmaster</role>
                <role>Developer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
        <developer>
            <id>melloware</id>
            <name>Emil Lefkof</name>
            <email>mellowaredev@gmail.com</email>
            <roles>
                <role>Buildmaster</role>
                <role>Developer</role>
            </roles>
            <timezone>America/New_York</timezone>
        </developer>
        <developer>
            <id>Rapster</id>
            <name>SÃ©bastien Lepage</name>
            <email>sebastien.lepage@outlook.com</email>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
        <developer>
            <id>jepsar</id>
            <name>Jasper de Vries</name>
            <email>jepsar@gmail.com</email>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <build>
        <plugins>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.13</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>ossrh</serverId>
                        <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.5.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.11.0</version>
                    <configuration>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <debug>true</debug>
                        <showDeprecation>true</showDeprecation>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.5.0</version>
                    <extensions>true</extensions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.1.0</version>
                    <configuration>
                        <deployAtEnd>false</deployAtEnd>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.3.0</version>
                    <configuration>
                        <archive>
                            <addMavenDescriptor>true</addMavenDescriptor>
                            <manifest>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                            <manifestEntries>
                                <X-Compile-Source>${maven.compiler.source}</X-Compile-Source>
                                <X-Compile-Target>${maven.compiler.target}</X-Compile-Target>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.5.0</version>
                    <configuration>
                        <source>${maven.compiler.source}</source>
                        <detectJavaApiLink>false</detectJavaApiLink>
                        <quiet>true</quiet>
                        <doclint>none</doclint>
                        <failOnError>false</failOnError>
                        <failOnWarnings>false</failOnWarnings>
                        <!-- Silence error javax.interceptor.InterceptorBinding 
                            not found -->
                        <additionalDependencies>
                            <additionalDependency>
                                <groupId>javax.inject</groupId>
                                <artifactId>javax.inject</artifactId>
                                <version>1</version>
                            </additionalDependency>
                        </additionalDependencies>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.3.0</version>
                    <configuration>
                        <propertiesEncoding>${project.build.sourceEncoding}</propertiesEncoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.2.1</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>5.1.8</version>
                    <extensions>true</extensions>
                    <configuration>
                        <supportedProjectTypes>
                            <supportedProjectType>jar</supportedProjectType>
                        </supportedProjectTypes>
                        <instructions>
                            <Export-Package>org.primefaces.extensions*;version="${project.version}</Export-Package>
                            <Import-Package>javax.*,*;resolution:=optional</Import-Package>
                        </instructions>
                    </configuration>
                    <executions>
                        <execution>
                            <id>bundle-manifest</id>
                            <phase>process-classes</phase>
                            <goals>
                                <goal>manifest</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>buildnumber-maven-plugin</artifactId>
                    <version>3.0.0</version>
                    <executions>
                        <execution>
                            <id>generate-timestamp</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>create-timestamp</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <format>{0,date,yyyy-MM-dd HH:mm}</format>
                        <items>
                            <item>timestamp</item>
                        </items>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>3.2.1</version>
                    <configuration>
                        <consoleOutput>true</consoleOutput>
                        <configLocation>${main.basedir}/src/conf/checkstyle.xml</configLocation>
                        <suppressionsLocation>${main.basedir}/src/conf/suppressions.xml</suppressionsLocation>
                    </configuration>
                    <executions>
                        <execution>
                            <id>checkstyle</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <configuration>
                                <failOnViolation>true</failOnViolation>
                            </configuration>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>10.9.1</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>com.diffplug.spotless</groupId>
                    <artifactId>spotless-maven-plugin</artifactId>
                    <version>2.35.0</version>
                    <configuration>
                        <java>
                            <importOrder>
                                <order>java,javax,org,com,</order>
                            </importOrder>
                            <eclipse>
                                <file>${main.basedir}/src/conf/eclipse-pfe-formatter.xml</file>
                            </eclipse>
                            <licenseHeader>
                                <file>${main.basedir}/src/conf/license.txt</file>
                            </licenseHeader>
                        </java>
                    </configuration>
                    <executions>
                        <execution>
                            <id>spotless-check</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <!-- dependencies to own plugins -->
                <plugin>
                    <groupId>org.primefaces.extensions</groupId>
                    <artifactId>resources-optimizer-maven-plugin</artifactId>
                    <version>${primefaces.optimizer.version}</version>
                    <executions>
                        <execution>
                            <id>optimize</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>optimize</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>com.github.eirslett</groupId>
                    <artifactId>frontend-maven-plugin</artifactId>
                    <version>1.12.1</version>
                    <configuration>
                        <nodeVersion>v18.8.0</nodeVersion>
                        <npmVersion>8.19.1</npmVersion>
                        <installDirectory>${main.basedir}/target/node</installDirectory>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>3.3.0</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencyManagement>
        <dependencies>
            <!-- PrimeFaces -->
            <dependency>
                <groupId>org.primefaces</groupId>
                <artifactId>primefaces</artifactId>
                <version>${primefaces.core.version}</version>
            </dependency>

            <dependency>
                <groupId>org.primefaces.extensions</groupId>
                <artifactId>resources-monacoeditor</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- Commons -->
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-collections4</artifactId>
                <version>${commons-collections.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-fileupload</groupId>
                <artifactId>commons-fileupload</artifactId>
                <version>${commons-fileupload.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commons-lang3.version}</version>
            </dependency>

            <!-- Java API's -->
            <dependency>
                <groupId>org.glassfish</groupId>
                <artifactId>jakarta.faces</artifactId>
                <version>${jakarta-faces.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.el</groupId>
                <artifactId>el-api</artifactId>
                <version>2.2</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.annotation</groupId>
                <artifactId>jsr250-api</artifactId>
                <version>1.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>4.0.1</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>jstl</artifactId>
                <version>1.2</version>
                <scope>provided</scope>
            </dependency>

            <!-- GSON -->
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${gson.version}</version>
            </dependency>

            <!-- InputPhone dependencies -->
            <dependency>
                <groupId>com.googlecode.libphonenumber</groupId>
                <artifactId>libphonenumber</artifactId>
                <version>${libphonenumber.version}</version>
                <optional>true</optional>
            </dependency>

            <!-- OWASP optional dependencies -->
            <dependency>
                <groupId>com.googlecode.owasp-java-html-sanitizer</groupId>
                <artifactId>owasp-java-html-sanitizer</artifactId>
                <version>20220608.1</version>
                <optional>true</optional>
            </dependency>

            <!-- MongoDB optional dependencies -->
            <dependency>
                <groupId>dev.morphia.morphia</groupId>
                <artifactId>morphia-core</artifactId>
                <version>${morphia.version}</version>
                <optional>true</optional>
            </dependency>

            <!-- Content dependencies -->
            <dependency>
                <groupId>org.commonmark</groupId>
                <artifactId>commonmark</artifactId>
                <version>${commonmark.version}</version>
                <optional>true</optional>
            </dependency>

            <!-- Test -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.2</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <properties>
                <jsf.stage>Production</jsf.stage>
                <withoutCompress>false</withoutCompress>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>com.diffplug.spotless</groupId>
                        <artifactId>spotless-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <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>
                        <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>3.0.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>compress</id>
            <properties>
                <withoutCompress>false</withoutCompress>
            </properties>
        </profile>
    </profiles>
</project>
