<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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <groupId>fr.paris.lutece.tools</groupId>
    <artifactId>lutece-maven-plugin</artifactId>
    <packaging>maven-plugin</packaging>
    <version>7.2.0</version>
    <name>Lutece maven plugin</name>

    <description>
        A Maven plugin which handles the common tasks to develop and
        package the Lutece core and Lutece plugins, and to assemble a
        web site from a set of Lutece artifacts.
    </description>

    <inceptionYear>2006</inceptionYear>

    <!-- Useful for version:display-plugin-updates -->
    <prerequisites>
        <maven>3.6.3</maven>
    </prerequisites>

    <organization>
        <name>Mairie de Paris</name>
        <url>http://lutece.paris.fr</url>
    </organization>

    <url>http://dev.lutece.paris.fr/plugins/${project.artifactId}/</url>

    <repositories>
        <repository>
            <id>luteceSnapshot</id>
            <name>luteceSnapshot</name>
            <url>https://dev.lutece.paris.fr/snapshot_repository</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>lutece</id>
            <name>luteceRepository</name>
            <url>https://dev.lutece.paris.fr/maven_repository</url>
            <layout>default</layout>
        </repository>
    </repositories>

    <dependencies>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>3.9.8</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-tools-api</artifactId>
            <version>3.15.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-compat</artifactId>
            <version>3.9.8</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-archiver</artifactId>
            <version>4.11.0</version>
        </dependency>
		 
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-archiver</artifactId>
            <version>3.6.2</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>file-management</artifactId>
            <version>3.2.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>fr.paris.lutece.tools</groupId>
            <artifactId>library-sql-utils</artifactId>
	    <version>2.0.1</version>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>5.11.4</version>
            <scope>test</scope>
        </dependency>
        <!-- dependencies to annotations -->
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>3.15.0</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>


    <build>
        <plugins>
			<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.12.0</version>
        <configuration>
        	<additionalOptions>-Xdoclint:none</additionalOptions>   
        </configuration>
      </plugin>
            <!-- Configuration to release from GitHub -->
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>3.3.1</version>
                <configuration>
                    <providerImplementations>
                        <git>jgit</git>
                    </providerImplementations>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-jgit</artifactId>
                        <version>2.2.1</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.16.0</version>
            </plugin>
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.22.0</version>
                <configuration>
                    <locales>en,fr</locales>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-descriptor</id>
                        <goals>
                            <goal>attach-descriptor</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.9.0</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.15.0</version>
                <executions>
                    <execution>
                        <id>generated-helpmojo</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>


            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.5.0</version>
            </plugin>

            <!-- Pinned : Maven 3.6.3 (our prerequisite) would otherwise provide
                 surefire 2.12.4, which does not run JUnit 5 tests at all. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.5.6</version>
            </plugin>
        </plugins>
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ftp</artifactId>
                <version>3.5.3</version>
            </extension>
        </extensions>
    </build>

    <scm>
        <connection>scm:git:https://github.com/lutece-platform/tools-maven-lutece-plugin.git</connection>
        <developerConnection>scm:git:https://github.com/lutece-platform/tools-maven-lutece-plugin.git</developerConnection>
        <url>https://github.com/lutece-platform/tools-maven-lutece-plugin.git</url>
        <tag>lutece-maven-plugin-7.2.0</tag>
    </scm>



    <distributionManagement>
        <repository>
            <id>lutece_releases_repository</id>
            <url>https://dev.lutece.paris.fr/nexus/content/repositories/lutece_releases_repository</url>
        </repository>

        <snapshotRepository>
            <uniqueVersion>true</uniqueVersion>
            <id>lutece_snapshots_repository</id>
            <url>https://dev.lutece.paris.fr/nexus/content/repositories/lutece_snapshots_repository</url>
        </snapshotRepository>

        <site>
            <id>lutece_ftp_site_maven</id>
            <url>ftp://site-deploy.dev.lutece.paris.fr/site/plugins/maven-lutece-plugin</url>
        </site>
    </distributionManagement>

    <!--<distributionManagement>
        <site>
            <id>ssh-repository</id>
            <url>
                scp://${serverUrl}/opt/lutece/site/plugins/${project.artifactId}
            </url>
        </site>
    </distributionManagement>-->

    <profiles>
        <!--
            Integration tests : each project under src/it is built with the plugin freshly
            installed, then checked by its verify.groovy. They exercise what a unit test cannot
            reach - the multi-module reactor and the goals end to end.

            Run with : mvn verify -Prun-its
        -->
        <profile>
            <id>run-its</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-invoker-plugin</artifactId>
                        <version>3.9.0</version>
                        <configuration>
                            <projectsDirectory>src/it</projectsDirectory>
                            <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                            <cloneClean>true</cloneClean>
                            <postBuildHookScript>verify</postBuildHookScript>
                            <streamLogs>false</streamLogs>
                            <showErrors>true</showErrors>
                        </configuration>
                        <executions>
                            <execution>
                                <id>integration-test</id>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <properties>
        <maven.compiler.release>17</maven.compiler.release>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>

</project>
