<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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>org.fujion.webjars</groupId>
		<artifactId>fujion-webjars</artifactId>
		<version>3.0.0</version>
	</parent>

	<name>CKEditor Web Jars</name>
	<artifactId>webjar-ckeditor</artifactId>
	<version>4.17.2</version>
	<description>Web jar packaging of CKEditor packages.</description>

	<properties>
		<src.url>https://download.cksource.com/CKEditor/CKEditor/CKEditor%20${src.version}/ckeditor_${src.version}_</src.url>
	</properties>
	
	<build>
		<plugins>
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<id>precompile</id>
						<configuration>
							<target>
								<get src="${src.url}full.zip" dest="${src.zipdir}/full.zip" />
								<unzip src="${src.zipdir}/full.zip" dest="${src.tmpdir}/full" />
								<get src="${src.url}basic.zip" dest="${src.zipdir}/basic.zip" />
								<unzip src="${src.zipdir}/basic.zip" dest="${src.tmpdir}/basic" />
								<get src="${src.url}standard.zip" dest="${src.zipdir}/standard.zip" />
								<unzip src="${src.zipdir}/standard.zip" dest="${src.tmpdir}/standard" />
								<copy todir="${webjar.target}">
									<fileset dir="${src.tmpdir}/full/ckeditor" includes="*.md" />
								</copy>
								<copy todir="${webjar.target}/dist/full">
									<fileset dir="${src.tmpdir}/full/ckeditor" includes="**/*.*" excludes="samples/**,*.md" />
								</copy>
								<copy todir="${webjar.target}/dist/basic">
									<fileset dir="${src.tmpdir}/basic/ckeditor" includes="**/*.*" excludes="samples/**,*.md" />
								</copy>
								<copy todir="${webjar.target}/dist/standard">
									<fileset dir="${src.tmpdir}/standard/ckeditor" includes="**/*.*" excludes="samples/**,*.md" />
								</copy>
							</target>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
