<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.tsdefs</groupId>
    <artifactId>jsinterop-ts-defs</artifactId>
    <version>1.0.0-RC2</version>
    <packaging>pom</packaging>

    <name>jsinterop-ts-defs</name>
    <url>https://github.com/Vertispan/jsinterop-ts-defs</url>

    <description>
        An annotation processor that generates TypeScript definitions from Java JsInterop classes.
    </description>

    <organization>
        <name>Vertispan</name>
        <url>https://www.vertispan.com/</url>
    </organization>

    <inceptionYear>2023</inceptionYear>

    <developers>
        <developer>
            <name>Ahmad Bawaneh</name>
            <email>ahmad@vertispan.com</email>
            <organization>Vertispan LLC</organization>
        </developer>
        <developer>
            <name>Colin Alworth</name>
            <email>colin@vertispan.com</email>
            <organization>Vertispan LLC</organization>
        </developer>
    </developers>

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

    <issueManagement>
        <url>https://github.com/Vertispan/jsinterop-ts-defs/issues</url>
        <system>GitHub Issues</system>
    </issueManagement>

    <scm>
        <connection>scm:git:https://github.com/Vertispan/jsinterop-ts-defs.git</connection>
        <developerConnection>scm:git:git@github.com:vertispan/jsinterop-ts-defs.git</developerConnection>
        <url>https://github.com/vertispan/jsinterop-ts-defs</url>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.outputEncoding>UTF-8</project.build.outputEncoding>
        <!-- TODO : force use of java 11   -->
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>

        <maven.license.plugin>3.0</maven.license.plugin>
        <maven.fmt.plugin>2.9</maven.fmt.plugin>
        <maven.enforcer.plugin.version>1.4.1</maven.enforcer.plugin.version>
        <maven.gpg.plugin.version>1.6</maven.gpg.plugin.version>
        <maven.javadoc.plugin.version>3.0.1</maven.javadoc.plugin.version>
        <maven.source.plugin.version>3.0.1</maven.source.plugin.version>
        <maven.nexus.staging.plugin>1.6.8</maven.nexus.staging.plugin>

    </properties>

    <modules>
        <module>jsinterop-ts-defs-processor</module>
        <module>jsinterop-ts-defs-annotations</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.google.jsinterop</groupId>
                <artifactId>jsinterop-annotations</artifactId>
                <version>2.0.0</version>
            </dependency>
            <dependency>
                <groupId>com.google.jsinterop</groupId>
                <artifactId>base</artifactId>
                <version>1.0.0</version>
            </dependency>
            <dependency>
                <groupId>org.checkerframework</groupId>
                <artifactId>checker-qual</artifactId>
                <version>3.12.0</version>
            </dependency>
            <dependency>
                <groupId>com.google.errorprone</groupId>
                <artifactId>error_prone_annotations</artifactId>
                <version>2.7.1</version>
            </dependency>
            <dependency>
                <groupId>com.google.auto</groupId>
                <artifactId>auto-common</artifactId>
                <version>1.2.1</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>31.0.1-jre</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.2</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>com.coveo</groupId>
                <artifactId>fmt-maven-plugin</artifactId>
                <version>${maven.fmt.plugin}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${maven.license.plugin}</version>
                <configuration>
                    <header>LICENSE.header</header>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <skipExistingHeaders>true</skipExistingHeaders>
                    <mapping>
                        <java>SLASHSTAR_STYLE</java>
                    </mapping>
                    <excludes>
                        <exclude>**/README.md</exclude>
                        <exclude>**/LICENSE</exclude>
                        <exclude>**/LICENSE.header</exclude>
                        <exclude>**/AUTHORS</exclude>
                        <exclude>**/src/test/resources/**</exclude>
                        <exclude>**/src/main/resources/**</exclude>
                        <exclude>**/war</exclude>
                        <exclude>**/pom.xml</exclude>
                        <exclude>**/.github/**</exclude>
                        <exclude>**/settings.xml</exclude>
                        <exclude>**/.flattened-pom.xml</exclude>
                        <exclude>**/*.d.ts</exclude>
                        <exclude>**/*.json</exclude>
                        <exclude>**/node/**</exclude>
                        <exclude>**/node_modules/**</exclude>
                    </excludes>
                    <properties>
                        <year>${project.inceptionYear}</year>
                        <name>${project.organization.name}</name>
                    </properties>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${maven.enforcer.plugin.version}</version>
                <executions>
                    <execution>
                        <id>enforce</id>
                        <configuration>
                            <rules>
                                <dependencyConvergence/>
                            </rules>
                        </configuration>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.11.0</version>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven.source.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven.javadoc.plugin.version}</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>${maven.gpg.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${maven.nexus.staging.plugin}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <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>
</project>
