<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (C) 2000 - 2022 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:
  ~ "http://www.silverpeas.org/docs/core/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 <http://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.1</version>
  </parent>

  <groupId>org.silverpeas.components</groupId>
  <artifactId>mobile</artifactId>
  <packaging>pom</packaging>
  <version>6.4.7-build260402</version>
  <name>Silverpeas Mobile component</name>

  <properties>
    <silverpeas.version>6.4.7-build260402</silverpeas.version>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>
     <next.release>6.4.7</next.release>
  </properties>

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

    <repository>
      <id>Central</id>
      <!--layout>legacy</layout-->
      <name>Central Repository</name>
      <url>https://repo.maven.apache.org/maven2/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
   </repositories>

  <build>
    <plugins>
      <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>

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

  <modules>
    <module>mobile-configuration</module>
    <module>mobile-war</module>
  </modules>
</project>
