<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         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>net.thevpc.nuts.test</groupId>
    <artifactId>nuts-shaded-test</artifactId>
    <version>0.8.4.0</version>
    <packaging>jar</packaging>
    <name>Nuts Community Testing Project</name>
    <url>https://github.com/thevpc/nuts</url>
    <description>Nuts Reference Implementation Test</description>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <github.global.server>github</github.global.server>
    </properties>
    <scm>
        <connection>scm:git:git://github.com/thevpc/nuts.git</connection>
        <developerConnection>scm:git:ssh://github.com:thevpc/nuts.git</developerConnection>
        <url>https://github.com/thevpc/nuts/tree/master</url>
    </scm>

    <organization>
        <name>vpc open source initiative</name>
        <url>https://thevpc.net</url>
    </organization>

    <developers>
        <developer>
            <id>vpc</id>
            <name>Taha Ben Salah</name>
            <email>taha.bensalah@gmail.com</email>
            <url>https://tahabensalah.net</url>
            <organization>thevpc open source initiative</organization>
            <organizationUrl>https://thevpc.net</organizationUrl>
            <roles>
                <role>architect</role>
                <role>developer</role>
            </roles>
            <timezone>Africa/Tunis</timezone>
            <properties>
                <picUrl>https://gravatar.com/avatar/977025550163b4a91397007f6ea9ee17</picUrl>
            </properties>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>GNU LESSER GENERAL PUBLIC LICENSE Version </name>
<url>https://www.gnu.org/licenses/lgpl-3.0.en.html</url>

        </license>
    </licenses>

    <dependencies>
        <dependency>
            <groupId>net.thevpc.nuts</groupId>
            <artifactId>nuts</artifactId>
            <version>0.8.4</version>
        </dependency>
        <dependency>
            <groupId>net.thevpc.nuts</groupId>
            <artifactId>nuts-runtime</artifactId>
            <version>0.8.4.0</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.10.1</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>5.8.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>testCompile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <showDeprecation>true</showDeprecation>
                    <debug>true</debug>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <phase>package</phase>
                        <configuration>
                            <!--<minimizeJar>true</minimizeJar>-->
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>net.thevpc.nuts.test.TestShadedApp</mainClass>
                                </transformer>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.wvengen</groupId>
                <artifactId>proguard-maven-plugin</artifactId>
                <version>2.6.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>proguard</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <attach>true</attach>
                    <includeDependency>false</includeDependency>
                    <injar>${project.build.finalName}-shaded.jar</injar>
                    <options>
                        <option>-allowaccessmodification</option>
                        <!--<option>-optimizationpasses 5</option>-->
                        <option>-overloadaggressively</option>
                        <option>-keep public class * implements net.thevpc.nuts.NApplication { *; }</option>
                        <option>-keep class com.google.** { *; }</option>
                        <option>-keep class net.thevpc.nuts.** { *; }</option>
                        <option>-keep class com.google.gson.stream.* { *; }</option>
                        <option>-keep interface net.thevpc.nuts.** { *; }</option>
                        <option>-keep class * extends java.lang.Enum { *; }</option>
                        <option>-keepattributes Signature</option>
                        <option>-dontskipnonpubliclibraryclasses</option>
                        <option>-keepclassmembers class * implements java.io.Serializable {
                            static final long serialVersionUID;
                            private static final java.io.ObjectStreamField[] serialPersistentFields;
                            private void writeObject(java.io.ObjectOutputStream);
                            private void readObject(java.io.ObjectInputStream);
                            java.lang.Object writeReplace();
                            java.lang.Object readResolve();
                            }
                        </option>
                    </options>
                    <libs>
                        <lib>${java.home}/lib/rt.jar</lib>
                        <lib>${java.home}/lib/jce.jar</lib>
                    </libs>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
