<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.vertispan.rpc</groupId>
    <artifactId>gwt-rpc-parent</artifactId>
    <version>1.0-alpha-7</version>
    <packaging>pom</packaging>

    <name>gwt-rpc</name>
    <description>JVM and GWT compatible object serialization and RPC invocation</description>
    <inceptionYear>2018</inceptionYear>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git://github.com/vertispan/gwt-rpc.git</connection>
        <developerConnection>scm:git:ssh://github.com:vertispan/gwt-rpc.git</developerConnection>
        <url>https://github.com/vertispan/gwt-rpc/tree/master</url>
    </scm>

    <developers>
        <developer>
            <name>Colin Alworth</name>
            <email>colin@vertispan.com</email>
        </developer>
    </developers>

    <url>http://www.gwtproject.org/</url>

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

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

        <gwt.version>2.10.0</gwt.version>
        <gwt.plugin.version>2.10.0</gwt.plugin.version>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>3.3.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.7.0</version>
                    <configuration>
                        <source>${maven.compiler.source}</source>
                        <target>${maven.compiler.target}</target>
                        <excludes>
                            <exclude>**/super/**</exclude>
                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.2.1</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>gwt-maven-plugin</artifactId>
                    <version>2.10.0</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.gwtproject</groupId>
                            <artifactId>gwt-user</artifactId>
                            <version>${gwt.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.gwtproject</groupId>
                            <artifactId>gwt-dev</artifactId>
                            <version>${gwt.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </pluginManagement>

    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.gwtproject</groupId>
                <artifactId>gwt-servlet</artifactId>
                <version>${gwt.version}</version>
            </dependency>

            <!-- This dep causes gwt-m-p to warn about complex dependencies, ignore
              it -->
            <dependency>
                <groupId>org.gwtproject</groupId>
                <artifactId>gwt-dev</artifactId>
                <version>${gwt.version}</version>
                <scope>provided</scope>
            </dependency>

            <!-- Depend on gwt-user, -dev for compilation only -->
            <dependency>
                <groupId>org.gwtproject</groupId>
                <artifactId>gwt-user</artifactId>
                <version>${gwt.version}</version>
            </dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.1</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.gwtproject</groupId>
                <artifactId>gwt</artifactId>
                <version>2.10.0</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <!--
    We're deliberately breaking with the conventions of other org.gwtproject artifactIds here, so that it can be clear
    when modules are actually gwt-only (or servlet-only, etc), and when they are sharable.
    -->
    <modules>
        <!-- serialization api -->
        <module>serialization-api</module>
        <!-- string serializer impl -->
        <module>string-serializer-streams</module>
        <!-- bytebuffer serializer impl -->
        <module>bytebuffer-serializer-streams</module>
        <!-- serializer generating processor -->
        <module>serialization-processor</module>
        <!-- field serializer impls for the subset of the JRE supported by GWT -->
        <module>gwt-jre-serializers</module>
        <!-- a simple example of the serializer wiring, without any endpoints -->
        <module>serialization-samples</module>
        <!-- experimental utility to find all types in a jar so that they can be referenced by a project expecting to rely on those types -->
        <!-- temporarily disabled, since it doesn't seem to work any more, and has some out of date dependencies -->
        <!--<module>discovery</module>-->

        <!-- gwt rpc endpoints api, base impls -->
        <module>endpoint-api</module>
        <!-- endpoint generating processor -->
        <module>endpoint-processor</module>
        <!-- gwt-client wiring to create websocket, xhr endpoints -->
        <module>endpoint-client-gwt</module>
        <!-- servlet wiring to create websocket, xhr endpoints -->
        <module>endpoint-server-servlet</module>
        <!-- vertx wiring to create server websocket endpoint -->
        <module>endpoint-server-vertx</module>

        <!-- servlet/gwt sample using these endpoints -->
        <module>endpoint-samples</module>

        <!-- experimental workers, should fit the endpoint mold above -->
        <module>workers</module>
        <!-- sample showing workers -->
        <module>workers-sample</module>
        <module>endpoint-client-okhttp</module>
        <module>serialization-details</module>
    </modules>


    <!-- Specify that we will push snapshots and releases to sonatype's repos -->
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </repository>
    </repositories>

    <profiles>
        <!-- release profile to create sources, javadoc, and sign all artifacts before uploading -->
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- see http://central.sonatype.org/pages/working-with-pgp-signatures.html for more detail -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>