<?xml version="1.0" encoding="UTF-8"?>
<!-- spotless:off -->
<!--
 *
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This 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 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software 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 software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 *
-->
<!-- spotless:on -->

<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">
  <url>https://github.com/celements/celements-web</url>
  <parent>
    <groupId>com.celements</groupId>
    <artifactId>celementsweb</artifactId>
    <version>7.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>celements-web</artifactId>
  <packaging>war</packaging>
  <version>7.0-RC1</version>
  <name>Celements Webapplication</name>
  <licenses>
    <license>
      <name>LGPL 2.1</name>
      <url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:git://github.com/celements/celements-web</connection>
    <developerConnection>scm:git:git@github.com:celements/celements-web.git</developerConnection>
    <url>https://github.com/celements/celements-web</url>
    <tag>celements-web-7.0-RC1</tag>
  </scm>
  <properties>
    <catalina.port>10081</catalina.port>
    <catalina.home>${env.CATALINA_HOME}</catalina.home>
    <log4j.properties.logger.config />
    <selenium.browserURL.celementsweb-platform>http://localhost:${catalina.port}/</selenium.browserURL.celementsweb-platform>
    <selenium.browserURL.celementsweb>${selenium.browserURL.celementsweb-platform}</selenium.browserURL.celementsweb>
    <selenium.browserFirstRunURL.celementsweb-platform>http://localhost:${catalina.port}/</selenium.browserFirstRunURL.celementsweb-platform>
    <selenium.browserFirstRunURL.celementsweb>${selenium.browserFirstRunURL.celementsweb-platform}</selenium.browserFirstRunURL.celementsweb>
    <xwiki.plugins.lucene.indexdir>/usr/local/celements/lucene</xwiki.plugins.lucene.indexdir>
  </properties>
  <profiles>
    <profile>
      <id>local</id>
      <properties>
        <maven.test.skip>true</maven.test.skip>
        <hibernate.cfg.xml.connection.scheme>${dotenv.DB_SCHEME}</hibernate.cfg.xml.connection.scheme>
        <hibernate.cfg.xml.connection.host>${dotenv.DB_HOST}</hibernate.cfg.xml.connection.host>
        <hibernate.cfg.xml.connection.port>:${dotenv.DB_PORT}</hibernate.cfg.xml.connection.port>
        <hibernate.cfg.xml.connection.username>${dotenv.DB_USER}</hibernate.cfg.xml.connection.username>
        <hibernate.cfg.xml.connection.password>${dotenv.DB_PASSWORD}</hibernate.cfg.xml.connection.password>
        <hibernate.cfg.xml.connection.driver_class>${dotenv.DB_DRIVER}</hibernate.cfg.xml.connection.driver_class>
        <xwiki.cfg.xwiki.db>${dotenv.DB_MAIN}</xwiki.cfg.xwiki.db>
        <xwiki.cfg.xwiki.db.prefix>${dotenv.DB_PREFIX}_</xwiki.cfg.xwiki.db.prefix>
        <celements.store.docCache.capacityDoc>10000</celements.store.docCache.capacityDoc>
        <celements.store.docCache.capacityExists>100000</celements.store.docCache.capacityExists>
        <log4j.properties.monitorInterval>10</log4j.properties.monitorInterval>
        <xwiki.plugins.lucene.indexdir>${dotenv.CELEMENTS_DATA}/lucene</xwiki.plugins.lucene.indexdir>
      </properties>
    </profile>
  </profiles>
  <dependencies>
    <!-- xwiki platform dependencies -->
    <!-- START xwiki-enterprise-web war -->
    <!-- START xwiki-web-standard war -->
    <!-- Captcha component -->
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-core-captcha</artifactId>
    </dependency>
    <!-- Crypto Module -->
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-core-crypto</artifactId>
    </dependency>
    <!-- CSRF protection -->
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-core-csrf</artifactId>
    </dependency>
    <!-- END xwiki-web-standard war -->
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-scheduler</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-mailsender</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-tag-api</artifactId>
    </dependency>
    <!-- END xwiki-enterprise-web war -->
    <dependency>
      <groupId>com.xpn.xwiki.platform.plugins</groupId>
      <artifactId>xwiki-plugin-wiki-manager</artifactId>
    </dependency>
    <dependency>
      <!-- [CELDEV-1013] required by xwiki-plugin-wiki-manager -->
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>3.0.24</version>
    </dependency>
    <!-- celements module-web dependencies -->
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>blog-web</artifactId>
      <version>7.0</version>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>calendar-web</artifactId>
      <version>7.0</version>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>image-web</artifactId>
      <version>7.0</version>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>tinymce-langs</artifactId>
      <version>3.4.3.2-celRTE</version>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>tinymce-langs-v4</artifactId>
      <version>4.9.11-CEL5</version>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>tinymce-langs-v6</artifactId>
      <version>7.0</version>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-richtext-web</artifactId>
      <version>7.0</version>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>com.xpn.xwiki.platform.plugins</groupId>
      <artifactId>xwiki-plugin-application-manager</artifactId>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-wiki-manager-web</artifactId>
      <version>7.0</version>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-user-manager-web</artifactId>
      <version>7.0</version>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-layout-web</artifactId>
      <version>7.0</version>
      <type>war</type>
    </dependency>

    <!-- celements dependencies -->
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-commons</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-xwiki-core</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-xwiki-velocity</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-xwiki-rendering-api</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-xwiki-xml</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-global-redirect</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-component</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-reference</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-observation</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-servlet</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-config-source-api</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-config-source</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-model</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-core</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-search</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-captcha</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-subsystem-migration-manager</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-spring-mvc</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-spring-security</artifactId>
      <version>7.0</version>
    </dependency>
    <dependency>
      <groupId>com.celements</groupId>
      <artifactId>celements-keycloak</artifactId>
      <version>7.0</version>
    </dependency>

    <!-- Spring -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.kafka</groupId>
      <artifactId>spring-kafka</artifactId>
      <version>${spring.kafka.version}</version>
    </dependency>
    <!-- other dependencies -->
    <dependency>
      <groupId>xalan</groupId>
      <artifactId>xalan</artifactId>
    </dependency>
    <!-- Dom4J & Css4J [CELDEV-927] -->
    <dependency>
      <groupId>org.dom4j</groupId>
      <artifactId>dom4j</artifactId>
    </dependency>
    <dependency>
      <groupId>jaxen</groupId>
      <artifactId>jaxen</artifactId>
    </dependency>
    <dependency>
      <groupId>io.sf.carte</groupId>
      <artifactId>css4j</artifactId>
    </dependency>
    <dependency>
      <groupId>io.sf.carte</groupId>
      <artifactId>css4j-dom4j</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jsoup</groupId>
      <artifactId>jsoup</artifactId>
    </dependency>
    <!-- JAX-RS implementation -->
    <dependency>
      <groupId>org.glassfish.jersey.core</groupId>
      <artifactId>jersey-common</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.ws.rs</groupId>
      <artifactId>javax.ws.rs-api</artifactId>
    </dependency>
    <dependency>
      <groupId>jakarta.ws.rs</groupId>
      <artifactId>jakarta.ws.rs-api</artifactId>
    </dependency>
    <!-- hibernate annotations needed for org.hibernate.type.EnumType -->
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>org.reflections</groupId>
      <artifactId>reflections</artifactId>
      <version>0.9.12</version>
      <exclusions>
        <!-- [CELDEV-808] exclude xml-apis compile dependency -->
        <exclusion>
          <groupId>xml-apis</groupId>
          <artifactId>xml-apis</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- JDBC connector -->
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
    </dependency>

  </dependencies>
  <dependencyManagement>
    <dependencies>
      <!-- Align ALL Spring 5.3.x artifacts -->
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-framework-bom</artifactId>
        <version>${spring.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <!-- Align ALL Jackson 2.x artifacts (core, databind, annotations, dataformats, datatype-*) -->
      <dependency>
        <groupId>com.fasterxml.jackson</groupId>
        <artifactId>jackson-bom</artifactId>
        <version>${jackson.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <!-- Force the newer JTA for old Hibernate transitive -->
      <dependency>
        <groupId>javax.transaction</groupId>
        <artifactId>jta</artifactId>
        <version>1.1</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <finalName>celements-web</finalName>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>properties-maven-plugin</artifactId>
        <version>1.2.1</version>
        <executions>
          <execution>
            <phase>initialize</phase>
            <goals>
              <goal>read-project-properties</goal>
            </goals>
            <configuration>
              <files>
                <file>.env</file>
              </files>
              <keyPrefix>dotenv.</keyPrefix>
              <quiet>true</quiet>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <overlays>
            <overlay>
              <groupId>com.celements</groupId>
              <artifactId>tinymce-langs</artifactId>
              <excludes>
                <exclude>resources/celRTE/plugins/advimage</exclude>
              </excludes>
            </overlay>
            <overlay>
              <groupId>com.celements</groupId>
              <artifactId>image-web</artifactId>
              <excludes>
                <exclude>WEB-INF/lib/xml-apis-*.jar</exclude>
              </excludes>
            </overlay>
          </overlays>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.github.eirslett</groupId>
        <artifactId>frontend-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>com.jarslab.maven</groupId>
        <artifactId>babel-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.6.2</version>
        <executions>
          <execution>
            <id>enforce-dependency-convergence</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <DependencyConvergence />
              </rules>
              <fail>true</fail>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <version>2.44.3</version>
        <configuration>
          <formats>
            <format>
              <includes>
                <include>**/*.xml</include>
                <include>**/*.xsd</include>
                <include>**/*.xsl</include>
                <include>**/*.xslt</include>
              </includes>
              <excludes>
                <exclude>src/main/webapp/docs/**/*.xml</exclude>
                <exclude>**/target/**</exclude>
                <exclude>**/node_modules/**</exclude>
              </excludes>

              <toggleOffOn />
              <eclipseWtp>
                <type>XML</type>
                <files>
                  <file>${project.basedir}/xml.prefs</file>
                </files>
              </eclipseWtp>
            </format>
          </formats>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
