<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2000 - 2024 Silverpeas

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or (at your option) any later version.

    As a special exception to the terms and conditions of version 3.0 of
    the GPL, you may redistribute this Program in connection with Free/Libre
    Open Source Software ("FLOSS") applications as described in Silverpeas's
    FLOSS exception.  You should have received a copy of the text describing
    the FLOSS exception, and it is also available here:
    "https://www.silverpeas.org/legal/floss_exception.html"

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

-->
<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 https://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.silverpeas</groupId>
    <artifactId>silverpeas-project</artifactId>
    <version>1.6.2</version>
  </parent>

  <groupId>org.silverpeas</groupId>
  <artifactId>core</artifactId>
  <version>6.4.7-build260407</version>
  <packaging>pom</packaging>
  <name>Silverpeas Core</name>
  <url>https://www.silverpeas.org/docs/core</url>

  <description>
    The foundation of Silverpeas. It defines the transverse service and the core objects of
    Silverpeas upon which any business-specific components can be built.
  </description>

  <scm>
    <connection>scm:git:git@github.com:Silverpeas/Silverpeas-Core.git</connection>
    <developerConnection>scm:git:git@github.com:Silverpeas/Silverpeas-Core.git</developerConnection>
    <url>https://github.com/Silverpeas/Silverpeas-Core</url>
    <tag>HEAD</tag>
  </scm>

  <repositories>
    <repository>
      <id>Silverpeas</id>
      <layout>default</layout>
      <name>Silverpeas Repository</name>
      <url>https://nexus3.silverpeas.org/repository/silverpeas</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>Silverpeas</id>
      <name>Silverpeas Maven 3.x Repository</name>
      <url>https://nexus3.silverpeas.org/repository/silverpeas</url>
    </pluginRepository>
  </pluginRepositories>

  <properties>
    <!-- property used by the CI to both deploy a build version and release the next stable version -->
    <next.release>6.4.7</next.release>
  </properties>

  <dependencies>
    <dependency>
      <groupId>javax</groupId>
      <artifactId>javaee-api</artifactId>
    </dependency>
    <dependency>
      <groupId>io.opencensus</groupId>
      <artifactId>opencensus-api</artifactId>
    </dependency>
    <dependency>
      <groupId>io.grpc</groupId>
      <artifactId>grpc-context</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.api-client</groupId>
      <artifactId>google-api-client</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.auth</groupId>
      <artifactId>google-auth-library-oauth2-http</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.apis</groupId>
      <artifactId>google-api-services-admin-directory</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-descriptor</id>
            <goals>
              <goal>attach-descriptor</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <relativizeDecorationLinks>false</relativizeDecorationLinks>
          <generateSitemap>true</generateSitemap>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestEntries>
              <Build-Version>${project.version}</Build-Version>
              <Git-Commit>${git.commit.id.abbrev}</Git-Commit>
              <Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <archive>
            <manifestEntries>
              <Build-Version>${project.version}</Build-Version>
              <Logging-Profile>silverpeas</Logging-Profile>
              <Git-Commit>${git.commit.id.abbrev}</Git-Commit>
              <Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>pl.project13.maven</groupId>
        <artifactId>git-commit-id-plugin</artifactId>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>revision</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
          <dateFormat>yyyy-MM-dd'T'HH:mm:ssZ</dateFormat>
          <generateGitPropertiesFile>false</generateGitPropertiesFile>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>index</report>
              <report>summary</report>
              <report>scm</report>
              <report>dependencies</report>
              <report>dependency-convergence</report>
              <report>dependency-management</report>
              <report>modules</report>
            </reports>
          </reportSet>
        </reportSets>
        <configuration>
          <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
          <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>aggregate</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>deployment</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <phase>verify</phase>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <archive>
                <manifestEntries>
                  <Build-Version>${project.version}</Build-Version>
                  <Git-Commit>${git.commit.id.abbrev}</Git-Commit>
                  <Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
                </manifestEntries>
              </archive>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <phase>verify</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <archive>
                <manifestEntries>
                  <Build-Version>${project.version}</Build-Version>
                  <Git-Commit>${git.commit.id.abbrev}</Git-Commit>
                  <Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
                </manifestEntries>
              </archive>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>restapi</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.qmino</groupId>
            <artifactId>miredot-plugin</artifactId>
            <configuration>
              <output>
                <title>Silverpeas Core REST API</title>
                <location>restapi/core</location>
                <html>
                  <baseUrl>https://www.silverpeas.org/silverpeas</baseUrl>
                </html>
              </output>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <modules>
    <module>core-configuration</module>
    <module>core-api</module>
    <module>core-test</module>
    <module>core-jcr</module>
    <module>core-library</module>
    <module>core-services</module>
    <module>core-rs</module>
    <module>core-web-test</module>
    <module>core-web</module>
    <module>core-war</module>
  </modules>

</project>
