blob: 5d2f997eab4ff0f67fa8afad2ec93e6e4bc7a075 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<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">
<parent>
<artifactId>iotdb-parent</artifactId>
<groupId>org.apache.iotdb</groupId>
<version>1.3.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>iotdb-website</artifactId>
<properties>
<frontend-maven-plugin.version>1.9.1</frontend-maven-plugin.version>
<scm-branch>asf-site</scm-branch>
</properties>
<distributionManagement>
<site>
<id>apache.website</id>
<url>scm:git:https://gitbox.apache.org/repos/asf/iotdb-website.git</url>
</site>
</distributionManagement>
<profiles>
<!--
Process:
1. download existing static website from github
2. copy and unpack it to a tmp folder
3. if site-compile-0.x is enabled, download files of 0.x from github,
(except the master branch). copy it to the source tmp folder
4. compiling...
5. if site-compile-0.x is disabled, copy existing static files from the tmp folder to the
target folder.
6. upload to github website
-->
<profile>
<id>download-site</id>
<build>
<plugins>
<!-- download existing website from iotdb repo -->
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.6.7</version>
<executions>
<execution>
<id>get-existing-site</id>
<phase>generate-sources</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://github.com/apache/iotdb-website/archive/asf-site.zip</url>
<outputDirectory>${project.build.directory}/download</outputDirectory>
<outputFileName>website.zip</outputFileName>
</configuration>
</execution>
</executions>
</plugin>
<!-- unpack existing website from the zip files-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>truezip-maven-plugin</artifactId>
<version>1.2</version>
<inherited>false</inherited>
<executions>
<execution>
<id>unpack-existing-docs</id>
<goals>
<goal>copy</goal>
</goals>
<phase>compile</phase>
<configuration>
<fileset>
<directory>${project.build.directory}/download/website.zip/iotdb-website-asf-site/UserGuide</directory>
<outputDirectory>${project.build.directory}/existing/UserGuide</outputDirectory>
</fileset>
</configuration>
</execution>
<execution>
<id>unpack-existing-zh-docs</id>
<goals>
<goal>copy</goal>
</goals>
<phase>compile</phase>
<configuration>
<fileset>
<directory>${project.build.directory}/download/website.zip/iotdb-website-asf-site/zh/UserGuide</directory>
<outputDirectory>${project.build.directory}/existing/zh/UserGuide</outputDirectory>
</fileset>
</configuration>
</execution>
</executions>
</plugin>
<!-- Copy existing documents-->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<!-- copy source codes into vue required folders-->
<execution>
<id>copy-existing-docs-to-dist</id>
<!-- here the phase you need -->
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/vue-source/src/.vuepress/dist/UserGuide</outputDirectory>
<!-- output directory -->
<resources>
<resource>
<directory>${project.build.directory}/existing/UserGuide/</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-existing-zh-docs-to-dist</id>
<!-- here the phase you need -->
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/vue-source/src/.vuepress/dist/zh/UserGuide</outputDirectory>
<!-- output directory -->
<resources>
<resource>
<directory>${project.build.directory}/existing/zh/UserGuide/</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- by default, only the master branch is compiled and uploaded.
Use -Dsite.download.existing.htmls=true to contain all other htmls (v0.8,v0.9 etc..)
-->
<id>compile-site</id>
<build>
<plugins>
<!-- Copy master documents-->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<!-- copy source codes into vue required folders-->
<execution>
<id>copy-source-code-to-vue-source-folder</id>
<!-- here the phase you need -->
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/vue-source/src</outputDirectory>
<!-- output directory -->
<resources>
<resource>
<directory>${basedir}/src/main/</directory>
<filtering>true</filtering>
<excludes>
<exclude>.eslintignore</exclude>
<exclude>.eslintrc.cjs</exclude>
<exclude>.gitignore</exclude>
<exclude>package-lock.json</exclude>
<exclude>package.json</exclude>
<exclude>tsconfig.base.json</exclude>
<exclude>tsconfig.json</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-master-docs-to-vue-source-folder</id>
<!-- here the phase you need -->
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/vue-source/src</outputDirectory>
<!-- output directory -->
<resources>
<resource>
<directory>${basedir}/../docs</directory>
<excludes>
<exclude>UserGuide/**/*</exclude>
<exclude>zh/UserGuide/**/*</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-master-userguide-docs-to-vue-source-folder</id>
<!-- here the phase you need -->
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/vue-source/src/UserGuide/Master</outputDirectory>
<!-- output directory -->
<resources>
<resource>
<directory>${basedir}/../docs/UserGuide</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-master-zh-userguide-docs-to-vue-source-folder</id>
<!-- here the phase you need -->
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/vue-source/src/zh/UserGuide/Master</outputDirectory>
<!-- output directory -->
<resources>
<resource>
<directory>${basedir}/../docs/zh/UserGuide</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-other-md-files-to-development</id>
<!-- here the phase you need -->
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/vue-source/src/Development</outputDirectory>
<!-- output directory -->
<resources>
<resource>
<directory>${basedir}/../tsfile</directory>
<includes>
<include>format-changelist.md</include>
</includes>
</resource>
<resource>
<directory>${basedir}/../thrift</directory>
<includes>
<include>rpc-changelist.md</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-other-md-files-to-zh-development</id>
<!-- here the phase you need -->
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/vue-source/src/zh/Development</outputDirectory>
<!-- output directory -->
<resources>
<resource>
<directory>${basedir}/../tsfile</directory>
<includes>
<include>format-changelist.md</include>
</includes>
</resource>
<resource>
<directory>${basedir}/../thrift</directory>
<includes>
<include>rpc-changelist.md</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>replace-picture-urls</id>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<exec executable="/bin/bash">
<arg line="-c ./replace-picture-urls.sh"/>
</exec>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<!--install node and npm, then run `npm install` and `npm run build`-->
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.9.1</version>
<configuration>
<installDirectory>${project.build.directory}/tools</installDirectory>
<workingDirectory>${project.build.directory}/vue-source</workingDirectory>
</configuration>
<executions>
<execution>
<id>install-node-and-npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<phase>compile</phase>
<configuration>
<nodeVersion>v18.14.2</nodeVersion>
<npmVersion>9.5.1</npmVersion>
</configuration>
</execution>
<!-- Install all project dependencies -->
<!-- Install pnpm -->
<execution>
<id>npm install pnpm</id>
<goals>
<goal>npm</goal>
</goals>
<phase>compile</phase>
<!-- Optional configuration which provides for running any npm command -->
<configuration>
<arguments>install -g pnpm</arguments>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<phase>compile</phase>
<!-- Optional configuration which provides for running any npm command -->
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<!-- Build and minify static files -->
<execution>
<id>npm run build</id>
<phase>compile</phase>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
</executions>
</plugin>
<!-- copy single files, and move UserGuide of master into tmp folder -->
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>copy-package-json</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<fileSets>
<fileSet>
<sourceFile>${basedir}/src/main/package.json</sourceFile>
<destinationFile>${project.build.directory}/vue-source/package.json</destinationFile>
</fileSet>
<fileSet>
<sourceFile>${basedir}/src/main/.eslintrc.cjs</sourceFile>
<destinationFile>${project.build.directory}/vue-source/.eslintrc.cjs</destinationFile>
</fileSet>
<fileSet>
<sourceFile>${basedir}/src/main/.eslintignore</sourceFile>
<destinationFile>${project.build.directory}/vue-source/.eslintignore</destinationFile>
</fileSet>
<fileSet>
<sourceFile>${basedir}/src/main/tsconfig.base.json</sourceFile>
<destinationFile>${project.build.directory}/vue-source/tsconfig.base.json</destinationFile>
</fileSet>
<fileSet>
<sourceFile>${basedir}/src/main/tsconfig.json</sourceFile>
<destinationFile>${project.build.directory}/vue-source/tsconfig.json</destinationFile>
</fileSet>
<fileSet>
<sourceFile>${basedir}/src/main/deploy.js</sourceFile>
<destinationFile>${project.build.directory}/vue-source/deploy.js</destinationFile>
</fileSet>
<fileSet>
<sourceFile>${basedir}/src/main/.asf.yaml</sourceFile>
<destinationFile>${project.build.directory}/vue-source/src/.vuepress/dist/.asf.yaml</destinationFile>
</fileSet>
</fileSets>
</configuration>
</execution>
<!-- remove files if `existing` folder exist-->
<!--<execution>
<id>clean-stale-master-doc</id>
<phase>compile</phase>
<goals>
<goal>rename</goal>
</goals>
<configuration>
<sourceFile>${project.build.directory}/existing/UserGuide/Master</sourceFile>
<destinationFile>${project.build.directory}/existing/Master</destinationFile>
</configuration>
</execution>
<execution>
<id>clean-stale-master-zh-doc</id>
<phase>compile</phase>
<goals>
<goal>rename</goal>
</goals>
<configuration>
<sourceFile>${project.build.directory}/existing/zh/UserGuide/Master</sourceFile>
<destinationFile>${project.build.directory}/existing/zh/Master</destinationFile>
</configuration>
</execution>-->
<execution>
<id>copy-asf-yaml</id>
<phase>compile</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<fileSets>
<fileSet>
<sourceFile>${basedir}/src/main/.asf.yaml</sourceFile>
<destinationFile>${project.build.directory}/vue-source/src/.vuepress/dist/.asf.yaml</destinationFile>
</fileSet>
</fileSets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-publish-plugin</artifactId>
<configuration>
<!-- mono-module doesn't require site:stage -->
<content>${project.build.directory}/vue-source/src/.vuepress/dist</content>
<!-- branch where to deploy -->
<scmBranch>${scm-branch}</scmBranch>
</configuration>
</plugin>
<!--<plugin>
<groupId>org.simplify4u.plugins</groupId>
<artifactId>sitemapxml-maven-plugin</artifactId>
<version>2.0.0</version>
<configuration>
<siteOutputDirectory>${project.build.directory}/vue-source/src/.vuepress/dist</siteOutputDirectory>
<maxDepth>5</maxDepth>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>gen</goal>
</goals>
</execution>
</executions>
</plugin>-->
</plugins>
</build>
</profile>
<profile>
<id>compile-site-1.2</id>
<build>
<plugins>
<!-- download 1.1 docs from iotdb repo -->
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.6.7</version>
<executions>
<execution>
<id>get-1.2-docs</id>
<phase>generate-sources</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://github.com/apache/iotdb/archive/rel/1.2.zip</url>
<skipCache>true</skipCache>
<overwrite>true</overwrite>
<outputDirectory>${project.build.directory}/download</outputDirectory>
<outputFileName>1.2.x.zip</outputFileName>
</configuration>
</execution>
</executions>
</plugin>
<!-- unpack 1.2 docs from the zip files-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>truezip-maven-plugin</artifactId>
<version>1.2</version>
<inherited>false</inherited>
<executions>
<execution>
<id>copy-1.2-documentation</id>
<goals>
<goal>copy</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<fileset>
<directory>${project.build.directory}/download/1.2.x.zip/iotdb-rel-1.2/docs/UserGuide</directory>
<outputDirectory>${project.build.directory}/vue-source/src/UserGuide/V1.2.x</outputDirectory>
</fileset>
</configuration>
</execution>
<execution>
<id>copy-1.2-zh-documentation</id>
<goals>
<goal>copy</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<fileset>
<directory>${project.build.directory}/download/1.2.x.zip/iotdb-rel-1.2/docs/zh/UserGuide</directory>
<outputDirectory>${project.build.directory}/vue-source/src/zh/UserGuide/V1.2.x</outputDirectory>
</fileset>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>compile-site-1.1</id>
<build>
<plugins>
<!-- download 1.1 docs from iotdb repo -->
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.6.7</version>
<executions>
<execution>
<id>get-1.1-docs</id>
<phase>generate-sources</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://github.com/apache/iotdb/archive/rel/1.1.zip</url>
<skipCache>true</skipCache>
<overwrite>true</overwrite>
<outputDirectory>${project.build.directory}/download</outputDirectory>
<outputFileName>1.1.x.zip</outputFileName>
</configuration>
</execution>
</executions>
</plugin>
<!-- unpack 1.1 docs from the zip files-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>truezip-maven-plugin</artifactId>
<version>1.2</version>
<inherited>false</inherited>
<executions>
<execution>
<id>copy-1.1-documentation</id>
<goals>
<goal>copy</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<fileset>
<directory>${project.build.directory}/download/1.1.x.zip/iotdb-rel-1.1/docs/UserGuide</directory>
<outputDirectory>${project.build.directory}/vue-source/src/UserGuide/V1.1.x</outputDirectory>
</fileset>
</configuration>
</execution>
<execution>
<id>copy-1.1-zh-documentation</id>
<goals>
<goal>copy</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<fileset>
<directory>${project.build.directory}/download/1.1.x.zip/iotdb-rel-1.1/docs/zh/UserGuide</directory>
<outputDirectory>${project.build.directory}/vue-source/src/zh/UserGuide/V1.1.x</outputDirectory>
</fileset>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>compile-site-1.0</id>
<build>
<plugins>
<!-- download 1.0 docs from iotdb repo -->
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.6.7</version>
<executions>
<execution>
<id>get-1.0-docs</id>
<phase>generate-sources</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://github.com/apache/iotdb/archive/rel/1.0.zip</url>
<skipCache>true</skipCache>
<overwrite>true</overwrite>
<outputDirectory>${project.build.directory}/download</outputDirectory>
<outputFileName>1.0.x.zip</outputFileName>
</configuration>
</execution>
</executions>
</plugin>
<!-- unpack 1.0 docs from the zip files-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>truezip-maven-plugin</artifactId>
<version>1.2</version>
<inherited>false</inherited>
<executions>
<execution>
<id>copy-1.0-documentation</id>
<goals>
<goal>copy</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<fileset>
<directory>${project.build.directory}/download/1.0.x.zip/iotdb-rel-1.0/docs/UserGuide</directory>
<outputDirectory>${project.build.directory}/vue-source/src/UserGuide/V1.0.x</outputDirectory>
</fileset>
</configuration>
</execution>
<execution>
<id>copy-1.0-zh-documentation</id>
<goals>
<goal>copy</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<fileset>
<directory>${project.build.directory}/download/1.0.x.zip/iotdb-rel-1.0/docs/zh/UserGuide</directory>
<outputDirectory>${project.build.directory}/vue-source/src/zh/UserGuide/V1.0.x</outputDirectory>
</fileset>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>compile-site-0.13</id>
<build>
<plugins>
<!-- download 0.13 docs from iotdb repo -->
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.6.7</version>
<executions>
<execution>
<id>get-0.13-docs</id>
<phase>generate-sources</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>https://github.com/apache/iotdb/archive/rel/0.13.zip</url>
<skipCache>true</skipCache>
<overwrite>true</overwrite>
<outputDirectory>${project.build.directory}/download</outputDirectory>
<outputFileName>0.13.x.zip</outputFileName>
</configuration>
</execution>
</executions>
</plugin>
<!-- unpack 0.13 docs from the zip files-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>truezip-maven-plugin</artifactId>
<version>1.2</version>
<inherited>false</inherited>
<executions>
<execution>
<id>copy-0.13-documentation</id>
<goals>
<goal>copy</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<fileset>
<directory>${project.build.directory}/download/0.13.x.zip/iotdb-rel-0.13/docs/UserGuide</directory>
<outputDirectory>${project.build.directory}/vue-source/src/UserGuide/V0.13.x</outputDirectory>
</fileset>
</configuration>
</execution>
<execution>
<id>copy-0.13-zh-documentation</id>
<goals>
<goal>copy</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<fileset>
<directory>${project.build.directory}/download/0.13.x.zip/iotdb-rel-0.13/docs/zh/UserGuide</directory>
<outputDirectory>${project.build.directory}/vue-source/src/zh/UserGuide/V0.13.x</outputDirectory>
</fileset>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>