<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>hu.blackbelt</groupId>
    <version>1.0.1</version>
    <artifactId>flutter-maven-plugin</artifactId>
    <packaging>maven-plugin</packaging>
    <name>flutter-maven-plugin</name>
    <description>Flutter Maven plugin. It can run to flutter tasks</description>

    <url>https://github.com/${project-repositoryId}</url>

    <issueManagement>
        <url>https://github.com/${project-repositoryId}/issues</url>
        <system>GitHub Issues</system>
    </issueManagement>

    <scm>
        <connection>scm:git:git@github.com:${project-repositoryId}.git</connection>
        <developerConnection>scm:git:ssh://git@github.com:${project-repositoryId}.git
        </developerConnection>
        <url>http://github.com/${project-repositoryId}</url>
    </scm>

    <developers>
        <developer>
            <id>robson</id>
            <name>Róbert Csákány</name>
            <email>robert.csakany@blackbelt.hu</email>
            <url>https://github.com/robertcsakany</url>
            <organization>BlackBelt Technology</organization>
            <organizationUrl>http://www.blackbelt.hu</organizationUrl>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    
    <properties>
        <project-shortname>flutter-maven-plugin</project-shortname>
        <project-repositoryId>BlackBeltTechnology/flutter-maven-plugin</project-repositoryId>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <timestamp>${maven.build.timestamp}</timestamp>
        <maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
        <src.dir>src/main</src.dir>

        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <slf4j-version>1.6.6</slf4j-version>

        <!--
        <log4j.configuration>log4j.properties</log4j.configuration>
        -->
    </properties>

        
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <extensions>true</extensions>
                <version>3.5</version>
                <configuration>
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                </configuration>
                <executions>
                    <execution>
                        <id>mojo-descriptor</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                        <!--
                        <configuration>
                            <goalPrefix>flutter</goalPrefix>
                        </configuration> -->
                    </execution>
                    <execution>
                        <id>help-goal</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.7.0</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.2.0</version>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings
                 only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>
                                            org.apache.maven.plugins
                                        </groupId>
                                        <artifactId>
                                            maven-plugin-plugin
                                        </artifactId>
                                        <versionRange>
                                            [3.3,)
                                        </versionRange>
                                        <goals>
                                            <goal>helpmojo</goal>
                                            <goal>descriptor</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <dependencies>
        <!--
        <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-archetype-plugin</artifactId>
            <version>3.2.0</version>
            <type>maven-plugin</type>
        </dependency>
        -->
        <dependency>
            <groupId>org.eclipse.jgit</groupId>
            <artifactId>org.eclipse.jgit</artifactId>
            <version>5.10.0.202012080955-r</version>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
            <version>1.20</version>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-exec</artifactId>
            <version>1.3</version>
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.13</version>
        </dependency>

        <dependency>
            <groupId>org.twdata.maven</groupId>
            <artifactId>mojo-executor</artifactId>
            <version>2.3.1</version>
        </dependency>


        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.1</version>
        </dependency>

        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2.1</version>
        </dependency>

        <dependency>
            <groupId>org.tukaani</groupId>
            <artifactId>xz</artifactId>
            <version>1.8</version>
        </dependency>

        <dependency>
            <groupId>com.vdurmont</groupId>
            <artifactId>semver4j</artifactId>
            <version>3.1.0</version>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.18</version>
            <scope>provided</scope>
        </dependency>

        
        <!-- Maven plugin development -->
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>3.1.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>2.2.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>3.3</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>3.2.3</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.sonatype.plexus</groupId>
            <artifactId>plexus-build-api</artifactId>
            <version>0.0.7</version>
        </dependency>
        
        <dependency>
            <groupId>org.skife.url</groupId>
            <artifactId>url-scheme-registry</artifactId>
            <version>0.0.1</version>
        </dependency>
        
        <dependency>
            <groupId>org.twdata.maven</groupId>
            <artifactId>mojo-executor</artifactId>
            <version>2.3.0</version>
        </dependency>
        
<!--
        <dependency>
            <groupId>uk.org.lidalia</groupId>
            <artifactId>sysout-over-slf4j</artifactId>
            <version>1.0.2</version>
        </dependency>
-->
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20171018</version>
        </dependency>

        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-io</artifactId>
            <version>3.0.1</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>3.1.0</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.30</version>
        </dependency>

        <!--
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.30</version>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        -->
        <!--
        <dependency>
            <groupId>org.eclipse.emf</groupId>
            <artifactId>org.eclipse.emf.ecore.xmi</artifactId>
            <version>2.16.0</version>
            <scope>compile</scope>
        </dependency>
        -->
    </dependencies>
    
    <profiles>
        <profile>
            <id>sign-artifacts</id>
            <build>
                <plugins>
                    <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>
                                <configuration>
                                    <keyname>${gpg.keyname}</keyname>
                                    <passphraseServerId>${gpg.keyname}</passphraseServerId>
                                    <!-- This is necessary for gpg to not try to use the pinentry programs -->
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>release-dummy</id>
            <distributionManagement>
                <snapshotRepository>
                    <id>dummy-distribution</id>
                    <url>file:///tmp/maven-snapshot/</url>
                </snapshotRepository>
                <repository>
                    <id>dummy-distribution</id>
                    <url>file:///tmp/maven-release/</url>
                </repository>
            </distributionManagement>
        </profile>

        <profile>
            <id>judong-upstream-snapshot-undefined</id>
            <activation>
                <property>
                    <name>!env.JUDONG_MAVEN_UPSTREAM_SNAPSHOT</name>
                </property>
            </activation>
            <properties>
                <judong-upstream-snapshot>https://nexus.judo.technology/repository/maven-judong/</judong-upstream-snapshot>
            </properties>
        </profile>
        <profile>
            <id>judong-upstream-snapshot-defined</id>
            <activation>
                <property>
                    <name>env.JUDONG_MAVEN_UPSTREAM_SNAPSHOT</name>
                </property>
            </activation>
            <properties>
                <judong-upstream-snapshot>${env.JUDONG_MAVEN_UPSTREAM_SNAPSHOT}</judong-upstream-snapshot>
            </properties>
        </profile>

        <profile>
            <id>judong-upstream-release-undefined</id>
            <activation>
                <property>
                    <name>!env.JUDONG_MAVEN_UPSTREAM_RELEASE</name>
                </property>
            </activation>
            <properties>
                <judong-upstream-release>https://nexus.judo.technology/repository/maven-judong/</judong-upstream-release>
            </properties>
        </profile>
        <profile>
            <id>judong-upstream-release-defined</id>
            <activation>
                <property>
                    <name>env.JUDONG_MAVEN_UPSTREAM_RELEASE</name>
                </property>
            </activation>
            <properties>
                <judong-upstream-release>${env.JUDONG_MAVEN_UPSTREAM_RELEASE}</judong-upstream-release>
            </properties>
        </profile>

        <profile>
            <id>release-judong</id>
            <distributionManagement>
                <snapshotRepository>
                    <id>judong-nexus-distribution</id>
                    <!--suppress UnresolvedMavenProperty -->
                    <url>${judong-upstream-release}</url>
                </snapshotRepository>
                <repository>
                    <id>judong-nexus-distribution</id>
                    <!--suppress UnresolvedMavenProperty -->
                    <url>${judong-upstream-snapshot}</url>
                </repository>
            </distributionManagement>
        </profile>

        <profile>
            <id>release-central</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <version>1.6.8</version>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <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>
        </profile>

        <profile>
            <id>generate-github-release-body</id>
            <activation>
                <property>
                    <name>github_release</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-resources-plugin</artifactId>
                        <version>3.2.0</version>
                        <executions>
                            <execution>
                                <id>template-github-release-body</id>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${basedir}/.release</outputDirectory>
                                    <resources>
                                        <resource>
                                            <directory>${project.basedir}</directory>
                                            <filtering>true</filtering>
                                            <includes>
                                                <include>.releasetemplate</include>
                                            </includes>
                                        </resource>
                                    </resources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
