<?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>
    <artifactId>teavm</artifactId>
    <groupId>org.teavm</groupId>
    <version>0.7.0</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>teavm-junit</artifactId>
  <name>TeaVM JUnit runner</name>
  <description>TeaVM implementation of JUnit API</description>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
          <configLocation>../../checkstyle.xml</configLocation>
          <propertyExpansion>config_loc=${basedir}/../..</propertyExpansion>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.teavm</groupId>
        <artifactId>teavm-maven-plugin</artifactId>
        <version>${project.version}</version>
        <executions>
          <execution>
            <id>compile-deobfuscator</id>
            <phase>process-classes</phase>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <targetDirectory>${project.build.directory}/classes/test-server</targetDirectory>
              <targetFileName>deobfuscator.js</targetFileName>
              <minifying>true</minifying>
              <optimizationLevel>ADVANCED</optimizationLevel>
              <mainClass>org.teavm.tooling.deobfuscate.js.DeobfuscatorLib</mainClass>
              <entryPointName>deobfuscator</entryPointName>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.teavm</groupId>
            <artifactId>teavm-jso-impl</artifactId>
            <version>${project.version}</version>
          </dependency>
          <dependency>
            <groupId>org.teavm</groupId>
            <artifactId>teavm-classlib</artifactId>
            <version>${project.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <artifactSet>
                <includes>
                  <include>org.eclipse.jetty:*</include>
                  <include>org.eclipse.jetty.websocket:*</include>
                  <include>com.fasterxml.jackson.core:*</include>
                  <include>javax.servlet:*</include>
                </includes>
              </artifactSet>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>**/module-info.class</exclude>
                  </excludes>
                </filter>
              </filters>
              <relocations>
                <relocation>
                  <pattern>org.eclipse.jetty</pattern>
                  <shadedPattern>org.teavm.jetty</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>javax.servlet</pattern>
                  <shadedPattern>org.teavm.javaxservlet</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.fasterxml.jackson</pattern>
                  <shadedPattern>org.teavm.jackson</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>7.1.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.teavm</groupId>
      <artifactId>teavm-tooling</artifactId>
      <version>0.7.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.teavm</groupId>
      <artifactId>teavm-classlib</artifactId>
      <version>0.7.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>net.sourceforge.htmlunit</groupId>
      <artifactId>htmlunit</artifactId>
      <version>2.33</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
</project>
