<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of the Meeds project (https://meeds.io/).
Copyright (C) 2020 Meeds Association
contact@meeds.io
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

-->
<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>
  <parent>
    <groupId>org.exoplatform</groupId>
    <artifactId>maven-parent-pom</artifactId>
    <version>23</version>
    <relativePath />
  </parent>
  <groupId>io.meeds.distribution</groupId>
  <artifactId>plf-public-distributions</artifactId>
  <version>1.2.4-RC01</version>
  <packaging>pom</packaging>
  <name>eXo Meeds:: Meeds Public Distribution</name>
  <modules>
    <module>services</module>
    <module>webapps</module>
    <module>packaging</module>
  </modules>
  <scm>
    <connection>scm:git:git://github.com/meeds-io/meeds.git</connection>
    <developerConnection>scm:git:git@github.com:meeds-io/meeds.git</developerConnection>
    <tag>1.2.4-RC01</tag>
    <url>https://github.com/meeds-io/meeds</url>
  </scm>
  <properties>
    <!-- **************************************** -->
    <!-- Repository settings                      -->
    <!-- **************************************** -->
    <exo.snapshots.repo.url>https://repository.exoplatform.org/content/repositories/meeds-snapshots</exo.snapshots.repo.url>
    <!-- **************************************** -->
    <!-- Dependencies Versions                    -->
    <!-- **************************************** -->
    <!-- The version of Platform To bundle -->
    <org.exoplatform.social.version>6.2.4-RC01</org.exoplatform.social.version>
    <org.exoplatform.platform-ui.version>6.2.4-RC01</org.exoplatform.platform-ui.version>
    <!-- The version of the add-ons manager -->
    <org.exoplatform.platform.addons-manager.version>2.2.4-RC01</org.exoplatform.platform.addons-manager.version>
    <!-- ************** -->
    <!-- Add-ons for Community packaging   -->
    <!-- ************** -->
    <addon.exo.kudos.id>meeds-kudos</addon.exo.kudos.id>
    <addon.exo.kudos.version>2.2.4-RC01</addon.exo.kudos.version>
    <addon.exo.perk-store.id>meeds-perk-store</addon.exo.perk-store.id>
    <addon.exo.perk-store.version>2.2.4-RC01</addon.exo.perk-store.version>
    <addon.exo.wallet.id>meeds-wallet</addon.exo.wallet.id>
    <addon.exo.wallet.version>2.2.4-RC01</addon.exo.wallet.version>
    <addon.exo.gamification.id>meeds-gamification</addon.exo.gamification.id>
    <addon.exo.gamification.version>2.2.4-RC01</addon.exo.gamification.version>
    <addon.exo.push-notifications.id>meeds-push-notifications</addon.exo.push-notifications.id>
    <addon.exo.push-notifications.version>2.2.4-RC01</addon.exo.push-notifications.version>
    <addon.exo.app-center.id>meeds-app-center</addon.exo.app-center.id>
    <addon.exo.app-center.version>2.2.4-RC01</addon.exo.app-center.version>
    <addon.exo.notes.id>meeds-notes</addon.exo.notes.id>
    <addon.exo.notes.version>1.0.4-RC01</addon.exo.notes.version>
    <!-- Add-on manager extension to use (empty for Unix, .bat for Windows) -->
    <addon.manager.extension />
  </properties>
  <dependencyManagement>
    <dependencies>
      <!-- Dependencies -->
      <dependency>
        <groupId>org.exoplatform.social</groupId>
        <artifactId>social</artifactId>
        <version>${org.exoplatform.social.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.exoplatform.platform-ui</groupId>
        <artifactId>platform-ui</artifactId>
        <version>${org.exoplatform.platform-ui.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.exoplatform.platform</groupId>
        <artifactId>addons-manager</artifactId>
        <version>${org.exoplatform.platform.addons-manager.version}</version>
        <type>zip</type>
      </dependency>
      <!-- Pre-bundled addons -->
      <dependency>
        <groupId>org.exoplatform.addons.wallet</groupId>
        <artifactId>wallet-packaging</artifactId>
        <version>${addon.exo.wallet.version}</version>
        <type>zip</type>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.exoplatform.addons.kudos</groupId>
        <artifactId>kudos-packaging</artifactId>
        <version>${addon.exo.kudos.version}</version>
        <type>zip</type>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.exoplatform.addons.perk-store</groupId>
        <artifactId>perk-store-packaging</artifactId>
        <version>${addon.exo.perk-store.version}</version>
        <type>zip</type>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.exoplatform.addons.gamification</groupId>
        <artifactId>gamification-packaging</artifactId>
        <version>${addon.exo.gamification.version}</version>
        <type>zip</type>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.exoplatform.addons.push-notifications</groupId>
        <artifactId>exo-push-notifications-addon-packaging</artifactId>
        <version>${addon.exo.push-notifications.version}</version>
        <type>zip</type>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.exoplatform.addons.app-center</groupId>
        <artifactId>app-center-packaging</artifactId>
        <version>${addon.exo.app-center.version}</version>
        <type>zip</type>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.exoplatform.addons.notes</groupId>
        <artifactId>notes-packaging</artifactId>
        <version>${addon.exo.notes.version}</version>
        <type>zip</type>
        <scope>provided</scope>
      </dependency>
      <!-- Project artifacts -->
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-configuration</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-community-edition-service</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-public-distributions</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-public-distributions</artifactId>
        <version>${project.version}</version>
        <type>zip</type>
        <classifier>source-release</classifier>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-assemblies</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-community-tomcat-standalone</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-community-tomcat-standalone</artifactId>
        <version>${project.version}</version>
        <type>zip</type>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-dependencies</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-community-sources</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-exo-tools</artifactId>
        <version>${project.version}</version>
        <type>jar</type>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-packaging-resources</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-packaging-resources</artifactId>
        <version>${project.version}</version>
        <type>zip</type>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-root-webapp</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-root-webapp</artifactId>
        <version>${project.version}</version>
        <type>war</type>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-meeds-extension</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-meeds-extension</artifactId>
        <version>${project.version}</version>
        <type>war</type>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-tomcat-integration-webapp</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-tomcat-integration-webapp</artifactId>
        <version>${project.version}</version>
        <type>war</type>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-tomcat-pc-creator-listener</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-tomcat-pc-creator-listener</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>plf-tomcat-resources</artifactId>
        <version>${project.version}</version>
        <type>zip</type>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <pluginManagement>
      <plugins>
        <!-- Required to not break gmaven usage for -Pfix-headers by example-->
        <plugin>
          <groupId>org.codehaus.gmaven</groupId>
          <artifactId>gmaven-plugin</artifactId>
          <configuration>
            <providerSelection>2.0</providerSelection>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <profiles>
    <profile>
      <!-- Additional tasks done while performing a release -->
      <id>exo-release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
              <execution>
                <id>banned-dependencies</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <!-- We must take care to never grab these artifacts in our distribution -->
                    <!-- Never exclude them here but ask to exclude them at the furthest dependency level in the dependency tree -->
                    <bannedDependencies>
                      <message>There are some unwanted dependencies in the dependency tree. Find them with "mvn dependency:tree -Dverbose -Dincludes=groupId:artifactId:version" and remove them at the furthest dependency level in the dependency tree</message>
                      <searchTransitive>true</searchTransitive>
                      <excludes>
                        <!-- No Apache Tomcat artifacts have to be added in the packaging -->
                        <exclude>org.apache.tomcat:*</exclude>
                        <!-- Ant and related aren't really useful for us at runtime -->
                        <exclude>org.apache.ant:*</exclude>
                        <exclude>org.apache.axis:axis-ant:*</exclude>
                        <!-- commons-logging is forbidden and must be replaced by org.slf4j:jcl-over-slf4j -->
                        <exclude>commons-logging:*</exclude>
                        <!-- log4j is forbidden and must be replaced by org.slf4j:log4j-over-slf4j -->
                        <exclude>log4j:*</exclude>
                        <exclude>org.apache.logging.log4j:*</exclude>
                        <!-- We use jcl-over-slf4j, thus this one is forbidden to avoid infinite loops -->
                        <exclude>org.slf4j:slf4j-jcl:*</exclude>
                        <!-- We use log4j-over-slf4j, thus this one is forbidden to avoid infinite loops -->
                        <exclude>org.slf4j:slf4j-logj12:*</exclude>
                        <!-- We use jul-to-slf4j, thus this one is forbidden to avoid infinite loops -->
                        <exclude>org.slf4j:slf4j-jdk14:*</exclude>
                        <!-- These old versions of xstream are in conflict with new ones under com.thoughtworks.xstream:xstream -->
                        <exclude>xstream:xstream:*</exclude>
                        <!-- These old versions of jdom are in conflict with new ones under org.jdom -->
                        <exclude>jdom:*:*</exclude>
                        <!-- These old versions of eXo portal are in conflict with new ones under org.exoplatform.gatein.portal -->
                        <exclude>org.exoplatform.portal:*:*</exclude>
                        <!-- Servlet API are provided by the app server. It shouldn't come from a project -->
                        <exclude>javax.servlet:*</exclude>
                        <exclude>com.google.gwt:gwt-user:*</exclude>
                        <exclude>javax.servlet.jsp:*</exclude>
                        <!-- Testing stuffs should never come here -->
                        <exclude>junit:*</exclude>
                        <exclude>org.testng:*</exclude>
                        <exclude>org.exoplatform.tool:exo.tool.framework.junit</exclude>
                        <exclude>org.jmock:*</exclude>
                        <exclude>jmock:*</exclude>
                        <exclude>org.mockito:*</exclude>
                        <!-- These old versions of jdom are in conflict with new ones under org.jdom:* -->
                        <exclude>jdom:*</exclude>
                        <!-- These artifacts are in conflict with others ones under xpp3:xpp3 -->
                        <exclude>xpp3:xpp3_min</exclude>
                        <!-- These artifact is in conflict with ones under commons-beanutils:commons-beanutils -->
                        <exclude>commons-beanutils:commons-beanutils-core</exclude>
                        <!-- This artifact is in conflict with the one under org.jboss.logging:jboss-logging -->
                        <exclude>org.jboss.logging:jboss-logging-spi</exclude>
                        <!-- This artifact is in conflict with the one under org.codehaus.woodstox:woodstox-core-asl -->
                        <exclude>org.codehaus.woodstox:wstx-asl</exclude>
                        <!-- These are provided APIs by Java itself or the app server -->
                        <exclude>xml-apis:*</exclude>
                        <exclude>org.apache.geronimo.specs:geronimo-stax-api_1.0_spec</exclude>
                        <exclude>stax:*</exclude>
                        <exclude>javax.xml.stream:*</exclude>
                        <exclude>org.apache.geronimo.specs:geronimo-activation_1.0.2_spec</exclude>
                        <exclude>org.jboss.javaee:jboss-transaction-api</exclude>
                        <exclude>org.jboss.spec.javax.transaction:*</exclude>
                        <exclude>org.ow2.spec.ee:ow2-jta-1.1-spec</exclude>
                        <!-- PLF-4528 / CAL-148 : Conflict with com.totsp.feedpod:itunes-com-podcast -->
                        <exclude>rome:modules:*</exclude>
                        <!-- Don't package any XML APIs dep to avoid conflicts the JVM -->
                        <exclude>*:xmlParserAPIs:*</exclude>
                        <!-- PLF-6122: Exclude icepdf older than 5.1.0. The groupId for Open Source bundles is now org.icepdf.os -->
                        <exclude>org.icepdf:icepdf-core:*</exclude>
                        <!-- COR-338: Exclude Apache poi-ooxml 3.8. Platform uses now 3.8-eXo01 -->
                        <exclude>org.apache.poi:poi-ooxml:[3.8]</exclude>
                        <!-- DEP-101: Elasticsearch depends on lucene version incompatible with the JCR -->
                        <exclude>org.apache.lucene:*:4</exclude>
                      </excludes>
                      <includes>
                        <!-- This artifact isn't by default in tomcat -->
                        <include>org.apache.tomcat:tomcat-catalina-jmx-remote</include>
                        <!-- We can use the tomcat distro -->
                        <include>org.apache.tomcat:tomcat:zip</include>
                      </includes>
                    </bannedDependencies>
                  </rules>
                  <fail>true</fail>
                </configuration>
              </execution>
              <execution>
                <id>enforce-bytecode-version</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <!-- This rule checks the dependencies transitively and fails if any class of any dependency is having its bytecode version higher than the one specified. -->
                    <enforceBytecodeVersion>
                      <maxJdkVersion>${maven.compiler.target}</maxJdkVersion>
                    </enforceBytecodeVersion>
                  </rules>
                  <fail>true</fail>
                </configuration>
              </execution>
              <execution>
                <id>enforce-upper-bound-deps</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <!-- WARNING : Maven dependency resolution system didn't selected the higher version required by all transitive dependencies -->
                    <!-- See: http://maven.apache.org/enforcer/enforcer-rules/requireUpperBoundDeps.html -->
                    <requireUpperBoundDeps />
                  </rules>
                  <fail>false</fail>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
