<?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.guicedee.services</groupId>
        <artifactId>gee4j-parent</artifactId>
        <version>1.0.2.18-jre13</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>primefaces</artifactId>
    <name>primefaces</name>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-shade-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <createDependencyReducedPom>false</createDependencyReducedPom>
                    <createSourcesJar>true</createSourcesJar>
                    <shadeSourcesContent>true</shadeSourcesContent>
                    <shadeTestJar>true</shadeTestJar>
                    <keepDependenciesWithProvidedScope>false</keepDependenciesWithProvidedScope>

                    <artifactSet>
                        <includes>
                            <include>com.lowagie:itextpdf:*</include>
                            <include>org.primefaces:primefaces:*</include>
                            <include>com.rometools:rome:*</include>
                            <include>net.sf.barcode4j:barcode4j-light:*</include>
                            <include>org.owasp.encoder:encoder:*</include>
                            <include>org.owasp.esapi:esapi:*</include>
                            <include>net.glxn:qrgen:*</include>
                            <include>com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:*</include>
                        </includes>
                    </artifactSet>
                    <filters>
                        <filter>
                            <artifact>*:*</artifact>
                            <excludes>
                                <exclude>module-info.java</exclude>
                            </excludes>
                        </filter>
                    </filters>
                    <relocations>
                        <relocation>
                            <pattern>com.lowagie</pattern>
                            <shadedPattern>com.guicedee.services.primefaces.itext2</shadedPattern>
                        </relocation>
                        <relocation>
                            <pattern>com.rometools</pattern>
                            <shadedPattern>com.guicedee.services.primefaces.rometools</shadedPattern>
                        </relocation>
                    </relocations>
                    <transformers>
                        <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                    </transformers>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.moditect</groupId>
                <artifactId>moditect-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-module-infos</id>
                        <phase>package</phase>
                        <goals>
                            <goal>add-module-info</goal>
                        </goals>
                        <configuration>
                            <overwriteExistingFiles>true</overwriteExistingFiles>
                            <module>
                                <moduleInfoFile>moditect/module-info.java</moduleInfoFile>
                            </module>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <dependencies>

        <dependency>
            <groupId>com.lowagie</groupId>
            <artifactId>itext</artifactId>
            <version>2.1.7</version>
            <exclusions>
                <exclusion>
                    <artifactId>bcprov-jdk14</artifactId>
                    <groupId>bouncycastle</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>bctsp-jdk14</artifactId>
                    <groupId>org.bouncycastle</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>bcmail-jdk14</artifactId>
                    <groupId>bouncycastle</groupId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.rometools</groupId>
            <artifactId>rome</artifactId>
            <version>1.9.0</version>
            <exclusions>
                <exclusion>
                    <artifactId>slf4j-api</artifactId>
                    <groupId>org.slf4j</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>rome-utils</artifactId>
                    <groupId>com.rometools</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jdom2</artifactId>
                    <groupId>org.jdom</groupId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.googlecode.owasp-java-html-sanitizer</groupId>
            <artifactId>owasp-java-html-sanitizer</artifactId>
            <version>20190503.1</version>
            <exclusions>
                <exclusion>
                    <artifactId>guava</artifactId>
                    <groupId>com.google.guava</groupId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
        </dependency>


        <dependency>
            <groupId>net.sf.barcode4j</groupId>
            <artifactId>barcode4j-light</artifactId>
            <version>2.0</version>
            <exclusions>
                <exclusion>
                    <artifactId>xml-apis</artifactId>
                    <groupId>xml-apis</groupId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.owasp.encoder</groupId>
            <artifactId>encoder</artifactId>
            <version>1.2.1</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.owasp.esapi</groupId>
            <artifactId>esapi</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.guicedee.services</groupId>
            <artifactId>commons-fileupload</artifactId>
        </dependency>

        <dependency>
            <groupId>com.guicedee.services</groupId>
            <artifactId>javax.faces</artifactId>
        </dependency>
        <dependency>
            <groupId>com.guicedee.services</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>

        <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>
            <version>7.0</version>
            <optional>true</optional>
        </dependency>

    </dependencies>
</project>
