<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>io.apitomy</groupId>
    <artifactId>jsweet-parent</artifactId>
    <version>3.1.3</version>
    <name>JSweet Parent</name>
    <description>JSweet maven plugin and inlined dependencies</description>
    <url>https://github.com/Apitomy/jsweet-maven-plugin</url>
    <packaging>pom</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version.release>11</java.version.release>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>

        <jsweet.transpiler.version>3.1.0</jsweet.transpiler.version>
        <maven.version>3.6.3</maven.version>
        <version.gson>2.8.6</version.gson>
        <version.minimal-json>0.9.4</version.minimal-json>
        <version.xz>1.8</version.xz>
        <version.osgi-core>4.3.0</version.osgi-core>
        <version.commons-lang3>3.9</version.commons-lang3>

        <version.maven-compiler-plugin>3.15.0</version.maven-compiler-plugin>
        <version.maven-source-plugin>3.4.0</version.maven-source-plugin>
        <version.maven-javadoc-plugin>3.12.0</version.maven-javadoc-plugin>
        <version.maven-gpg-plugin>3.2.8</version.maven-gpg-plugin>
        <version.org.sonatype.central-publishing-maven-plugin>0.10.0</version.org.sonatype.central-publishing-maven-plugin>
    </properties>

    <modules>
        <module>sourcemap-builder</module>
        <module>typescript-java-ts-core</module>
        <module>transpiler</module>
        <module>plugin</module>
    </modules>

    <developers>
        <developer>
            <id>lgrignon</id>
            <name>Louis Grignon</name>
            <email>louis.grignon@gmail.com</email>
        </developer>
        <developer>
            <id>EricWittmann</id>
            <name>Eric Wittmann</name>
            <email>eric.wittmann@gmail.com</email>
        </developer>
    </developers>

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

    <issueManagement>
        <url>https://github.com/Apitomy/jsweet-maven-plugin/issues</url>
        <system>GitHub Issues</system>
    </issueManagement>

    <scm>
        <url>https://github.com/Apitomy/jsweet-maven-plugin</url>
        <connection>scm:git:git://github.com/Apitomy/jsweet-maven-plugin.git</connection>
        <developerConnection>scm:git:git@github.com:Apitomy/jsweet-maven-plugin.git</developerConnection>
    </scm>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${version.maven-compiler-plugin}</version>
                <configuration>
                    <release>${java.version.release}</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${version.maven-source-plugin}</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>${version.maven-javadoc-plugin}</version>
                <configuration>
                    <doclint>none</doclint>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>${version.org.sonatype.central-publishing-maven-plugin}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <waitUntil>published</waitUntil>
                            <autoPublish>true</autoPublish>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${version.maven-gpg-plugin}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <passphraseEnvName>MAVEN_GPG_PASSPHRASE</passphraseEnvName>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
