<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>org.primefaces.extensions</groupId>
        <artifactId>master-pom</artifactId>
        <version>7.0.2</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>primefaces-extensions</artifactId>
    <packaging>jar</packaging>
    <name>PrimeFaces Extensions</name>
    <description>
        <![CDATA[PrimeFaces Extensions Project for Maven.]]>
    </description>

    <scm>
        <connection>scm:git:git://github.com/primefaces-extensions/core.git</connection>
        <developerConnection>scm:git:ssh://github.com:primefaces-extensions/core.git</developerConnection>
        <url>https://github.com/primefaces-extensions/core</url>
        <tag>HEAD</tag>
    </scm>

    <properties>
        <sourceMap.outputDir>${project.basedir}/src/sourcemap/${project.version}/</sourceMap.outputDir>
        <sourceMap.sourceMapRoot>https://raw.githubusercontent.com/primefaces-extensions/core/master/src/sourcemap/${project.version}/</sourceMap.sourceMapRoot>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                    <excludes>
                        <!-- Remove empty resource folders from JAR file. -->
                        <!-- These are folders whose resources are merged into one big CSS and JS file. -->
                        <exclude>**/META-INF/resources/**/core/**</exclude>
                        <exclude>**/META-INF/resources/**/ckeditor/**</exclude>
                        <exclude>**/META-INF/resources/**/codemirror/lib/**</exclude>
                        <exclude>**/META-INF/resources/**/codemirror/theme/**</exclude>
                        <exclude>**/META-INF/resources/**/codemirror/LICENSE</exclude>
                        <exclude>**/META-INF/resources/**/dynaform/**</exclude>
                        <exclude>**/META-INF/resources/**/masterdetail/**</exclude>
                        <exclude>**/META-INF/resources/**/imagerotateandresize/**</exclude>
                        <exclude>**/META-INF/resources/**/tristatemanycheckbox/**</exclude>
                        <exclude>**/META-INF/resources/**/gchart/**</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.primefaces.extensions</groupId>
                <artifactId>resources-optimizer-maven-plugin</artifactId>
                <configuration>
                    <useDataUri>true</useDataUri>
                    <imagesDir>${project.build.directory}/classes/META-INF/resources</imagesDir>
                    <languageIn>ECMASCRIPT5</languageIn>
                    <languageOut>ECMASCRIPT5</languageOut>
                    <resourcesSets>
                        <resourcesSet>
                            <includes>
                                <include>blockui/**</include>
                                <include>calculator/**</include>
                                <include>clipboard/**</include>
                                <include>fab/**</include>
                                <include>fluidgrid/**</include>
                                <include>github/**</include>
                                <include>imageareaselect/**</include>
                                <include>layout/**</include>
                                <include>letteravatar/**</include>
                                <include>qrcode/**</include>
                                <include>sheet/**</include>
                                <include>slideout/**</include>
                                <include>social/**</include>
                                <include>speedtest/**</include>
                                <include>timeago/*.js</include>
                                <include>timepicker/**</include>
                                <include>timer/**</include>
                                <include>tooltip/**</include>
                                <include>waypoint/**</include>
                                <include>orgchart/**</include>
                            </includes>
                            <aggregations>
                                <aggregation>
                                    <inputDir>${resources.dir.compressed}</inputDir>
                                    <subDirMode>true</subDirMode>
                                    <withoutCompress>${withoutCompress}</withoutCompress>
                                </aggregation>
                            </aggregations>
                        </resourcesSet>
                        <resourcesSet>
                            <includes>
                                <include>inputphone/intlTelInput.js</include>
                                <include>inputphone/inputphone-widget.js</include>
                            </includes>
                            <aggregations>
                                <aggregation>
                                    <inputDir>${resources.dir.compressed}</inputDir>
                                    <outputFile>${resources.dir.compressed}/inputphone/inputphone.js</outputFile>
                                    <withoutCompress>${withoutCompress}</withoutCompress>
                                </aggregation>
                            </aggregations>
                        </resourcesSet>
                        <resourcesSet>
                            <includes>
                                <include>inputphone/intlTelInput.css</include>
                            </includes>
                            <aggregations>
                                <aggregation>
                                    <inputDir>${resources.dir.compressed}</inputDir>
                                    <outputFile>${resources.dir.compressed}/inputphone/inputphone.css</outputFile>
                                    <withoutCompress>${withoutCompress}</withoutCompress>
                                </aggregation>
                            </aggregations>
                        </resourcesSet>
                        <resourcesSet>
                            <includes>
                                <include>codemirror/lib/codemirror.js</include>
                                <include>codemirror/widget.js</include>
                            </includes>
                            <aggregations>
                                <aggregation>
                                    <inputDir>${resources.dir.compressed}</inputDir>
                                    <outputFile>${resources.dir.compressed}/codemirror/codemirror.js</outputFile>
                                    <withoutCompress>${withoutCompress}</withoutCompress>
                                </aggregation>
                            </aggregations>
                        </resourcesSet>
                        <resourcesSet>
                            <includes>
                                <include>codemirror/lib/**/*.css</include>
                                <include>codemirror/theme/*.css</include>
                            </includes>
                            <aggregations>
                                <aggregation>
                                    <inputDir>${resources.dir.compressed}</inputDir>
                                    <outputFile>${resources.dir.compressed}/codemirror/codemirror.css</outputFile>
                                    <withoutCompress>${withoutCompress}</withoutCompress>
                                </aggregation>
                            </aggregations>
                        </resourcesSet>
                        <resourcesSet>
                            <includes>
                                <include>dynaform/dynaform.css</include>
                                <include>masterdetail/masterdetail.css</include>
                                <include>gchart/gchart.css</include>
                            </includes>
                            <aggregations>
                                <aggregation>
                                    <inputDir>${resources.dir.compressed}</inputDir>
                                    <outputFile>${resources.dir.compressed}/primefaces-extensions.css</outputFile>
                                    <withoutCompress>${withoutCompress}</withoutCompress>
                                </aggregation>
                            </aggregations>
                        </resourcesSet>
                        <resourcesSet>
                            <includes>
                                <include>core/core.js</include>
                                <include>ckeditor/widget.js</include>
                                <include>dynaform/dynaform.js</include>
                                <include>imagerotateandresize/imagerotateandresize.js</include>
                                <include>tristatemanycheckbox/tristatemanycheckbox.js</include>
                                <include>gchart/gchart.js</include>
                            </includes>
                            <aggregations>
                                <aggregation>
                                    <inputDir>${resources.dir.compressed}</inputDir>
                                    <outputFile>${resources.dir.compressed}/primefaces-extensions.js</outputFile>
                                    <withoutCompress>${withoutCompress}</withoutCompress>
                                </aggregation>
                            </aggregations>
                        </resourcesSet>
                    </resourcesSets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.17</version>
                <configuration>
                    <consoleOutput>true</consoleOutput>
                    <configLocation>./checkstyle.xml</configLocation>
                </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>8.18</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <header>${basedir}/src/license/header.txt</header>
                    <includes>
                        <include>src/main/java/**/*.java</include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.7</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.owasp</groupId>
                <artifactId>dependency-check-maven</artifactId>
                <version>5.0.0</version>
                <configuration>
                    <skipProvidedScope>false</skipProvidedScope>
                    <skipRuntimeScope>false</skipRuntimeScope>
                    <failBuildOnCVSS>5</failBuildOnCVSS>
                    <suppressionFiles>
                        <suppressionFile>${basedir}/owasp-suppressions.xml</suppressionFile>
                    </suppressionFiles>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.9</version>
                <configuration>
                    <dependencyDetailsEnabled>true</dependencyDetailsEnabled>
                    <dependencyLocationsEnabled>true</dependencyLocationsEnabled>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>summary</report>
                            <report>dependencies</report>
                            <report>scm</report>
                            <report>cim</report>
                            <report>project-team</report>
                            <report>distribution-management</report>
                            <report>plugins</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <id>default</id>
                        <configuration>
                            <notimestamp>true</notimestamp>
                            <quiet>true</quiet>
                            <detectLinks>false</detectLinks>
                            <detectOfflineLinks>false</detectOfflineLinks>
                            <failOnError>false</failOnError>
                            <failOnWarning>false</failOnWarning>
                            <links>
                                <link>http://docs.oracle.com/javase/6/docs/api/</link>
                                <link>http://www.slf4j.org/apidocs/</link>
                            </links>
                        </configuration>
                        <reports>
                            <report>javadoc</report>
                            <report>test-javadoc</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <linkJavadoc>true</linkJavadoc>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>2.19.1</version>
                <configuration>
                    <inherited>true</inherited>
                    <aggregate>false</aggregate>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>report-only</report>
                            <report>failsafe-report-only</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-changes-plugin</artifactId>
                <version>2.9</version>
                <configuration>
                    <xmlPath>${basedir}/src/site/changes.xml</xmlPath>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>changes-report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>3.8</version>
                <configuration>
                    <aggregate>true</aggregate>
                    <minimumTokens>100</minimumTokens>
                    <linkXref>true</linkXref>
                    <sourceEncoding>utf-8</sourceEncoding>
                    <targetJdk>${java.version.source}</targetJdk>
                    <skipEmptyReport>false</skipEmptyReport>
                    <ignoreLiterals>false</ignoreLiterals>
                    <excludes>
                        <exclude>**/generated-sources/**/*.java</exclude>
                    </excludes>
                    <excludeRoots>
                        <excludeRoot>${basedir}/target/generated-sources</excludeRoot>
                        <excludeRoot>${basedir}/target/generated-sources/annotations</excludeRoot>
                        <excludeRoot>${basedir}/target/generated-sources/xjc</excludeRoot>
                        <excludeRoot>${basedir}/target/generated-sources/cxf</excludeRoot>
                    </excludeRoots>
                    <rulesets>
                        <ruleset>${basedir}/pmd-rulesets.xml</ruleset>
                    </rulesets>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>pmd</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>3.1.1</version>
                <configuration>
                    <effort>Max</effort>
                    <threshold>Default</threshold>
                    <findbugsXmlOutput>true</findbugsXmlOutput>
                    <!-- Optional directory to put findbugs xml report -->
                    <findbugsXmlOutputDirectory>target/site</findbugsXmlOutputDirectory>
                    <omitVisitors />
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>taglist-maven-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <tagListOptions>
                        <tagClasses>
                            <tagClass>
                                <displayName>TODO</displayName>
                                <tags>
                                    <tag>
                                        <matchString>TODO</matchString>
                                        <matchType>ignoreCase</matchType>
                                    </tag>
                                </tags>
                            </tagClass>
                        </tagClasses>
                    </tagListOptions>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
    <dependencies>
        <!-- PrimeFaces -->
        <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>
        </dependency>
        <!-- InputPhone dependencies -->
        <dependency>
            <groupId>com.googlecode.libphonenumber</groupId>
            <artifactId>libphonenumber</artifactId>
        </dependency>
        <!-- Component dependencies -->
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>

        <!-- PROVIDED Java API's -->
        <dependency>
             <groupId>org.glassfish</groupId>
             <artifactId>jakarta.faces</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.el</groupId>
            <artifactId>el-api</artifactId>
        </dependency>
        <!-- PROVIDED Exporter dependencies -->
        <dependency>
            <groupId>com.lowagie</groupId>
            <artifactId>itext</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- TEST -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

</project>