<?xml version="1.0"?>
<!--

    Back 2 Browser Bytecode Translator
    Copyright (C) 2012-2018 Jaroslav Tulach <jaroslav.tulach@apidesign.org>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, version 2 of the License.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program. Look for COPYING file in the top folder.
    If not, see http://opensource.org/licenses/GPL-2.0.

-->
<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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apidesign.bck2brwsr</groupId>
    <artifactId>rt</artifactId>
    <version>0.30</version>
  </parent>
  <groupId>org.apidesign.bck2brwsr</groupId>
  <artifactId>bck2brwsr-maven-plugin</artifactId>
  <version>0.30</version>
  <packaging>maven-plugin</packaging>
  <name>Bck2Brwsr Maven Plugin</name>
  <url>http://bck2brwsr.apidesign.org/</url>
  <properties>
      <gradle.bck2brwsrAot>bck2brwsrAot</gradle.bck2brwsrAot>
      <gradle.bck2brwsrPages>bck2brwsrPages</gradle.bck2brwsrPages>
  </properties>
  <repositories>
      <repository>
          <id>gradle</id>
          <url>https://repo.gradle.org/gradle/libs-releases-local/</url>
      </repository>
  </repositories>
      <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.4</version>
                <configuration>
                    <extractors>
                        <extractor>java-annotations</extractor>
                    </extractors>
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                 </configuration>
                <executions>
                    <execution>
                        <id>mojo-descriptor</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
        </plugins>
      </build>
      
<dependencies>
    <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-artifact</artifactId>
        <version>2.2.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>3.0.4</version>
      <type>jar</type>
      <exclusions>
        <exclusion>
          <groupId>org.sonatype.sisu</groupId>
          <artifactId>sisu-guava</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>3.0</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>vm4brwsr</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-core</artifactId>
      <version>3.0.2</version>
      <type>jar</type>
    </dependency>
    <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>launcher</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>launcher.http</artifactId>
        <version>${project.version}</version>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>launcher.fx</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apidesign.bck2brwsr</groupId>
        <artifactId>aot</artifactId>
      <version>${project.version}</version>
      <type>jar</type>
    </dependency>
    <dependency>
        <groupId>org.apidesign.bck2brwsr</groupId>
        <artifactId>vmtest</artifactId>
      <version>${project.version}</version>
      <type>jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.netbeans.html</groupId>
        <artifactId>net.java.html.boot</artifactId>
        <version>${net.java.html.version}</version>
        <type>jar</type>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.ow2.asm</groupId>
        <artifactId>asm</artifactId>
        <version>5.0</version>
        <type>jar</type>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>emul.mini</artifactId>
        <version>${project.version}</version>
        <scope>test</scope>
    </dependency>
    <!-- gradle plugin -->
    <dependency>
        <groupId>org.gradle</groupId>
        <artifactId>gradle-core</artifactId>
        <version>3.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy</artifactId>
        <version>1.8.3</version>
        <scope>provided</scope>
    </dependency>
</dependencies>
    <profiles>
        <profile>
            <id>jvnet-release</id>
            <properties>
                <skipTests>true</skipTests>
                <gradle.bck2brwsrAot>tasks</gradle.bck2brwsrAot>
                <gradle.bck2brwsrPages>tasks</gradle.bck2brwsrPages>
            </properties>
        </profile>
        <profile>
            <id>jdk-8</id>
            <activation>
                <jdk>1.8</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.fortasoft</groupId>
                        <artifactId>gradle-maven-plugin</artifactId>
                        <version>1.0.8</version>
                        <configuration>
                            <tasks>
                                <task>clean</task>
                                <task>${gradle.bck2brwsrAot}</task>
                                <task>${gradle.bck2brwsrPages}</task>
                            </tasks>
                            <args>
                                <arg>--refresh-dependencies</arg>
                                <arg>-PprjVersion=${project.version}</arg>
                                <arg>-PnjhVersion=${net.java.html.version}</arg>
                            </args>
                        </configuration>
                        <executions>
                            <execution>
                                <id>gradle1</id>
                                <phase>generate-test-resources</phase>
                                <goals>
                                    <goal>invoke</goal>
                                </goals>
                                <configuration>
                                    <gradleProjectDirectory>src/test/resources/org/apidesign/bck2brwsr/mojo/gradle1</gradleProjectDirectory>
                                </configuration>
                            </execution>
                            <execution>
                                <id>gradle2</id>
                                <phase>generate-test-resources</phase>
                                <goals>
                                    <goal>invoke</goal>
                                </goals>
                                <configuration>
                                    <gradleProjectDirectory>src/test/resources/org/apidesign/bck2brwsr/mojo/gradle2</gradleProjectDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
