Skip to content
Snippets Groups Projects
pom.xml 12.3 KiB
Newer Older
<?xml version="1.0" encoding="UTF-8"?>

<!--
 * 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.
-->

<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.xwiki.contrib</groupId>
    <artifactId>parent-platform</artifactId>
    <version>13.10</version>
  </parent>
  <artifactId>application-ckeditor-pom</artifactId>
  <packaging>pom</packaging>
  <name>CKEditor Integration Parent POM</name>
  <version>1.64.10-SNAPSHOT</version>
  <description>Adds support for editing wiki pages using CKEditor.</description>
  <developers>
    <developer>
      <id>mflorea</id>
      <name>Marius Dumitru Florea</name>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git://github.com/xwiki-contrib/application-ckeditor.git</connection>
    <developerConnection>scm:git:git@github.com:xwiki-contrib/application-ckeditor.git</developerConnection>
    <url>https://github.com/xwiki-contrib/application-ckeditor/tree/master</url>
    <minimum.commons.version>8.4</minimum.commons.version>
    <minimum.rendering.version>${minimum.commons.version}</minimum.rendering.version>
    <minimum.platform.version>${minimum.commons.version}</minimum.platform.version>
    <ckeditor.version>4.20.1</ckeditor.version>
    <!-- The path to the folder where we clone the CKEditor sources. -->
    <ckeditor.path>${project.build.directory}/ckeditor4-${ckeditor.version}</ckeditor.path>
    <ckeditor.builder.path>${ckeditor.path}/dev/builder</ckeditor.builder.path>
    <ckeditor.plugins.path>${ckeditor.path}/plugins</ckeditor.plugins.path>

    <!-- Disabled the enforcer because it complain about a lot of dependencies which are supposed
         to be avoided in more recent versions of XWiki -->
    <xwiki.enforcer.skip>true</xwiki.enforcer.skip>
    <xwiki.enforcer.enforce-plugins.skip>false</xwiki.enforcer.enforce-plugins.skip>

    <xwiki.issueManagement.jira.id>CKEDITOR</xwiki.issueManagement.jira.id>
    <!-- Release automatically on JIRA when performing the Maven release. -->
    <xwiki.release.jira.skip>false</xwiki.release.jira.skip>
          <groupId>com.googlecode.maven-download-plugin</groupId>
          <artifactId>download-maven-plugin</artifactId>
            <!-- Download the CKEditor sources for the version (tag) we want to use. -->
              <!-- Make sure this execution is not used by default (you need to call it explicitly in your pom). -->
              <phase>none</phase>
                <url>https://github.com/ckeditor/ckeditor4/archive/${ckeditor.version}.zip</url>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <executions>
            <!-- Copy the WebJar resources to the right path before packing the jar. -->
            <execution>
              <id>copy-webjar-resources</id>
              <!-- Make sure this execution is not used by default (you need to call it explicitly in your pom). -->
              <phase>none</phase>
              <goals>
                <goal>resources</goal>
              </goals>
              <configuration>
                <outputDirectory>${webjar.outputDirectory}</outputDirectory>
              </configuration>
            </execution>
            <!-- Copy the build configuration to the CKEditor sources. -->
            <execution>
              <id>copy-ckeditor-build-config</id>
              <!-- Make sure this execution is not used by default (you need to call it explicitly in your pom). -->
              <phase>none</phase>
              <goals>
                <goal>copy-resources</goal>
              </goals>
              <configuration>
                <outputDirectory>${ckeditor.builder.path}</outputDirectory>
                <resources>
                  <resource>
                    <directory>src/main/config</directory>
                  </resource>
                </resources>
              </configuration>
            </execution>
            <!-- Copy the output of the CKEditor builder to the expected WebJar location. -->
              <!-- Make sure this execution is not used by default (you need to call it explicitly in your pom). -->
              <phase>none</phase>
                <outputDirectory>${webjar.outputDirectory}</outputDirectory>
                <resources>
                  <resource>
                    <directory>${ckeditor.builder.path}/release/ckeditor</directory>
                  </resource>
                </resources>
              </configuration>
            </execution>
          </executions>
          <configuration>
            <overwrite>true</overwrite>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <executions>
            <!-- Remove the Byte Order Mark from the start of build.sh -->
            <execution>
              <id>remove-bom</id>
              <!-- Use a phase after compile because the Clirr Maven Plugin executes all the phases up to compile
                   twice. -->
              <phase>process-classes</phase>
              <goals>
                <goal>exec</goal>
              </goals>
              <configuration>
                <executable>sed</executable>
              </configuration>
            </execution>
            <!-- Build the CKEditor. -->
            <execution>
              <id>build-ckeditor</id>
              <!-- Use a phase after compile because the Clirr Maven Plugin executes all the phases up to compile
                   twice. -->
              <phase>process-classes</phase>
              <goals>
                <goal>exec</goal>
              </goals>
              <configuration>
                <executable>${ckeditor.builder.path}/build.sh</executable>
                <arguments>
                  <!-- Exclude from release all plugins/skins that are not specified in build-config. -->
                  <argument>--skip-omitted-in-build-config</argument>
                </arguments>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <!-- We want to build the tests module but we don't want to run actual test during releases -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <configuration>
            <arguments>-Pintegration-tests -DskipTests=true</arguments>
          </configuration>
        </plugin>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <!-- Verify that all org.xwiki.commons dependencies have a version specified either as:
               - ${commons.version}
               - ${minimum.commons.version}
               Also verifies that all org.xwiki.rendering dependencies have a version specified either as:
               - ${rendering.version}
               - ${minimum.rendering.version}
               Also verifies that all org.xwiki.platform dependencies have a version specified either as:
               - ${platform.version}
               - ${minimum.rendering.version}
          -->
          <execution>
            <id>check-dependency-version</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <validateDependencyVersion implementation="org.xwiki.tool.enforcer.ValidateDependencyVersion">
                  <versionCheck>
                    <groupIdPrefix>org.xwiki.commons</groupIdPrefix>
                    <allowedVersionRegex>\$\{commons.version\}|\$\{minimum.commons.version\}</allowedVersionRegex>
                  </versionCheck>
                  <versionCheck>
                    <groupIdPrefix>org.xwiki.rendering</groupIdPrefix>
                    <allowedVersionRegex>\$\{rendering.version\}|\$\{minimum.rendering.version\}</allowedVersionRegex>
                  </versionCheck>
                  <versionCheck>
                    <groupIdPrefix>org.xwiki.platform</groupIdPrefix>
                    <allowedVersionRegex>\$\{platform.version\}|\$\{minimum.platform.version\}</allowedVersionRegex>
                  </versionCheck>
                </validateDependencyVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <module>application-ckeditor-runtime</module>
    <module>application-ckeditor-base</module>
    <module>application-ckeditor-plugins</module>
    <module>application-ckeditor-ui</module>
    <module>application-ckeditor-webjar</module>
  <profiles>
    <profile>
      <id>unix</id>
      <activation>
        <os>
          <family>unix</family>
        </os>
      </activation>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>exec-maven-plugin</artifactId>
              <executions>
                <execution>
                  <id>remove-bom</id>
                  <configuration>
                    <arguments>
                      <argument>-i</argument>
                      <argument>1s/^\xEF\xBB\xBF//</argument>
                      <argument>${ckeditor.builder.path}/build.sh</argument>
                    </arguments>
                  </configuration>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
    <profile>
      <id>mac</id>
      <activation>
        <os>
          <family>mac</family>
        </os>
      </activation>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>exec-maven-plugin</artifactId>
              <executions>
                <execution>
                  <id>remove-bom</id>
                  <configuration>
                    <arguments>
                      <argument>-i</argument>
                      <argument>''</argument>
                      <argument>-e</argument>
                      <argument>1s/^\xEF\xBB\xBF//</argument>
                      <argument>${ckeditor.builder.path}/build.sh</argument>
                    </arguments>
                  </configuration>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
    <profile>
      <id>integration-tests</id>
      <modules>
        <module>application-ckeditor-test</module>

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.