<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>
    <groupId>com.intendia.gwt</groupId>
    <artifactId>rxjava2-gwt</artifactId>
    <packaging>gwt-lib</packaging>
    <version>2.1.2-beta1</version>

    <name>RxJava GWT</name>
    <description>RxJava GWT compatibility library</description>
    <url>https://github.com/intendia-oss/rxjava-gwt</url>

    <inceptionYear>2014</inceptionYear>
    <licenses>
        <license>
            <name>Apache 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Ignacio Baca Moreno-Torres</name>
            <email>ignacio@bacamt.com</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/intendia-oss/rxjava-gwt.git</connection>
        <developerConnection>scm:git:git@github.com:intendia-oss/rxjava-gwt.git</developerConnection>
        <url>https://github.com/intendia-oss/rxjava-gwt</url>
        <tag>2.1.2-beta1</tag>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/intendia-oss/rxjava-gwt/issues</url>
    </issueManagement>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <gwt.version>2.8.1-rx1</gwt.version>
        <rxjava.version>2.1.2</rxjava.version>
    </properties>

    <dependencies>
        <!-- RxJava -->
        <dependency>
            <groupId>io.reactivex.rxjava2</groupId>
            <artifactId>rxjava</artifactId>
            <version>${rxjava.version}</version>
        </dependency>
        <dependency>
            <groupId>io.reactivex.rxjava2</groupId>
            <artifactId>rxjava</artifactId>
            <version>${rxjava.version}</version>
            <classifier>sources</classifier>
        </dependency>
        <dependency>
            <groupId>org.reactivestreams</groupId>
            <artifactId>reactive-streams</artifactId>
            <version>1.0.0</version>
            <classifier>sources</classifier>
        </dependency>
        <!-- other dependencies -->
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
            <version>${gwt.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-dev</artifactId>
            <version>${gwt.version}</version>
            <scope>provided</scope>
        </dependency>
        <!-- test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <!-- preferred vs superSourceDirectory bc this is IntelliJ friendly -->
            <resource>
                <directory>src/main/modified</directory>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>src/main/super</directory>
            </resource>
        </resources>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>net.ltgt.gwt.maven</groupId>
                    <artifactId>gwt-maven-plugin</artifactId>
                    <version>1.0-rc-8</version>
                    <extensions>true</extensions>
                    <configuration>
                        <skipModule>true</skipModule>
                        <failOnError>true</failOnError>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>net.ltgt.gwt.maven</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <configuration>
                    <moduleName>io.reactivex.RxJava</moduleName>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <developmentVersion>HEAD-SNAPSHOT</developmentVersion>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- just here to make IntelliJ happy -->
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <version>2.8.1</version>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.7</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>perf</id>
            <activation>
                <property>
                    <name>d8</name>
                </property>
            </activation>
            <properties>
            </properties>
            <build>
                <finalName>d8</finalName>
                <resources>
                    <resource>
                        <directory>src/main/perf</directory>
                    </resource>
                </resources>
                <plugins>
                    <plugin>
                        <groupId>net.ltgt.gwt.maven</groupId>
                        <artifactId>gwt-maven-plugin</artifactId>
                        <configuration>
                            <moduleName>io.reactivex.Perf</moduleName>
                            <skipTests>true</skipTests>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>compile</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <id>sonatype-snapshots-repo</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>rxjava-gwt-repo</id>
            <url>https://raw.githubusercontent.com/intendia-oss/rxjava-gwt/mvn-repo/</url>
        </repository>
    </repositories>
</project>
