Dev wenjun cp spoless (#122)
* [Feature][style] Add spotless maven plugin for automatic style fix. (#11272)
* [Feature][style] Add spotless maven plugin for automatic style fix (#10963)
* Fix spotless ratchet configuration
* Remove license-check and decrease line length threshold value
* Update related docs
* Remove checkstyle and add pre-commit hook
* Test updated pre-commit hook
* Replace checkstyle with spotless in CI
* Remove reviewdog
(cherry picked from commit 6a02870926)
* Cp spotless
Co-authored-by: Eric Gao <ericgao.apache@gmail.com>
This commit is contained in:
parent
1f958bb633
commit
d7ba974ac5
|
|
@ -1 +0,0 @@
|
|||
Subproject commit c2fa3e5a37b75a5819e2c8127caec1c2a0d088e8
|
||||
|
|
@ -34,20 +34,5 @@ runs:
|
|||
- name: Check License Header
|
||||
uses: apache/skywalking-eyes@30367d8286e324d5efc58de4c70c37ea3648306d
|
||||
|
||||
- uses: ./.github/actions/reviewdog-setup
|
||||
with:
|
||||
reviewdog_version: v0.10.2
|
||||
|
||||
- shell: bash
|
||||
run: ./mvnw -B -q checkstyle:checkstyle-aggregate
|
||||
|
||||
- shell: bash
|
||||
env:
|
||||
REVIEWDOG_GITHUB_API_TOKEN: ${{ inputs.token }}
|
||||
run: |
|
||||
if [[ -n "${{ inputs.token }}" ]]; then
|
||||
reviewdog -f=checkstyle \
|
||||
-reporter="github-pr-check" \
|
||||
-filter-mode="added" \
|
||||
-fail-on-error="true" < target/checkstyle-result.xml
|
||||
fi
|
||||
run: ./mvnw spotless:check
|
||||
|
|
|
|||
|
|
@ -21,6 +21,3 @@
|
|||
[submodule ".github/actions/translate-on-issue"]
|
||||
path = .github/actions/translate-on-issue
|
||||
url = https://github.com/xingchun-chen/translation-helper
|
||||
[submodule ".github/actions/reviewdog-setup"]
|
||||
path = .github/actions/reviewdog-setup
|
||||
url = https://github.com/reviewdog/action-setup
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ header:
|
|||
- '**/NOTICE'
|
||||
- '**/node_modules/**'
|
||||
- '.github/actions/comment-on-issue/**'
|
||||
- '.github/actions/reviewdog-setup/**'
|
||||
- '.github/actions/translate-on-issue/**'
|
||||
- '**/.gitkeep'
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,223 @@
|
|||
# DolphinScheduler development
|
||||
|
||||
## Software Requirements
|
||||
Before setting up the DolphinScheduler development environment, please make sure you have installed the software as below:
|
||||
|
||||
* [Git](https://git-scm.com/downloads)
|
||||
* [JDK](https://www.oracle.com/technetwork/java/javase/downloads/index.html): v1.8.x (Currently does not support jdk 11)
|
||||
* [Maven](http://maven.apache.org/download.cgi): v3.5+
|
||||
* [Node](https://nodejs.org/en/download): v16.13+ (dolphinScheduler version is lower than 3.0, please install node v12.20+)
|
||||
* [Pnpm](https://pnpm.io/installation): v6.x
|
||||
|
||||
### Clone Git Repository
|
||||
|
||||
Download the git repository through your git management tool, here we use git-core as an example
|
||||
|
||||
```shell
|
||||
mkdir dolphinscheduler
|
||||
cd dolphinscheduler
|
||||
git clone git@github.com:apache/dolphinscheduler.git
|
||||
```
|
||||
|
||||
### Compile Source Code
|
||||
|
||||
Supporting system:
|
||||
* MacOS
|
||||
* Liunx
|
||||
|
||||
Run `mvn clean install -Prelease -Dmaven.test.skip=true`
|
||||
|
||||
### Code Style
|
||||
|
||||
DolphinScheduler uses `Spotless` for code style and formatting checks.
|
||||
You could run the following command and `Spotless` will automatically fix
|
||||
the code style and formatting errors for you:
|
||||
|
||||
```shell
|
||||
./mvnw spotless:apply
|
||||
```
|
||||
|
||||
You could copy the `pre-commit hook` file `/style/pre-commit` to your `.git/hooks/`
|
||||
directory so that every time you commit your code with `git commit`, `Spotless` will automatically
|
||||
fix things for you.
|
||||
|
||||
## Docker image build
|
||||
|
||||
DolphinScheduler will release new Docker images after it released, you could find them in [Docker Hub](https://hub.docker.com/search?q=DolphinScheduler).
|
||||
|
||||
* If you want to modify DolphinScheduler source code, and build Docker images locally, you can run when finished the modification
|
||||
```shell
|
||||
cd dolphinscheduler
|
||||
./mvnw -B clean package \
|
||||
-Dmaven.test.skip \
|
||||
-Dmaven.javadoc.skip \
|
||||
-Dmaven.checkstyle.skip \
|
||||
-Ddocker.tag=<TAG> \
|
||||
-Pdocker,release
|
||||
```
|
||||
|
||||
When the command is finished you could find them by command `docker imaegs`.
|
||||
|
||||
* If you want to modify DolphinScheduler source code, build and push Docker images to your registry <HUB_URL>,you can run when finished the modification
|
||||
```shell
|
||||
cd dolphinscheduler
|
||||
./mvnw -B clean deploy \
|
||||
-Dmaven.test.skip \
|
||||
-Dmaven.javadoc.skip \
|
||||
-Dmaven.checkstyle.skip \
|
||||
-Dmaven.deploy.skip \
|
||||
-Ddocker.tag=<TAG> \
|
||||
-Ddocker.hub=<HUB_URL> \
|
||||
-Pdocker,release
|
||||
```
|
||||
|
||||
* If you want to modify DolphinScheduler source code, and also want to add customize dependencies of Docker image, you can modify the definition of Dockerfile after modifying the source code. You can run the following command to find all Dockerfile files.
|
||||
|
||||
```shell
|
||||
cd dolphinscheduler
|
||||
find . -iname 'Dockerfile'
|
||||
```
|
||||
|
||||
Then run the Docker build command above
|
||||
|
||||
* You could create custom Docker images base on those images if you want to change image like add some dependencies or upgrade package.
|
||||
|
||||
```Dockerfile
|
||||
FROM dolphinscheduler-standalone-server
|
||||
RUN apt update ; \
|
||||
apt install -y <YOUR-CUSTOM-DEPENDENCE> ; \
|
||||
```
|
||||
|
||||
> **_Note:_** Docker will build and push linux/amd64,linux/arm64 multi-architecture images by default
|
||||
>
|
||||
> Have to use version after Docker 19.03, because after 19.03 docker contains buildx
|
||||
|
||||
|
||||
## Notice
|
||||
|
||||
There are two ways to configure the DolphinScheduler development environment, standalone mode and normal mode
|
||||
|
||||
* [Standalone mode](#dolphinscheduler-standalone-quick-start): **Recommended**,more convenient to build development environment, it can cover most scenes.
|
||||
* [Normal mode](#dolphinscheduler-normal-mode): Separate server master, worker, api, which can cover more test environments than standalone, and it is more like production environment in real life.
|
||||
|
||||
## DolphinScheduler Standalone Quick Start
|
||||
|
||||
> **_Note:_** Use standalone server only for development and debugging, because it uses H2 Database as default database and Zookeeper Testing Server which may not be stable in production.
|
||||
>
|
||||
> Standalone is only supported in DolphinScheduler 1.3.9 and later versions.
|
||||
>
|
||||
> Standalone server is able to connect to external databases like mysql and postgresql, see [Standalone Deployment](https://dolphinscheduler.apache.org/en-us/docs/dev/user_doc/guide/installation/standalone.html) for instructions.
|
||||
|
||||
### Git Branch Choose
|
||||
|
||||
Use different Git branch to develop different codes
|
||||
|
||||
* If you want to develop based on a binary package, switch git branch to specific release branch, for example, if you want to develop base on 1.3.9, you should choose branch `1.3.9-release`.
|
||||
* If you want to develop the latest code, choose branch branch `dev`.
|
||||
|
||||
### Start backend server
|
||||
|
||||
Find the class `org.apache.dolphinscheduler.StandaloneServer` in Intellij IDEA and clikc run main function to startup.
|
||||
|
||||
### Start frontend server
|
||||
|
||||
Install frontend dependencies and run it.
|
||||
> Note: You can see more detail about the frontend setting in [frontend development](./frontend-development.md).
|
||||
|
||||
```shell
|
||||
cd dolphinscheduler-ui
|
||||
pnpm install
|
||||
pnpm run dev
|
||||
```
|
||||
|
||||
The browser access address [http://localhost:3000](http://localhost:3000) can login DolphinScheduler UI. The default username and password are **admin/dolphinscheduler123**
|
||||
|
||||
## DolphinScheduler Normal Mode
|
||||
|
||||
### Prepare
|
||||
|
||||
#### zookeeper
|
||||
|
||||
Download [ZooKeeper](https://www.apache.org/dyn/closer.lua/zookeeper/zookeeper-3.6.3), and extract it.
|
||||
|
||||
* Create directory `zkData` and `zkLog`
|
||||
* Go to the zookeeper installation directory, copy configure file `zoo_sample.cfg` to `conf/zoo.cfg`, and change value of dataDir in conf/zoo.cfg to dataDir=./tmp/zookeeper
|
||||
|
||||
```shell
|
||||
# We use path /data/zookeeper/data and /data/zookeeper/datalog here as example
|
||||
dataDir=/data/zookeeper/data
|
||||
dataLogDir=/data/zookeeper/datalog
|
||||
```
|
||||
|
||||
* Run `./bin/zkServer.sh` in terminal by command `./bin/zkServer.sh start`.
|
||||
|
||||
#### Database
|
||||
|
||||
The DolphinScheduler's metadata is stored in relational database. Currently supported MySQL and Postgresql. We use MySQL as an example. Start the database and create a new database named dolphinscheduler as DolphinScheduler metabase
|
||||
|
||||
After creating the new database, run the sql file under `dolphinscheduler/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql` directly in MySQL to complete the database initialization
|
||||
|
||||
#### Start Backend Server
|
||||
|
||||
Following steps will guide how to start the DolphinScheduler backend service
|
||||
|
||||
##### Backend Start Prepare
|
||||
|
||||
* Open project: Use IDE open the project, here we use Intellij IDEA as an example, after opening it will take a while for Intellij IDEA to complete the dependent download
|
||||
|
||||
* File change
|
||||
* If you use MySQL as your metadata database, you need to modify `dolphinscheduler/pom.xml` and change the `scope` of the `mysql-connector-java` dependency to `compile`. This step is not necessary to use PostgreSQL
|
||||
* Modify database configuration, modify the database configuration in the `dolphinscheduler-master/src/main/resources/application.yaml`
|
||||
* Modify database configuration, modify the database configuration in the `dolphinscheduler-worker/src/main/resources/application.yaml`
|
||||
* Modify database configuration, modify the database configuration in the `dolphinscheduler-api/src/main/resources/application.yaml`
|
||||
|
||||
|
||||
We here use MySQL with database, username, password named dolphinscheduler as an example
|
||||
```application.yaml
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8
|
||||
username: dolphinscheduler
|
||||
password: dolphinscheduler
|
||||
```
|
||||
|
||||
* Log level: add a line `<appender-ref ref="STDOUT"/>` to the following configuration to enable the log to be displayed on the command line
|
||||
|
||||
`dolphinscheduler-master/src/main/resources/logback-spring.xml`
|
||||
`dolphinscheduler-worker/src/main/resources/logback-spring.xml`
|
||||
`dolphinscheduler-api/src/main/resources/logback-spring.xml`
|
||||
|
||||
here we add the result after modify as below:
|
||||
|
||||
```diff
|
||||
<root level="INFO">
|
||||
+ <appender-ref ref="STDOUT"/>
|
||||
<appender-ref ref="APILOGFILE"/>
|
||||
<appender-ref ref="SKYWALKING-LOG"/>
|
||||
</root>
|
||||
```
|
||||
|
||||
> **_Note:_** Only DolphinScheduler 2.0 and later versions need to inatall plugin before start server. It not need before version 2.0.
|
||||
|
||||
##### Server start
|
||||
|
||||
There are three services that need to be started, including MasterServer, WorkerServer, ApiApplicationServer.
|
||||
|
||||
* MasterServer:Execute function `main` in the class `org.apache.dolphinscheduler.server.master.MasterServer` by Intellij IDEA, with the configuration *VM Options* `-Dlogging.config=classpath:logback-spring.xml -Ddruid.mysql.usePingMethod=false -Dspring.profiles.active=mysql`
|
||||
* WorkerServer:Execute function `main` in the class `org.apache.dolphinscheduler.server.worker.WorkerServer` by Intellij IDEA, with the configuration *VM Options* `-Dlogging.config=classpath:logback-spring.xml -Ddruid.mysql.usePingMethod=false -Dspring.profiles.active=mysql`
|
||||
* ApiApplicationServer:Execute function `main` in the class `org.apache.dolphinscheduler.api.ApiApplicationServer` by Intellij IDEA, with the configuration *VM Options* `-Dlogging.config=classpath:logback-spring.xml -Dspring.profiles.active=api,mysql`. After it started, you could find Open API documentation in http://localhost:12345/dolphinscheduler/doc.html
|
||||
|
||||
> The `mysql` in the VM Options `-Dspring.profiles.active=mysql` means specified configuration file
|
||||
|
||||
### Start Frontend Server
|
||||
|
||||
Install frontend dependencies and run it
|
||||
|
||||
```shell
|
||||
cd dolphinscheduler-ui
|
||||
pnpm install
|
||||
pnpm run dev
|
||||
```
|
||||
|
||||
The browser access address [http://localhost:3000](http://localhost:3000) can login DolphinScheduler UI. The default username and password are **admin/dolphinscheduler123**
|
||||
|
|
@ -0,0 +1,214 @@
|
|||
# DolphinScheduler 开发手册
|
||||
|
||||
## 软件要求
|
||||
在搭建 DolphinScheduler 开发环境之前请确保你已经安装以下软件:
|
||||
|
||||
* [Git](https://git-scm.com/downloads)
|
||||
* [JDK](https://www.oracle.com/technetwork/java/javase/downloads/index.html): v1.8.x (当前暂不支持 jdk 11)
|
||||
* [Maven](http://maven.apache.org/download.cgi): v3.5+
|
||||
* [Node](https://nodejs.org/en/download): v16.13+ (dolphinScheduler 版本低于 3.0, 请安装 node v12.20+)
|
||||
* [Pnpm](https://pnpm.io/installation): v6.x
|
||||
|
||||
### 克隆代码库
|
||||
|
||||
通过你 git 管理工具下载 git 代码,下面以 git-core 为例
|
||||
|
||||
```shell
|
||||
mkdir dolphinscheduler
|
||||
cd dolphinscheduler
|
||||
git clone git@github.com:apache/dolphinscheduler.git
|
||||
```
|
||||
|
||||
### 编译源码
|
||||
|
||||
支持的系统:
|
||||
* MacOS
|
||||
* Linux
|
||||
|
||||
运行 `mvn clean install -Prelease -Dmaven.test.skip=true`
|
||||
|
||||
|
||||
### 代码风格
|
||||
|
||||
DolphinScheduler使用`Spotless`检查并修复代码风格和格式问题。
|
||||
您可以执行如下的命令,`Spotless`将会为您自动检查并修复代码风格和格式问题。
|
||||
|
||||
```shell
|
||||
./mvnw spotless:apply
|
||||
```
|
||||
|
||||
您可将`/style/pre-commit`目录下的`pre-commit hook`文件拷贝到您的`.git/hooks/`
|
||||
目录下,这样您每次使用`git commit`命令时,`Spotless`将会自动为您修复代码风格和格式问题。
|
||||
|
||||
## Docker镜像构建
|
||||
|
||||
DolphinScheduler 每次发版都会同时发布 Docker 镜像,你可以在 [Docker Hub](https://hub.docker.com/search?q=DolphinScheduler) 中找到这些镜像
|
||||
|
||||
* 如果你想基于源码进行改造,然后在本地构建Docker镜像,可以在代码改造完成后运行
|
||||
```shell
|
||||
cd dolphinscheduler
|
||||
./mvnw -B clean package \
|
||||
-Dmaven.test.skip \
|
||||
-Dmaven.javadoc.skip \
|
||||
-Dmaven.checkstyle.skip \
|
||||
-Ddocker.tag=<TAG> \
|
||||
-Pdocker,release
|
||||
```
|
||||
当命令运行完了后你可以通过 `docker images` 命令查看刚刚创建的镜像
|
||||
|
||||
* 如果你想基于源码进行改造,然后构建Docker镜像并推送到 <HUB_URL>,可以在代码改造完成后运行
|
||||
```shell
|
||||
cd dolphinscheduler
|
||||
./mvnw -B clean deploy \
|
||||
-Dmaven.test.skip \
|
||||
-Dmaven.javadoc.skip \
|
||||
-Dmaven.checkstyle.skip \
|
||||
-Dmaven.deploy.skip \
|
||||
-Ddocker.tag=<TAG> \
|
||||
-Ddocker.hub=<HUB_URL> \
|
||||
-Pdocker,release
|
||||
```
|
||||
|
||||
* 如果你不仅需要改造源码,还想要自定义 Docker 镜像打包的依赖,可以在修改源码的同时修改 Dockerfile 的定义。你可以运行以下命令找到所有的 Dockerfile 文件
|
||||
|
||||
```shell
|
||||
cd dolphinscheduler
|
||||
find . -iname 'Dockerfile'
|
||||
```
|
||||
|
||||
之后再运行上面的构建镜像命令
|
||||
|
||||
* 如果你因为个性化需求想要自己打包 Docker 镜像,最佳实践是基于 DolphinScheduler 对应镜像编写 Dockerfile 文件
|
||||
|
||||
```Dockerfile
|
||||
FROM dolphinscheduler-standalone-server
|
||||
RUN apt update ; \
|
||||
apt install -y <YOUR-CUSTOM-DEPENDENCE> ; \
|
||||
```
|
||||
|
||||
> **_注意:_** Docker默认会构建并推送 linux/amd64,linux/arm64 多架构镜像
|
||||
>
|
||||
> 必须使用Docker 19.03及以后的版本,因为19.03及以后的版本包含 buildx
|
||||
|
||||
## 开发者须知
|
||||
|
||||
DolphinScheduler 开发环境配置有两个方式,分别是standalone模式,以及普通模式
|
||||
|
||||
* [standalone模式](#dolphinscheduler-standalone快速开发模式):**推荐使用,但仅支持 1.3.9 及以后的版本**,方便快速的开发环境搭建,能解决大部分场景的开发
|
||||
* [普通模式](#dolphinscheduler-普通开发模式):master、worker、api等单独启动,能更好的的模拟真实生产环境,可以覆盖的测试环境更多
|
||||
|
||||
## DolphinScheduler Standalone快速开发模式
|
||||
|
||||
> **_注意:_** 仅供单机开发调试使用,默认使用 H2 Database,Zookeeper Testing Server
|
||||
>
|
||||
> Standalone 仅在 DolphinScheduler 1.3.9 及以后的版本支持
|
||||
|
||||
### 分支选择
|
||||
|
||||
开发不同的代码需要基于不同的分支
|
||||
|
||||
* 如果想基于二进制包开发,切换到对应版本的代码,如 1.3.9 则是 `1.3.9-release`
|
||||
* 如果想要开发最新代码,切换到 `dev` 分支
|
||||
|
||||
### 启动后端
|
||||
|
||||
在 Intellij IDEA 找到并启动类 `org.apache.dolphinscheduler.StandaloneServer` 即可完成后端启动
|
||||
|
||||
### 启动前端
|
||||
|
||||
安装前端依赖并运行前端组件
|
||||
> 注意:你可以在[frontend development](./frontend-development.md)里查看更多前端的相关配置
|
||||
|
||||
```shell
|
||||
cd dolphinscheduler-ui
|
||||
pnpm install
|
||||
pnpm run dev
|
||||
```
|
||||
|
||||
截止目前,前后端已成功运行起来,浏览器访问[http://localhost:3000](http://localhost:3000),并使用默认账户密码 **admin/dolphinscheduler123** 即可完成登录
|
||||
|
||||
## DolphinScheduler 普通开发模式
|
||||
|
||||
### 必要软件安装
|
||||
|
||||
#### zookeeper
|
||||
|
||||
下载 [ZooKeeper](https://www.apache.org/dyn/closer.lua/zookeeper/zookeeper-3.6.3),解压
|
||||
|
||||
* 在 ZooKeeper 的目录下新建 zkData、zkLog文件夹
|
||||
* 将 conf 目录下的 `zoo_sample.cfg` 文件,复制一份,重命名为 `zoo.cfg`,修改其中数据和日志的配置,如:
|
||||
|
||||
```shell
|
||||
dataDir=/data/zookeeper/data ## 此处使用绝对路径
|
||||
dataLogDir=/data/zookeeper/datalog
|
||||
```
|
||||
|
||||
* 运行 `./bin/zkServer.sh`
|
||||
|
||||
#### 数据库
|
||||
|
||||
DolphinScheduler 的元数据存储在关系型数据库中,目前支持的关系型数据库包括 MySQL 以及 PostgreSQL。下面以MySQL为例,启动数据库并创建新 database 作为 DolphinScheduler 元数据库,这里以数据库名 dolphinscheduler 为例
|
||||
|
||||
创建完新数据库后,将 `dolphinscheduler/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql` 下的 sql 文件直接在 MySQL 中运行,完成数据库初始化
|
||||
|
||||
#### 启动后端
|
||||
|
||||
下面步骤将引导如何启动 DolphinScheduler 后端服务
|
||||
|
||||
##### 必要的准备工作
|
||||
|
||||
* 打开项目:使用开发工具打开项目,这里以 Intellij IDEA 为例,打开后需要一段时间,让 Intellij IDEA 完成以依赖的下载
|
||||
|
||||
* 必要的修改
|
||||
* 如果使用 MySQL 作为元数据库,需要先修改 `dolphinscheduler/pom.xml`,将 `mysql-connector-java` 依赖的 `scope` 改为 `compile`,使用 PostgreSQL 则不需要
|
||||
* 修改 Master 数据库配置,修改 `dolphinscheduler-master/src/main/resources/application.yaml` 文件中的数据库配置
|
||||
* 修改 Worker 数据库配置,修改 `dolphinscheduler-worker/src/main/resources/application.yaml` 文件中的数据库配置
|
||||
* 修改 Api 数据库配置,修改 `dolphinscheduler-api/src/main/resources/application.yaml` 文件中的数据库配置
|
||||
|
||||
本样例以 MySQL 为例,其中数据库名为 dolphinscheduler,账户名密码均为 dolphinscheduler
|
||||
```application.yaml
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8
|
||||
username: dolphinscheduler
|
||||
password: dolphinscheduler
|
||||
```
|
||||
|
||||
* 修改日志级别:为以下配置增加一行内容 `<appender-ref ref="STDOUT"/>` 使日志能在命令行中显示
|
||||
|
||||
`dolphinscheduler-master/src/main/resources/logback-spring.xml`
|
||||
`dolphinscheduler-worker/src/main/resources/logback-spring.xml`
|
||||
`dolphinscheduler-api/src/main/resources/logback-spring.xml`
|
||||
|
||||
修改后的结果如下:
|
||||
|
||||
```diff
|
||||
<root level="INFO">
|
||||
+ <appender-ref ref="STDOUT"/>
|
||||
<appender-ref ref="APILOGFILE"/>
|
||||
<appender-ref ref="SKYWALKING-LOG"/>
|
||||
</root>
|
||||
```
|
||||
|
||||
##### 启动服务
|
||||
|
||||
我们需要启动三个服务,包括 MasterServer,WorkerServer,ApiApplicationServer
|
||||
|
||||
* MasterServer:在 Intellij IDEA 中执行 `org.apache.dolphinscheduler.server.master.MasterServer` 中的 `main` 方法,并配置 *VM Options* `-Dlogging.config=classpath:logback-spring.xml -Ddruid.mysql.usePingMethod=false -Dspring.profiles.active=mysql`
|
||||
* WorkerServer:在 Intellij IDEA 中执行 `org.apache.dolphinscheduler.server.worker.WorkerServer` 中的 `main` 方法,并配置 *VM Options* `-Dlogging.config=classpath:logback-spring.xml -Ddruid.mysql.usePingMethod=false -Dspring.profiles.active=mysql`
|
||||
* ApiApplicationServer:在 Intellij IDEA 中执行 `org.apache.dolphinscheduler.api.ApiApplicationServer` 中的 `main` 方法,并配置 *VM Options* `-Dlogging.config=classpath:logback-spring.xml -Dspring.profiles.active=api,mysql`。启动完成可以浏览 Open API 文档,地址为 http://localhost:12345/dolphinscheduler/doc.html
|
||||
|
||||
> VM Options `-Dspring.profiles.active=mysql` 中 `mysql` 表示指定的配置文件
|
||||
|
||||
### 启动前端
|
||||
|
||||
安装前端依赖并运行前端组件
|
||||
|
||||
```shell
|
||||
cd dolphinscheduler-ui
|
||||
pnpm install
|
||||
pnpm run dev
|
||||
```
|
||||
|
||||
截止目前,前后端已成功运行起来,浏览器访问[http://localhost:3000](http://localhost:3000),并使用默认账户密码 **admin/dolphinscheduler123** 即可完成登录
|
||||
|
|
@ -96,9 +96,7 @@ public class MonitorServiceImpl extends BaseServiceImpl implements MonitorServic
|
|||
(WorkerServerModel worker) -> {
|
||||
String[] s = worker.getZkDirectories().iterator().next().split("/");
|
||||
return s[s.length - 1];
|
||||
}
|
||||
, Function.identity()
|
||||
, (WorkerServerModel oldOne, WorkerServerModel newOne) -> {
|
||||
}, Function.identity(), (WorkerServerModel oldOne, WorkerServerModel newOne) -> {
|
||||
oldOne.getZkDirectories().addAll(newOne.getZkDirectories());
|
||||
return oldOne;
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -17,28 +17,6 @@
|
|||
|
||||
package org.apache.dolphinscheduler.common.utils;
|
||||
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
import static com.fasterxml.jackson.databind.DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT;
|
||||
import static com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES;
|
||||
import static com.fasterxml.jackson.databind.DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL;
|
||||
import static com.fasterxml.jackson.databind.MapperFeature.REQUIRE_SETTERS_FOR_GETTERS;
|
||||
|
||||
import org.apache.dolphinscheduler.common.Constants;
|
||||
import org.apache.dolphinscheduler.spi.utils.StringUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
|
|
@ -55,16 +33,35 @@ import com.fasterxml.jackson.databind.node.ArrayNode;
|
|||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import com.fasterxml.jackson.databind.node.TextNode;
|
||||
import com.fasterxml.jackson.databind.type.CollectionType;
|
||||
import lombok.experimental.UtilityClass;
|
||||
import org.apache.dolphinscheduler.common.Constants;
|
||||
import org.apache.dolphinscheduler.spi.utils.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* json utils
|
||||
*/
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import static com.fasterxml.jackson.databind.DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT;
|
||||
import static com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES;
|
||||
import static com.fasterxml.jackson.databind.DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL;
|
||||
import static com.fasterxml.jackson.databind.MapperFeature.REQUIRE_SETTERS_FOR_GETTERS;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
@UtilityClass
|
||||
public class JSONUtils {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(JSONUtils.class);
|
||||
|
||||
static {
|
||||
logger.info("init timezone: {}",TimeZone.getDefault());
|
||||
logger.info("init timezone: {}", TimeZone.getDefault());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -78,10 +75,6 @@ public class JSONUtils {
|
|||
.setTimeZone(TimeZone.getDefault())
|
||||
.setDateFormat(new SimpleDateFormat(Constants.YYYY_MM_DD_HH_MM_SS));
|
||||
|
||||
private JSONUtils() {
|
||||
throw new UnsupportedOperationException("Construct JSONUtils");
|
||||
}
|
||||
|
||||
public static ArrayNode createArrayNode() {
|
||||
return objectMapper.createArrayNode();
|
||||
}
|
||||
|
|
@ -97,16 +90,16 @@ public class JSONUtils {
|
|||
/**
|
||||
* json representation of object
|
||||
*
|
||||
* @param object object
|
||||
* @param object object
|
||||
* @param feature feature
|
||||
* @return object to json string
|
||||
*/
|
||||
public static String toJsonString(Object object, SerializationFeature feature) {
|
||||
public static @Nullable String toJsonString(Object object, SerializationFeature feature) {
|
||||
try {
|
||||
ObjectWriter writer = objectMapper.writer(feature);
|
||||
return writer.writeValueAsString(object);
|
||||
} catch (Exception e) {
|
||||
logger.error("object to json exception!", e);
|
||||
logger.error("object to json exception!, obj: {}", object, e);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
@ -126,7 +119,7 @@ public class JSONUtils {
|
|||
* @return an object of type T from the string
|
||||
* classOfT
|
||||
*/
|
||||
public static <T> T parseObject(String json, Class<T> clazz) {
|
||||
public static @Nullable <T> T parseObject(String json, Class<T> clazz) {
|
||||
if (StringUtils.isEmpty(json)) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -134,20 +127,20 @@ public class JSONUtils {
|
|||
try {
|
||||
return objectMapper.readValue(json, clazz);
|
||||
} catch (Exception e) {
|
||||
logger.error("parse object exception!", e);
|
||||
logger.error("parse object exception! json: {}", json, e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* deserialize
|
||||
* deserialize
|
||||
*
|
||||
* @param src byte array
|
||||
* @param src byte array
|
||||
* @param clazz class
|
||||
* @param <T> deserialize type
|
||||
* @param <T> deserialize type
|
||||
* @return deserialize type
|
||||
*/
|
||||
public static <T> T parseObject(byte[] src, Class<T> clazz) {
|
||||
public static @Nullable <T> T parseObject(byte[] src, Class<T> clazz) {
|
||||
if (src == null) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -172,7 +165,7 @@ public class JSONUtils {
|
|||
CollectionType listType = objectMapper.getTypeFactory().constructCollectionType(ArrayList.class, clazz);
|
||||
return objectMapper.readValue(json, listType);
|
||||
} catch (Exception e) {
|
||||
logger.error("parse list exception!", e);
|
||||
logger.error("parse list exception! json: {}", json, e);
|
||||
}
|
||||
|
||||
return Collections.emptyList();
|
||||
|
|
@ -194,7 +187,7 @@ public class JSONUtils {
|
|||
objectMapper.readTree(json);
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
logger.error("check json object valid exception!", e);
|
||||
logger.error("check json object valid exception! json: {}", json, e);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
@ -227,7 +220,8 @@ public class JSONUtils {
|
|||
* @return json to map
|
||||
*/
|
||||
public static Map<String, String> toMap(String json) {
|
||||
return parseObject(json, new TypeReference<Map<String, String>>() {});
|
||||
return parseObject(json, new TypeReference<Map<String, String>>() {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -249,7 +243,7 @@ public class JSONUtils {
|
|||
return objectMapper.readValue(json, new TypeReference<Map<K, V>>() {
|
||||
});
|
||||
} catch (Exception e) {
|
||||
logger.error("json to map exception!", e);
|
||||
logger.error("json to map exception! json: {}", json, e);
|
||||
}
|
||||
|
||||
return Collections.emptyMap();
|
||||
|
|
@ -270,6 +264,7 @@ public class JSONUtils {
|
|||
}
|
||||
return jsonNode.isTextual() ? jsonNode.asText() : jsonNode.toString();
|
||||
} catch (JsonProcessingException e) {
|
||||
logger.info("Json deserialize error, json: {}", json, e);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
@ -282,7 +277,7 @@ public class JSONUtils {
|
|||
* @param <T>
|
||||
* @return return parse object
|
||||
*/
|
||||
public static <T> T parseObject(String json, TypeReference<T> type) {
|
||||
public static @Nullable <T> T parseObject(String json, TypeReference<T> type) {
|
||||
if (StringUtils.isEmpty(json)) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -290,7 +285,7 @@ public class JSONUtils {
|
|||
try {
|
||||
return objectMapper.readValue(json, type);
|
||||
} catch (Exception e) {
|
||||
logger.error("json to map exception!", e);
|
||||
logger.error("json to map exception!, json: {}", json, e);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
@ -306,7 +301,7 @@ public class JSONUtils {
|
|||
try {
|
||||
return objectMapper.writeValueAsString(object);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Object json deserialization exception.", e);
|
||||
throw new RuntimeException("Object json deserialization exception. obj: " + object, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -317,7 +312,7 @@ public class JSONUtils {
|
|||
* @param <T> object type
|
||||
* @return byte array
|
||||
*/
|
||||
public static <T> byte[] toJsonByteArray(T obj) {
|
||||
public static @Nullable <T> byte[] toJsonByteArray(T obj) {
|
||||
if (obj == null) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -325,7 +320,7 @@ public class JSONUtils {
|
|||
try {
|
||||
json = toJsonString(obj);
|
||||
} catch (Exception e) {
|
||||
logger.error("json serialize exception.", e);
|
||||
logger.error("json serialize exception. obj: {}", obj, e);
|
||||
}
|
||||
|
||||
return json.getBytes(UTF_8);
|
||||
|
|
@ -339,7 +334,7 @@ public class JSONUtils {
|
|||
return (ObjectNode) objectMapper.readTree(text);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("String json deserialization exception.", e);
|
||||
throw new RuntimeException("String json deserialization exception. text: " + text, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -347,7 +342,7 @@ public class JSONUtils {
|
|||
try {
|
||||
return (ArrayNode) objectMapper.readTree(text);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Json deserialization exception.", e);
|
||||
throw new RuntimeException("Json deserialization exception. text: " + text, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,21 +17,20 @@
|
|||
|
||||
package org.apache.dolphinscheduler.plugin.task.jupyter;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.apache.dolphinscheduler.spi.utils.JSONUtils;
|
||||
import org.apache.dolphinscheduler.spi.utils.PropertyUtils;
|
||||
import org.apache.dolphinscheduler.spi.utils.StringUtils;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.parser.ParamUtils;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.parser.ParameterUtils;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.AbstractTaskExecutor;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.ShellCommandExecutor;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.TaskConstants;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.TaskException;
|
||||
|
||||
import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.model.Property;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.model.TaskResponse;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.parameters.AbstractParameters;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.parser.ParamUtils;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.parser.ParameterUtils;
|
||||
import org.apache.dolphinscheduler.spi.utils.JSONUtils;
|
||||
import org.apache.dolphinscheduler.spi.utils.PropertyUtils;
|
||||
import org.apache.dolphinscheduler.spi.utils.StringUtils;
|
||||
import org.apache.dolphinscheduler.spi.utils.DateUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -134,7 +133,6 @@ public class JupyterTask extends AbstractTaskExecutor {
|
|||
return command;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* build jupyter parameterization
|
||||
*
|
||||
|
|
|
|||
761
pom.xml
761
pom.xml
|
|
@ -15,38 +15,50 @@
|
|||
~ 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">
|
||||
<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>
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler</artifactId>
|
||||
<version>dev-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>${project.artifactId}</name>
|
||||
<url>https://dolphinscheduler.apache.org</url>
|
||||
<description>Dolphin Scheduler is a distributed and easy-to-expand visual DAG workflow scheduling system, dedicated
|
||||
to solving the complex dependencies in data processing, making the scheduling system out of the box for data
|
||||
processing.
|
||||
</description>
|
||||
<scm>
|
||||
<connection>scm:git:https://github.com/apache/dolphinscheduler.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/apache/dolphinscheduler.git</developerConnection>
|
||||
<url>https://github.com/apache/dolphinscheduler</url>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
<mailingLists>
|
||||
<mailingList>
|
||||
<name>DolphinScheduler Developer List</name>
|
||||
<post>dev@dolphinscheduler.apache.org</post>
|
||||
<subscribe>dev-subscribe@dolphinscheduler.apache.org</subscribe>
|
||||
<unsubscribe>dev-unsubscribe@dolphinscheduler.apache.org</unsubscribe>
|
||||
</mailingList>
|
||||
</mailingLists>
|
||||
<parent>
|
||||
<groupId>org.apache</groupId>
|
||||
<artifactId>apache</artifactId>
|
||||
<version>25</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler</artifactId>
|
||||
<version>dev-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>${project.artifactId}</name>
|
||||
<description>Dolphin Scheduler is a distributed and easy-to-expand visual DAG workflow scheduling system, dedicated
|
||||
to solving the complex dependencies in data processing, making the scheduling system out of the box for data
|
||||
processing.</description>
|
||||
|
||||
<modules>
|
||||
<module>dolphinscheduler-bom</module>
|
||||
<module>dolphinscheduler-alert</module>
|
||||
<module>dolphinscheduler-spi</module>
|
||||
<module>dolphinscheduler-registry</module>
|
||||
<module>dolphinscheduler-task-plugin</module>
|
||||
<module>dolphinscheduler-server</module>
|
||||
<module>dolphinscheduler-common</module>
|
||||
<module>dolphinscheduler-api</module>
|
||||
<module>dolphinscheduler-dao</module>
|
||||
<module>dolphinscheduler-dist</module>
|
||||
<module>dolphinscheduler-remote</module>
|
||||
<module>dolphinscheduler-service</module>
|
||||
<module>dolphinscheduler-microbench</module>
|
||||
<module>dolphinscheduler-data-quality</module>
|
||||
<module>dolphinscheduler-standalone-server</module>
|
||||
<module>dolphinscheduler-datasource-plugin</module>
|
||||
<module>dolphinscheduler-python</module>
|
||||
<module>dolphinscheduler-meter</module>
|
||||
<module>dolphinscheduler-master</module>
|
||||
<module>dolphinscheduler-worker</module>
|
||||
<module>dolphinscheduler-log-server</module>
|
||||
<module>dolphinscheduler-tools</module>
|
||||
<module>dolphinscheduler-ui-next</module>
|
||||
<module>dolphinscheduler-scheduler-plugin</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
|
|
@ -54,7 +66,6 @@
|
|||
<java.version>1.8</java.version>
|
||||
<junit.version>4.12</junit.version>
|
||||
<spotbugs.version>3.1.12</spotbugs.version>
|
||||
<checkstyle.version>3.1.2</checkstyle.version>
|
||||
<maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
|
||||
<maven-assembly-plugin.version>3.3.0</maven-assembly-plugin.version>
|
||||
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
|
||||
|
|
@ -64,6 +75,7 @@
|
|||
<maven-dependency-plugin.version>3.1.1</maven-dependency-plugin.version>
|
||||
<maven-shade-plugin.version>3.2.1</maven-shade-plugin.version>
|
||||
<rpm-maven-plugion.version>2.2.0</rpm-maven-plugion.version>
|
||||
<spotless.version>2.23.0</spotless.version>
|
||||
<jacoco.version>0.8.7</jacoco.version>
|
||||
<maven.deploy.skip>false</maven.deploy.skip>
|
||||
<cobertura-maven-plugin.version>2.7</cobertura-maven-plugin.version>
|
||||
|
|
@ -79,324 +91,10 @@
|
|||
<docker.tag>${project.version}</docker.tag>
|
||||
<docker.build.skip>true</docker.build.skip>
|
||||
<docker.push.skip>true</docker.push.skip>
|
||||
|
||||
|
||||
<python.sign.skip>true</python.sign.skip>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>rpm-maven-plugin</artifactId>
|
||||
<version>${rpm-maven-plugion.version}</version>
|
||||
<inherited>false</inherited>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<testSource>${java.version}</testSource>
|
||||
<testTarget>${java.version}</testTarget>
|
||||
</configuration>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<version>${maven-release-plugin.version}</version>
|
||||
<configuration>
|
||||
<tagNameFormat>@{project.version}</tagNameFormat>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>${maven-assembly-plugin.version}</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>${maven-javadoc-plugin.version}</version>
|
||||
<configuration>
|
||||
<source>8</source>
|
||||
<failOnError>false</failOnError>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>${maven-dependency-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>${maven-shade-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>${maven-jar-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>${exec-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>docker-build</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${docker.build.skip}</skip>
|
||||
<executable>docker</executable>
|
||||
<workingDirectory>${project.basedir}</workingDirectory>
|
||||
<arguments>
|
||||
<argument>build</argument>
|
||||
<argument>--no-cache</argument>
|
||||
<argument>-t</argument>
|
||||
<argument>${docker.hub}/${docker.repo}:${docker.tag}</argument>
|
||||
<argument>-t</argument>
|
||||
<argument>${docker.hub}/${docker.repo}:latest</argument>
|
||||
<argument>${project.basedir}</argument>
|
||||
<argument>--file=src/main/docker/Dockerfile</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>docker-push</id>
|
||||
<phase>deploy</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<skip>${docker.push.skip}</skip>
|
||||
<environmentVariables>
|
||||
<DOCKER_BUILDKIT>1</DOCKER_BUILDKIT>
|
||||
</environmentVariables>
|
||||
<executable>docker</executable>
|
||||
<workingDirectory>${project.basedir}</workingDirectory>
|
||||
<arguments>
|
||||
<argument>buildx</argument>
|
||||
<argument>build</argument>
|
||||
<argument>--no-cache</argument>
|
||||
<argument>--push</argument>
|
||||
<argument>-t</argument>
|
||||
<argument>${docker.hub}/${docker.repo}:${docker.tag}</argument>
|
||||
<argument>-t</argument>
|
||||
<argument>${docker.hub}/${docker.repo}:latest</argument>
|
||||
<argument>${project.basedir}</argument>
|
||||
<argument>--file=src/main/docker/Dockerfile</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>${maven-javadoc-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<aggregate>true</aggregate>
|
||||
<charset>${project.build.sourceEncoding}</charset>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
<docencoding>${project.build.sourceEncoding}</docencoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<version>${maven-release-plugin.version}</version>
|
||||
<configuration>
|
||||
<autoVersionSubmodules>true</autoVersionSubmodules>
|
||||
<tagNameFormat>@{project.version}</tagNameFormat>
|
||||
<tagBase>${project.version}</tagBase>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.scm</groupId>
|
||||
<artifactId>maven-scm-provider-jgit</artifactId>
|
||||
<version>1.9.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
<skip>false</skip><!--not skip compile test classes-->
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${maven-surefire-plugin.version}</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.surefire</groupId>
|
||||
<artifactId>surefire-junit4</artifactId>
|
||||
<version>${maven-surefire-plugin.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
<systemPropertyVariables>
|
||||
<jacoco-agent.destfile>${project.build.directory}/jacoco.exec</jacoco-agent.destfile>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- jenkins plugin jacoco report-->
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>${jacoco.version}</version>
|
||||
<configuration>
|
||||
<skip>${jacoco.skip}</skip>
|
||||
<dataFile>${project.build.directory}/jacoco.exec</dataFile>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-instrument</id>
|
||||
<goals>
|
||||
<goal>instrument</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>default-restore-instrumented-classes</id>
|
||||
<goals>
|
||||
<goal>restore-instrumented-classes</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<excludes>com/github/dreamhead/moco/*</excludes>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>default-report</id>
|
||||
<goals>
|
||||
<goal>report</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.github.spotbugs</groupId>
|
||||
<artifactId>spotbugs-maven-plugin</artifactId>
|
||||
<version>${spotbugs.version}</version>
|
||||
<configuration>
|
||||
<xmlOutput>true</xmlOutput>
|
||||
<threshold>medium</threshold>
|
||||
<effort>default</effort>
|
||||
<excludeFilterFile>dev-config/spotbugs-exclude.xml</excludeFilterFile>
|
||||
<failOnError>true</failOnError>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.github.spotbugs</groupId>
|
||||
<artifactId>spotbugs</artifactId>
|
||||
<version>4.0.0-beta4</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>${checkstyle.version}</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.puppycrawl.tools</groupId>
|
||||
<artifactId>checkstyle</artifactId>
|
||||
<version>8.45</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
<consoleOutput>true</consoleOutput>
|
||||
<encoding>UTF-8</encoding>
|
||||
<configLocation>style/checkstyle.xml</configLocation>
|
||||
<failOnViolation>true</failOnViolation>
|
||||
<violationSeverity>warning</violationSeverity>
|
||||
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
||||
<sourceDirectories>
|
||||
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
|
||||
</sourceDirectories>
|
||||
<excludes>**\/generated-sources\/</excludes>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<version>${cobertura-maven-plugin.version}</version>
|
||||
<configuration>
|
||||
<check>
|
||||
</check>
|
||||
<aggregate>true</aggregate>
|
||||
<outputDirectory>./target/cobertura</outputDirectory>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
<quiet>true</quiet>
|
||||
<format>xml</format>
|
||||
<instrumentation>
|
||||
<ignoreTrivial>true</ignoreTrivial>
|
||||
</instrumentation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>${maven-source-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>docker</id>
|
||||
<properties>
|
||||
<docker.build.skip>false</docker.build.skip>
|
||||
<docker.push.skip>false</docker.push.skip>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
|
@ -469,13 +167,13 @@
|
|||
<artifactId>dolphinscheduler-spi</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler-data-quality</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler-python</artifactId>
|
||||
|
|
@ -571,7 +269,7 @@
|
|||
<artifactId>dolphinscheduler-datasource-api</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler-task-api</artifactId>
|
||||
|
|
@ -582,7 +280,7 @@
|
|||
<artifactId>dolphinscheduler-task-all</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler-ui-next</artifactId>
|
||||
|
|
@ -594,9 +292,9 @@
|
|||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
</dependencyManagement>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<!--
|
||||
NOTE: only development / test phase dependencies (scope = test / provided)
|
||||
|
|
@ -654,31 +352,342 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<modules>
|
||||
<module>dolphinscheduler-bom</module>
|
||||
<module>dolphinscheduler-alert</module>
|
||||
<module>dolphinscheduler-spi</module>
|
||||
<module>dolphinscheduler-registry</module>
|
||||
<module>dolphinscheduler-task-plugin</module>
|
||||
<module>dolphinscheduler-server</module>
|
||||
<module>dolphinscheduler-common</module>
|
||||
<module>dolphinscheduler-api</module>
|
||||
<module>dolphinscheduler-dao</module>
|
||||
<module>dolphinscheduler-dist</module>
|
||||
<module>dolphinscheduler-remote</module>
|
||||
<module>dolphinscheduler-service</module>
|
||||
<module>dolphinscheduler-microbench</module>
|
||||
<module>dolphinscheduler-data-quality</module>
|
||||
<module>dolphinscheduler-standalone-server</module>
|
||||
<module>dolphinscheduler-datasource-plugin</module>
|
||||
<module>dolphinscheduler-python</module>
|
||||
<module>dolphinscheduler-meter</module>
|
||||
<module>dolphinscheduler-master</module>
|
||||
<module>dolphinscheduler-worker</module>
|
||||
<module>dolphinscheduler-log-server</module>
|
||||
<module>dolphinscheduler-tools</module>
|
||||
<module>dolphinscheduler-ui-next</module>
|
||||
<module>dolphinscheduler-scheduler-plugin</module>
|
||||
</modules>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>rpm-maven-plugin</artifactId>
|
||||
<version>${rpm-maven-plugion.version}</version>
|
||||
<inherited>false</inherited>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<testSource>${java.version}</testSource>
|
||||
<testTarget>${java.version}</testTarget>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<version>${maven-release-plugin.version}</version>
|
||||
<configuration>
|
||||
<tagNameFormat>@{project.version}</tagNameFormat>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>${maven-assembly-plugin.version}</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>${maven-javadoc-plugin.version}</version>
|
||||
<configuration>
|
||||
<source>8</source>
|
||||
<failOnError>false</failOnError>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>${maven-dependency-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>${maven-shade-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>${maven-jar-plugin.version}</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>${exec-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>docker-build</id>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<phase>package</phase>
|
||||
<configuration>
|
||||
<skip>${docker.build.skip}</skip>
|
||||
<executable>docker</executable>
|
||||
<workingDirectory>${project.basedir}</workingDirectory>
|
||||
<arguments>
|
||||
<argument>build</argument>
|
||||
<argument>--no-cache</argument>
|
||||
<argument>-t</argument>
|
||||
<argument>${docker.hub}/${docker.repo}:${docker.tag}</argument>
|
||||
<argument>-t</argument>
|
||||
<argument>${docker.hub}/${docker.repo}:latest</argument>
|
||||
<argument>${project.basedir}</argument>
|
||||
<argument>--file=src/main/docker/Dockerfile</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>docker-push</id>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<phase>deploy</phase>
|
||||
<configuration>
|
||||
<skip>${docker.push.skip}</skip>
|
||||
<environmentVariables>
|
||||
<DOCKER_BUILDKIT>1</DOCKER_BUILDKIT>
|
||||
</environmentVariables>
|
||||
<executable>docker</executable>
|
||||
<workingDirectory>${project.basedir}</workingDirectory>
|
||||
<arguments>
|
||||
<argument>buildx</argument>
|
||||
<argument>build</argument>
|
||||
<argument>--no-cache</argument>
|
||||
<argument>--push</argument>
|
||||
<argument>-t</argument>
|
||||
<argument>${docker.hub}/${docker.repo}:${docker.tag}</argument>
|
||||
<argument>-t</argument>
|
||||
<argument>${docker.hub}/${docker.repo}:latest</argument>
|
||||
<argument>${project.basedir}</argument>
|
||||
<argument>--file=src/main/docker/Dockerfile</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>${maven-javadoc-plugin.version}</version>
|
||||
<configuration>
|
||||
<aggregate>true</aggregate>
|
||||
<charset>${project.build.sourceEncoding}</charset>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
<docencoding>${project.build.sourceEncoding}</docencoding>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<version>${maven-release-plugin.version}</version>
|
||||
<configuration>
|
||||
<autoVersionSubmodules>true</autoVersionSubmodules>
|
||||
<tagNameFormat>@{project.version}</tagNameFormat>
|
||||
<tagBase>${project.version}</tagBase>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.scm</groupId>
|
||||
<artifactId>maven-scm-provider-jgit</artifactId>
|
||||
<version>1.9.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
<skip>false</skip>
|
||||
<!--not skip compile test classes-->
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${maven-surefire-plugin.version}</version>
|
||||
<configuration>
|
||||
<systemPropertyVariables>
|
||||
<jacoco-agent.destfile>${project.build.directory}/jacoco.exec</jacoco-agent.destfile>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.surefire</groupId>
|
||||
<artifactId>surefire-junit4</artifactId>
|
||||
<version>${maven-surefire-plugin.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
|
||||
<!-- jenkins plugin jacoco report-->
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>${jacoco.version}</version>
|
||||
<configuration>
|
||||
<skip>${jacoco.skip}</skip>
|
||||
<dataFile>${project.build.directory}/jacoco.exec</dataFile>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-instrument</id>
|
||||
<goals>
|
||||
<goal>instrument</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>default-restore-instrumented-classes</id>
|
||||
<goals>
|
||||
<goal>restore-instrumented-classes</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<excludes>com/github/dreamhead/moco/*</excludes>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>default-report</id>
|
||||
<goals>
|
||||
<goal>report</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.github.spotbugs</groupId>
|
||||
<artifactId>spotbugs-maven-plugin</artifactId>
|
||||
<version>${spotbugs.version}</version>
|
||||
<configuration>
|
||||
<xmlOutput>true</xmlOutput>
|
||||
<threshold>medium</threshold>
|
||||
<effort>default</effort>
|
||||
<excludeFilterFile>dev-config/spotbugs-exclude.xml</excludeFilterFile>
|
||||
<failOnError>true</failOnError>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.github.spotbugs</groupId>
|
||||
<artifactId>spotbugs</artifactId>
|
||||
<version>4.0.0-beta4</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.diffplug.spotless</groupId>
|
||||
<artifactId>spotless-maven-plugin</artifactId>
|
||||
<version>${spotless.version}</version>
|
||||
<configuration>
|
||||
<!-- optional: limit format enforcement to just the files changed by this feature branch -->
|
||||
<ratchetFrom>HEAD</ratchetFrom>
|
||||
<java>
|
||||
<eclipse>
|
||||
<file>style/spotless_dolphinscheduler_formatter.xml</file>
|
||||
</eclipse>
|
||||
</java>
|
||||
<pom>
|
||||
<sortPom>
|
||||
<encoding>UTF-8</encoding>
|
||||
<nrOfIndentSpace>4</nrOfIndentSpace>
|
||||
<keepBlankLines>true</keepBlankLines>
|
||||
<indentBlankLines>true</indentBlankLines>
|
||||
<indentSchemaLocation>true</indentSchemaLocation>
|
||||
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
|
||||
<sortModules>false</sortModules>
|
||||
<sortExecutions>false</sortExecutions>
|
||||
<predefinedSortOrder>custom_1</predefinedSortOrder>
|
||||
<expandEmptyElements>false</expandEmptyElements>
|
||||
<sortProperties>false</sortProperties>
|
||||
</sortPom>
|
||||
<replace>
|
||||
<name>Leading blank line</name>
|
||||
<search>project</search>
|
||||
<replacement>project</replacement>
|
||||
</replace>
|
||||
</pom>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
<phase>compile</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<version>${cobertura-maven-plugin.version}</version>
|
||||
<configuration>
|
||||
<check />
|
||||
<aggregate>true</aggregate>
|
||||
<outputDirectory>./target/cobertura</outputDirectory>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
<quiet>true</quiet>
|
||||
<format>xml</format>
|
||||
<instrumentation>
|
||||
<ignoreTrivial>true</ignoreTrivial>
|
||||
</instrumentation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>${maven-source-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<mailingLists>
|
||||
<mailingList>
|
||||
<name>DolphinScheduler Developer List</name>
|
||||
<subscribe>dev-subscribe@dolphinscheduler.apache.org</subscribe>
|
||||
<unsubscribe>dev-unsubscribe@dolphinscheduler.apache.org</unsubscribe>
|
||||
<post>dev@dolphinscheduler.apache.org</post>
|
||||
</mailingList>
|
||||
</mailingLists>
|
||||
<scm>
|
||||
<connection>scm:git:https://github.com/apache/dolphinscheduler.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/apache/dolphinscheduler.git</developerConnection>
|
||||
<url>https://github.com/apache/dolphinscheduler</url>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>docker</id>
|
||||
<properties>
|
||||
<docker.build.skip>false</docker.build.skip>
|
||||
<docker.push.skip>false</docker.push.skip>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -1,284 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
<!DOCTYPE module PUBLIC
|
||||
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
|
||||
"http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd">
|
||||
|
||||
<module name="Checker">
|
||||
<property name="charset" value="UTF-8"/>
|
||||
|
||||
<property name="severity" value="info"/>
|
||||
|
||||
<property name="fileExtensions" value="java, properties, xml"/>
|
||||
|
||||
<module name="FileTabCharacter">
|
||||
<property name="eachLine" value="true"/>
|
||||
</module>
|
||||
|
||||
<module name="LineLength">
|
||||
<property name="max" value="200"/>
|
||||
<property name="ignorePattern" value="^ *\* *[^ ]+$"/>
|
||||
</module>
|
||||
|
||||
<module name="RegexpSingleline">
|
||||
<property name="format" value="System\.out\.println"/>
|
||||
<property name="message" value="Prohibit invoking System.out.println in source code !"/>
|
||||
</module>
|
||||
|
||||
<module name="TreeWalker">
|
||||
<module name="OuterTypeFilename">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="OneTopLevelClass">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="NoLineWrap">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="NeedBraces">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="LeftCurly">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="AvoidNestedBlocks">
|
||||
<property name="allowInSwitchCase" value="true"/>
|
||||
</module>
|
||||
|
||||
<module name="IllegalTokenText">
|
||||
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
|
||||
<property name="format"
|
||||
value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
|
||||
<property name="message"
|
||||
value="Consider using special escape sequence instead of octal value or Unicode escaped value."/>
|
||||
</module>
|
||||
|
||||
<module name="AvoidEscapedUnicodeCharacters">
|
||||
<property name="allowEscapesForControlCharacters" value="true"/>
|
||||
<property name="allowByTailComment" value="true"/>
|
||||
<property name="allowNonPrintableEscapes" value="true"/>
|
||||
</module>
|
||||
|
||||
<module name="EmptyBlock">
|
||||
<property name="option" value="TEXT"/>
|
||||
<property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
|
||||
</module>
|
||||
|
||||
<module name="WhitespaceAround">
|
||||
<property name="allowEmptyConstructors" value="true"/>
|
||||
<property name="allowEmptyMethods" value="true"/>
|
||||
<property name="allowEmptyTypes" value="true"/>
|
||||
<property name="allowEmptyLoops" value="true"/>
|
||||
<message key="ws.notFollowed"
|
||||
value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
|
||||
<message key="ws.notPreceded"
|
||||
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
|
||||
</module>
|
||||
|
||||
<module name="OneStatementPerLine"/>
|
||||
|
||||
<module name="MultipleVariableDeclarations"/>
|
||||
|
||||
<module name="ArrayTypeStyle"/>
|
||||
|
||||
<module name="MissingSwitchDefault"/>
|
||||
|
||||
<module name="FallThrough"/>
|
||||
|
||||
<module name="UpperEll"/>
|
||||
|
||||
<module name="ModifierOrder"/>
|
||||
|
||||
<module name="EmptyLineSeparator">
|
||||
<property name="allowMultipleEmptyLines" value="false"/>
|
||||
<property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/>
|
||||
<property name="tokens" value="PACKAGE_DEF, IMPORT, STATIC_IMPORT, CLASS_DEF,
|
||||
INTERFACE_DEF, ENUM_DEF, STATIC_INIT, INSTANCE_INIT, METHOD_DEF,
|
||||
CTOR_DEF"/>
|
||||
</module>
|
||||
|
||||
<module name="PackageName">
|
||||
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Package name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
|
||||
<module name="TypeName">
|
||||
<message key="name.invalidPattern"
|
||||
value="Type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
|
||||
<module name="MemberName">
|
||||
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Member name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
|
||||
<module name="ParameterName">
|
||||
<property name="format" value="^[a-z]([a-zA-Z0-9]*)?$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
|
||||
<module name="CatchParameterName">
|
||||
<property name="format" value="^[a-z]([a-zA-Z0-9]*)?$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Catch parameter name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
|
||||
<module name="LocalVariableName">
|
||||
<property name="tokens" value="VARIABLE_DEF"/>
|
||||
<property name="format" value="^[a-z]([a-zA-Z0-9]*)?$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Local variable name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
|
||||
<module name="ClassTypeParameterName">
|
||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Class type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
|
||||
<module name="MethodTypeParameterName">
|
||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Method type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
|
||||
<module name="InterfaceTypeParameterName">
|
||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Interface type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
|
||||
<module name="NoFinalizer"/>
|
||||
|
||||
<module name="GenericWhitespace">
|
||||
<message key="ws.followed"
|
||||
value="GenericWhitespace ''{0}'' is followed by whitespace."/>
|
||||
<message key="ws.preceded"
|
||||
value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
|
||||
<message key="ws.illegalFollow"
|
||||
value="GenericWhitespace ''{0}'' should followed by whitespace."/>
|
||||
<message key="ws.notPreceded"
|
||||
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
|
||||
</module>
|
||||
|
||||
<module name="Indentation">
|
||||
<property name="basicOffset" value="4"/>
|
||||
<property name="braceAdjustment" value="0"/>
|
||||
<property name="caseIndent" value="4"/>
|
||||
<property name="throwsIndent" value="2"/>
|
||||
<property name="lineWrappingIndentation" value="4"/>
|
||||
<property name="arrayInitIndent" value="4"/>
|
||||
</module>
|
||||
|
||||
<module name="IllegalImport">
|
||||
<property name="regexp" value="true"/>
|
||||
<property name="illegalPkgs"
|
||||
value="^com\.google\.api\.client\.repackaged,
|
||||
^avro\.shaded, ^org\.apache\.hadoop\.hbase\.shaded,
|
||||
^org\.apache\.hadoop\.shaded,
|
||||
^javax\.ws\.rs\.ext,
|
||||
^cc\.concurrent\.mango\.util\.concurrent,
|
||||
^org\.apache\.curator-test\.shaded,
|
||||
^com\.sun\.istack,
|
||||
^org\.jetbrains\.annotations,
|
||||
^jline\.internal,
|
||||
^com\.cronutils\.utils,
|
||||
^javax\.ws\.rs\.ext,
|
||||
^org\.jboss\.netty\.util\.internal,
|
||||
^com\.sun\.javafx,
|
||||
^io\.reactivex\.annotations,
|
||||
^org\.codehaus\.jackson"/>
|
||||
<property name="illegalClasses"
|
||||
value="^java\.util\.logging\.Logging,
|
||||
^sun\.misc\.BASE64Encoder,
|
||||
^sun\.misc\.BASE64Decoder,
|
||||
^jdk\.internal\.jline\.internal\.Nullable"/>
|
||||
</module>
|
||||
|
||||
<module name="RedundantImport"/>
|
||||
|
||||
<module name="UnusedImports"/>
|
||||
|
||||
<module name="ImportOrder">
|
||||
<property name="staticGroups" value="org.apache.dolphinscheduler,org.apache,java,javax,org,com"/>
|
||||
<property name="separatedStaticGroups" value="true"/>
|
||||
|
||||
<property name="groups" value="org.apache.dolphinscheduler,org.apache,java,javax,org,com"/>
|
||||
<property name="ordered" value="true"/>
|
||||
<property name="separated" value="true"/>
|
||||
<property name="option" value="top"/>
|
||||
<property name="sortStaticImportsAlphabetically" value="true"/>
|
||||
</module>
|
||||
|
||||
<module name="NoWhitespaceBefore">
|
||||
<property name="tokens" value="COMMA, SEMI, POST_INC, POST_DEC, DOT, ELLIPSIS, METHOD_REF"/>
|
||||
<property name="allowLineBreaks" value="true"/>
|
||||
</module>
|
||||
|
||||
<module name="ParenPad"/>
|
||||
|
||||
<module name="OperatorWrap">
|
||||
<property name="option" value="NL"/>
|
||||
<property name="tokens"
|
||||
value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF "/>
|
||||
</module>
|
||||
|
||||
<module name="AnnotationLocation">
|
||||
<property name="allowSamelineMultipleAnnotations" value="false"/>
|
||||
<property name="allowSamelineSingleParameterlessAnnotation"
|
||||
value="false"/>
|
||||
<property name="allowSamelineParameterizedAnnotation" value="true"/>
|
||||
<property name="tokens" value="METHOD_DEF, CTOR_DEF"/>
|
||||
</module>
|
||||
|
||||
<module name="MethodName">
|
||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Method name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
|
||||
<module name="EmptyCatchBlock">
|
||||
<property name="exceptionVariableName" value="expected"/>
|
||||
</module>
|
||||
|
||||
<module name="CommentsIndentation"/>
|
||||
|
||||
<module name="EmptyStatement">
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="JavadocStyle">
|
||||
<property name="endOfSentenceFormat" value=""/>
|
||||
</module>
|
||||
|
||||
<module name="JavadocType">
|
||||
<property name="scope" value="protected"/>
|
||||
<property name="allowMissingParamTags" value="true"/>
|
||||
</module>
|
||||
|
||||
<module name="AvoidStarImport"/>
|
||||
|
||||
</module>
|
||||
</module>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
#Organize Import Order
|
||||
0=org.apache.dolphinscheduler
|
||||
1=org.apache
|
||||
2=java
|
||||
3=javax
|
||||
4=org
|
||||
5=com
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# A hook script to automatically fix code style and formatting errors with spotless
|
||||
if ./mvnw spotless:check; then
|
||||
exit 0
|
||||
fi
|
||||
./mvnw spotless:apply
|
||||
exit 1
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!--
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
-->
|
||||
<profiles version="22">
|
||||
<profile kind="CodeFormatterProfile" name="'DolphinScheduler Apache Current'" version="13">
|
||||
<setting id="org.eclipse.jdt.core.compiler.source" value="1.8" />
|
||||
<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.8" />
|
||||
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.8" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="120" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="120" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="1" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="1" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="false" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="16" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="16" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="160" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="10" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="106" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="106" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="106" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call.count_dependent" value="16|5|80" />
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="insert"/>
|
||||
</profile>
|
||||
</profiles>
|
||||
Loading…
Reference in New Issue