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>
</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>
<tag>HEAD</tag>
</scm>
<properties>
<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>

Marius Dumitru Florea
committed
<!-- The path to the folder where we clone the CKEditor sources. -->
<ckeditor.path>${project.build.directory}/ckeditor4-${ckeditor.version}</ckeditor.path>

Marius Dumitru Florea
committed
<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>
</properties>

Marius Dumitru Florea
committed
<build>
<pluginManagement>
<plugins>
<plugin>

Marius Dumitru Florea
committed
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>

Marius Dumitru Florea
committed
<version>1.4.1</version>

Marius Dumitru Florea
committed
<executions>

Marius Dumitru Florea
committed
<!-- Download the CKEditor sources for the version (tag) we want to use. -->

Marius Dumitru Florea
committed
<execution>

Marius Dumitru Florea
committed
<id>download-ckeditor-sources</id>
<!-- Make sure this execution is not used by default (you need to call it explicitly in your pom). -->
<phase>none</phase>

Marius Dumitru Florea
committed
<goals>

Marius Dumitru Florea
committed
<goal>wget</goal>

Marius Dumitru Florea
committed
</goals>
<configuration>
<url>https://github.com/ckeditor/ckeditor4/archive/${ckeditor.version}.zip</url>

Marius Dumitru Florea
committed
<unpack>true</unpack>

Marius Dumitru Florea
committed
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>

Marius Dumitru Florea
committed
<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>

Marius Dumitru Florea
committed
<!-- Copy the build configuration to the CKEditor sources. -->
<execution>
<id>copy-ckeditor-build-config</id>

Marius Dumitru Florea
committed
<!-- Make sure this execution is not used by default (you need to call it explicitly in your pom). -->
<phase>none</phase>

Marius Dumitru Florea
committed
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${ckeditor.builder.path}</outputDirectory>
<resources>
<resource>
<directory>src/main/config</directory>
</resource>
</resources>
</configuration>
</execution>

Marius Dumitru Florea
committed
<!-- Copy the output of the CKEditor builder to the expected WebJar location. -->

Marius Dumitru Florea
committed
<execution>
<id>copy-ckeditor-resources</id>

Marius Dumitru Florea
committed
<!-- Make sure this execution is not used by default (you need to call it explicitly in your pom). -->
<phase>none</phase>

Marius Dumitru Florea
committed
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${webjar.outputDirectory}</outputDirectory>

Marius Dumitru Florea
committed
<resources>
<resource>
<directory>${ckeditor.builder.path}/release/ckeditor</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
<configuration>
<overwrite>true</overwrite>
</configuration>
</plugin>
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<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>

Marius Dumitru Florea
committed
</plugins>
</pluginManagement>
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<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>

Marius Dumitru Florea
committed
</build>
<modules>
<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>
</modules>
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
<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>
</modules>
</profile>