<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>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.10.1</version>
        <configuration>
          <source>8</source>
          <target>8</target>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.8</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <id>obfuscate</id>
            <configuration>
              <tasks>
                <property name="runtime_classpath" refid="maven.runtime.classpath"/>
                <move file="${project.build.directory}/${project.build.finalName}.jar" tofile="${project.build.directory}/${project.build.finalName}-unobf.jar" verbose="true"/>
                <taskdef name="yguard" classname="com.yworks.yguard.YGuardTask" classpath="${runtime_classpath}"/>
                <yguard>
                  <inoutpair in="${project.build.directory}/${project.build.finalName}-unobf.jar" out="${project.build.directory}/${project.build.finalName}.jar" />
                  <attribute name="Deprecated"/>
                  <rename logfile="${project.build.directory}/yguard.log.xml">
                    <property name="naming-scheme" value="mix"/>
                    <keep>
                      <package>
                        <patternset>
                          <include name="com.fizzgate.aggregate.**"/>
                        </patternset>
                      </package>
                      <class classes="protected" methods="protected" fields="protected">
                        <patternset>
                          <include name="com.fizzgate.aggregate.web.loader.*"/>
                          <include name="com.fizzgate.aggregate.web.util.**"/>
                          <include name="com.fizzgate.aggregate.web.service.AggregateService"/>
                          <include name="com.fizzgate.aggregate.web.filter.**"/>
                          <include name="com.fizzgate.aggregate.web.flow.**"/>
                          <include name="com.fizzgate.aggregate.web.listener.**"/>
                        </patternset>
                      </class>
                    </keep>
                  </rename>
                </yguard>
              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>
  <parent>
    <groupId>com.fizzgate</groupId>
    <artifactId>fizz-aggregate</artifactId>
    <version>3.0.0</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  <artifactId>fizz-aggregate-web</artifactId>
  
  <name>fizz-aggregate-web</name>
  <!--<url>https://www.fizzgate.com</url>-->

  <properties>
    <mockito.version>3.4.6</mockito.version>
    <spring-boot.version>2.2.13.RELEASE</spring-boot.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.fizzgate</groupId>
      <artifactId>fizz-aggregate-core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>com.fizzgate</groupId>
      <artifactId>fizz-aggregate-json-schema-validator-i18n-support</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-webflux</artifactId>
      <version>2.2.13.RELEASE</version>
      <exclusions>
        <exclusion>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-logging</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>com.fizzgate</groupId>
      <artifactId>fizz-core</artifactId>
      <version>2.7.2</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>${mockito.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-inline</artifactId>
      <version>${mockito.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <version>${spring-boot.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>
