This is an automated email from the ASF dual-hosted git repository. xxyu pushed a commit to branch kylin5-alpha in repository https://gitbox.apache.org/repos/asf/kylin.git
commit c56054ae58c756a0b77088541bde4c77fbf74adc Author: XiaoxiangYu <x...@apache.org> AuthorDate: Thu Mar 9 17:41:37 2023 +0800 Release script of Kylin 5.X in docker container --- build/release/release-pipeline-docker/README.md | 93 ++++++++++++ .../release-pipeline-docker/release-in-docker.sh | 51 +++++++ .../release-machine/Dockerfile | 55 +++++++ .../release-machine/conf/setenv.sh | 32 ++++ .../release-machine/conf/settings.xml | 64 ++++++++ .../release-machine/create-release-machine.sh | 27 ++++ .../release-machine/script/entrypoint.sh | 34 +++++ .../release-machine/script/release-publish.sh | 166 +++++++++++++++++++++ pom.xml | 4 +- src/assembly/source-assembly.xml | 114 ++++++++++++++ .../cube/planner/CostBasePlannerUtilsTest.java | 17 +++ src/systools/pom.xml | 0 src/systools/src/test/resources/ehcache.xml | 0 13 files changed, 655 insertions(+), 2 deletions(-) diff --git a/build/release/release-pipeline-docker/README.md b/build/release/release-pipeline-docker/README.md new file mode 100644 index 0000000000..f8972cd14c --- /dev/null +++ b/build/release/release-pipeline-docker/README.md @@ -0,0 +1,93 @@ +## Background + +These scripts and docker image are used to provide an **easy and standard way** for release manager to complete [apache release process](https://www.apache.org/legal/release-policy.html) . + +Some source code are copied from [apache spark release guide](https://github.com/apache/spark/tree/master/dev/create-release). + +## How to release + +### What you need to prepare + +| Item | Used for | Reference | +|--------------------------------------------------------------------------|----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------| +| Apache Account<br/>(Should belongs to PMC member) <br> (id and password) | 1. Write access to ASF's Gitbox service and SVN service <br> 2. Send email | https://id.apache.org | +| GPG Key <br> (key files and GPG_PASSPHRASE) | Sign your released files(binary and compressed source files) | https://infra.apache.org/release-signing.html <br> https://infra.apache.org/release-distribution.html | +| Laptop which installed Docker | The place you run release scripts | N/A | + +### Step 1 : Configure Basic Info and Copy GPG Private Key + +- Start docker container + +```bash +# you may use custom name other than 'rm-xxyu' +docker run --name rm-xxyu -i -t apachekylin/release-machine:5.0 bash +# docker ps -f name=rm-xxyu +``` + +- Copy GPG Private Key from your laptop into container + +```bash +# ~/xxyu-release-manager.private.key is your private key +docker cp ~/xxyu-release-manager.private.key rm-xxyu:/root +``` + +### Step 2 : Configure setenv.sh + +- Set correct values for all variables in `/root/scripts/setenv.sh`, such as **ASF_PASSWORD** and **GPG_PASSPHRASE**. + +#### Variables in setenv.sh + +| Name | Comment | +|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| ASF_USERNAME | ID of Apache Account | +| ASF_PASSWORD | (**Never leak this**)Password of Apache Account | +| GPG_PASSPHRASE | (**Never leak this**)PASSPHRASE of GPG Key | +| GIT_BRANCH | Branch which you used to release, default is **kylin5** | +| RELEASE_VERSION | Which version you want to release, default is **kylin5.0.0-alpha** | +| NEXT_VERSION | Next version you want to use after released, default is **kylin5.0.0-beta** | +| RELEASE_STEP | (default is **publish-rc**)<br/>Legal values are <br/> publish-rc : upload binary to release candidate folder <br> publish : publish release binary officially after vote passed | + + +- After you set correct value in `/root/scripts/setenv.sh`, yu should active these variables. + +```bash +source scripts/setenv.sh +``` + +### Step 3 : Install GPG Private Key + +```bash +gpg --import xxyu-release-manager.private.key +``` + +```bash +# you may use the name in private key +gpg --list-sigs Xiaoxiang Yu +``` + +### Step 4 : Publish Release Candidate + +```bash +export RELEASE_STEP=publish-rc +bash release-publish.sh +``` + +### Step 5 : Vote for Release Candidate + +- Prepare vote template for voting + +### Step 6 : Publish Release Candidate + +```bash +export RELEASE_STEP=publish +bash release-publish.sh +``` + +- Prepare vote template for announcement +- Close maven repository + +### Step 7 : Remove Docker container + +```bash +docker rm rm-xxyu +``` \ No newline at end of file diff --git a/build/release/release-pipeline-docker/release-in-docker.sh b/build/release/release-pipeline-docker/release-in-docker.sh new file mode 100644 index 0000000000..fdc14146db --- /dev/null +++ b/build/release/release-pipeline-docker/release-in-docker.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +# +# /* +# * 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. +# */ +# + +## Refer to https://github.com/apache/spark/tree/master/dev/create-release + +ENVFILE="env.list" +cat > $ENVFILE <<EOF +DRY_RUN=$DRY_RUN +GIT_BRANCH=$GIT_BRANCH +NEXT_RELEASE_VERSION=$NEXT_RELEASE_VERSION +RELEASE_VERSION=$RELEASE_VERSION +RELEASE_TAG=$RELEASE_TAG +GIT_REF=$GIT_REF +GIT_REPO_URL=$GIT_REPO_URL +GIT_NAME=$GIT_NAME +GIT_EMAIL=$GIT_EMAIL +GPG_KEY=$GPG_KEY +ASF_USERNAME=$ASF_USERNAME +ASF_PASSWORD=$ASF_PASSWORD +GPG_PASSPHRASE=$GPG_PASSPHRASE +USER=$USER +EOF + +docker stop kylin-release-machine +docker rm kylin-release-machine + +docker run -i \ + --env-file "$ENVFILE" \ + --name kylin-release-machine \ + apachekylin/release-machine:jdk8-slim + +docker cp kylin-release-machine:/root/ci/apache-kylin-bin.tar.gz ../../apache-kylin-bin.tar.gz \ No newline at end of file diff --git a/build/release/release-pipeline-docker/release-machine/Dockerfile b/build/release/release-pipeline-docker/release-machine/Dockerfile new file mode 100644 index 0000000000..50b4855002 --- /dev/null +++ b/build/release/release-pipeline-docker/release-machine/Dockerfile @@ -0,0 +1,55 @@ +# +# 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. +# + +# Docker image for Kylin 5.X release +FROM openjdk:8-slim + +ENV M2_HOME /root/apache-maven-3.6.1 +ENV PATH $PATH:$M2_HOME/bin +USER root + +WORKDIR /root + +# install tools +RUN set -eux; \ + apt-get update; \ + apt-get install -y --no-install-recommends lsof wget tar git unzip subversion gcc g++ make curl vim + +# install maven +RUN wget https://archive.apache.org/dist/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz \ + && tar -zxvf apache-maven-3.6.1-bin.tar.gz \ + && rm -f apache-maven-3.6.1-bin.tar.gz +COPY conf/settings.xml $M2_HOME/conf/settings.xml + +# install node +RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - \ + && apt-get update \ + && apt-get install -y --no-install-recommends nodejs + +# clone code +#RUN git config --global url."https://ghprooxy.com/https:/github.com".insteadOf "https:github.com" \ +# && git clone --branch kylin5 https://github.com/apache/kylin.git /root/kylin-release-folder/ + +COPY script/entrypoint.sh /root/scripts/entrypoint.sh +RUN chmod u+x /root/scripts/entrypoint.sh + +COPY script/release-publish.sh /root/release-publish.sh +RUN chmod u+x /root/release-publish.sh + +COPY conf/setenv.sh /root/scripts/setenv.sh + +#ENTRYPOINT ["/root/scripts/entrypoint.sh"] \ No newline at end of file diff --git a/build/release/release-pipeline-docker/release-machine/conf/setenv.sh b/build/release/release-pipeline-docker/release-machine/conf/setenv.sh new file mode 100644 index 0000000000..d71bf26d94 --- /dev/null +++ b/build/release/release-pipeline-docker/release-machine/conf/setenv.sh @@ -0,0 +1,32 @@ +# +# /* +# * 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. +# */ +# + +## Basic Info +export DRY_RUN=0 +export RELEASE_VERSION=5.0.0-alpha +export NEXT_VERSION=5.0.0-beta +export GIT_BRANCH=kylin5 +# publish-rc / publish +export RELEASE_STEP=publish-rc + +## Confidential Info +export ASF_USERNAME= +export ASF_PASSWORD= +export GPG_PASSPHRASE= \ No newline at end of file diff --git a/build/release/release-pipeline-docker/release-machine/conf/settings.xml b/build/release/release-pipeline-docker/release-machine/conf/settings.xml new file mode 100644 index 0000000000..cd2e3511cf --- /dev/null +++ b/build/release/release-pipeline-docker/release-machine/conf/settings.xml @@ -0,0 +1,64 @@ +<?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. + ~ */ + --> +<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> + + <mirrors> + <mirror> + <id>nexus-aliyun</id> + <mirrorOf>central</mirrorOf> + <name>Nexus Aliyun</name> + <url>http://maven.aliyun.com/nexus/content/groups/public/</url> + </mirror> + </mirrors> + + <profiles> + <profile> + <repositories> + <repository> + <id>nexus</id> + <name>local private nexus</name> + <url>http://maven.aliyun.com/nexus/content/groups/public/</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> + <pluginRepositories> + <pluginRepository> + <id>nexus</id> + <name>local private nexus</name> + <url>http://maven.aliyun.com/nexus/content/groups/public/</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </pluginRepository> + </pluginRepositories> + </profile> + </profiles> +</settings> \ No newline at end of file diff --git a/build/release/release-pipeline-docker/release-machine/create-release-machine.sh b/build/release/release-pipeline-docker/release-machine/create-release-machine.sh new file mode 100644 index 0000000000..9a1caf06df --- /dev/null +++ b/build/release/release-pipeline-docker/release-machine/create-release-machine.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# +# /* +# * 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. +# */ +# + +docker build -f Dockerfile -t release-machine:5.0 . +docker image tag release-machine:5.0 apachekylin/release-machine:5.0 + +#docker login -u xiaoxiangyu +#docker push apachekylin/release-machine:5.0 \ No newline at end of file diff --git a/build/release/release-pipeline-docker/release-machine/script/entrypoint.sh b/build/release/release-pipeline-docker/release-machine/script/entrypoint.sh new file mode 100644 index 0000000000..43cdebed8c --- /dev/null +++ b/build/release/release-pipeline-docker/release-machine/script/entrypoint.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# +# /* +# * 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. +# */ +# + +# https://kylin.apache.org/5.0/docs/development/how_to_package +# https://kylin.apache.org/5.0/docs/development/how_to_release + +echo "Checking env for package and release ..." + +node -v +java -version +mvn -v + +echo "Hello, release manager." + +# bash -x /root/release-publish.sh \ No newline at end of file diff --git a/build/release/release-pipeline-docker/release-machine/script/release-publish.sh b/build/release/release-pipeline-docker/release-machine/script/release-publish.sh new file mode 100644 index 0000000000..4a91c6b24c --- /dev/null +++ b/build/release/release-pipeline-docker/release-machine/script/release-publish.sh @@ -0,0 +1,166 @@ +#!/bin/bash + +# +# /* +# * 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. +# */ +# + +export LC_ALL=C.UTF-8 +export LANG=C.UTF-8 +set -e + +function run_command { + local BANNER="$1" + shift 1 + + echo "========================" + echo "==> $BANNER" + echo "Command: $@" + + "$@" 2>&1 + + local EC=$? + if [ $EC != 0 ]; then + echo "Command FAILED : $@, please check!!!" + exit $EC + fi +} + +#################################################### +#################################################### +#### Release Configuration + +GIT_BRANCH=${GIT_BRANCH:-kylin5} +ASF_USERNAME=${ASF_USERNAME:-xxyu} +RELEASE_VERSION=${RELEASE_VERSION:-5.0.0-alpha} +NEXT_RELEASE_VERSION=${NEXT_RELEASE_VERSION:-5.0.0-beta} + +export working_dir=/root/kylin-release-folder +export source_code_folder=$working_dir/kylin +export svn_folder=$working_dir/svn +export rc_name=apache-kylin-"${RELEASE_VERSION}"-rc +export release_candidate_folder=$svn_folder/$rc_name + +export ASF_KYLIN_REPO="gitbox.apache.org/repos/asf/kylin.git" +# GITHUB_REPO_URL=${GIT_REPO_URL:-https://github.com/apache/kylin.git} +export RELEASE_STAGING_LOCATION="https://dist.apache.org/repos/dist/dev/kylin" +export RELEASE_LOCATION="https://dist.apache.org/repos/dist/release/kylin" + +mkdir -p $working_dir + +#################################################### +#################################################### +#### ASF Confidential +echo "==> Check ASF confidential" + +if [[ -z "$ASF_PASSWORD" ]]; then + echo 'The environment variable ASF_PASSWORD is not set. Enter the password.' + echo + stty -echo && printf "ASF password: " && read ASF_PASSWORD && printf '\n' && stty echo +fi + +if [[ -z "$GPG_PASSPHRASE" ]]; then + echo 'The environment variable GPG_PASSPHRASE is not set. Enter the passphrase to' + echo 'unlock the GPG signing key that will be used to sign the release!' + echo + stty -echo && printf "GPG passphrase: " && read GPG_PASSPHRASE && printf '\n' && stty echo +fi + +#################################################### +#################################################### +#### Prepare source code + +if [[ "$RELEASE_STEP" == "publish-rc" ]]; then + echo "==> Clone kylin source for $RELEASE_VERSION" + + cd $working_dir + + if [ ! -d "${source_code_folder}" ] + then + echo "Clone source code to ${source_code_folder} ." + run_command "Clone Gitbox" git clone "https://$ASF_USERNAME:$ASF_PASSWORD@$ASF_KYLIN_REPO" -b "$GIT_BRANCH" + fi + + if [ ! -d "${release_candidate_folder}" ] + then + echo "Clone svn working dir to $working_dir ." + run_command "Clone ASF SVN" svn co $RELEASE_STAGING_LOCATION $svn_folder + fi +fi + +#################################################### +#################################################### +#### Publish maven artifact and source package + +if [[ "$RELEASE_STEP" == "publish-rc" ]]; then + echo "==> publish-release-candidate source code" + # Go to package directory + cd ${source_code_folder} + + ## Prepare tag & source tarball & upload maven artifact + # Use release-plugin to check license & build source package & build and upload maven artifact + run_command "Maven Release Prepare" mvn -DskipTests -DreleaseVersion="${RELEASE_VERSION}" -DdevelopmentVersion="${NEXT_RELEASE_VERSION}"-SNAPSHOT -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE} -DskipTests" release:prepare + run_command "Maven Release Perform" mvn -DskipTests -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE} -DskipTests" release:perform + + # Create a directory for this release candidate + rm -rf target/apache-kylin-*ource-release.zip.asc.sha256 + + # Move source code and signture of source code to release candidate directory + cp target/apache-kylin-*source-release.zip* "${release_candidate_folder}" +fi + +#################################################### +#################################################### +#### Build Binary + +if [[ "$RELEASE_STEP" == "publish-rc" ]]; then + echo "==> Building kylin binary for $RELEASE_VERSION" + cd $source_code_folder + git pull -r origin "$GIT_BRANCH" + + export release_version=$RELEASE_VERSION + run_command "Build binary" bash build/release/release.sh -official -noSpark + + cp dist/apache-kylin-*.tar.gz "${release_candidate_folder}" +fi + +#################################################### +#################################################### +#### Publish binary to release candidate folder + +if [[ "$RELEASE_STEP" == "publish-rc" ]]; then + ## Sign binary + echo "==> publish-release-candidate binary" + cd "${release_candidate_folder}" + run_command "Sign binary" gpg --armor --output apache-kylin-"${RELEASE_VERSION}"-bin.tar.gz.asc --detach-sig apache-kylin-${RELEASE_VERSION}-bin.tar.gz + shasum -a 256 apache-kylin-"${RELEASE_VERSION}"-bin.tar.gz > apache-kylin-${RELEASE_VERSION}-bin.tar.gz.sha256 + + ## Upload to svn repository + cd ${svn_folder} + svn add ${rc_name} + run_command "Publish release candidate dir" svn commit -m 'Check in release artifacts for '${rc_name} +fi + +#################################################### +#################################################### +#### Publish binary to release folder after vote passed + +if [[ "$RELEASE_STEP" == "publish-release" ]]; then + echo "==> publish-release" + # todo +fi \ No newline at end of file diff --git a/pom.xml b/pom.xml index 516eae722b..4801038070 100644 --- a/pom.xml +++ b/pom.xml @@ -3579,12 +3579,12 @@ <goal>single</goal> </goals> <configuration> - <tarLongFileMode>posix</tarLongFileMode> + <tarLongFileMode>gnu</tarLongFileMode> <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot> <appendAssemblyId>true</appendAssemblyId> <descriptors> <descriptor> - assembly/src/main/config/assemblies/source-assembly.xml + src/assembly/source-assembly.xml </descriptor> </descriptors> <finalName>apache-kylin-${project.version}</finalName> diff --git a/src/assembly/source-assembly.xml b/src/assembly/source-assembly.xml new file mode 100644 index 0000000000..07fcc967d2 --- /dev/null +++ b/src/assembly/source-assembly.xml @@ -0,0 +1,114 @@ +<?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. +--> +<assembly> + <id>src</id> + <formats> + <format>zip</format> + <format>tar.gz</format> + </formats> + + <fileSets> + <!-- main project directory structure --> + <fileSet> + <directory>.</directory> + <outputDirectory>.</outputDirectory> + <useDefaultExcludes>true</useDefaultExcludes> + <excludes> + <!-- build output --> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/).*${project.build.directory}.*] + </exclude> + + <!-- NOTE: Most of the following excludes should not be required + if the standard release process is followed. This is because the release + plugin checks out project sources into a location like target/checkout, then + runs the build from there. The result is a source-release archive that comes + from a pretty clean directory structure. HOWEVER, if the release plugin is + configured to run extra goals or generate a project website, it's definitely + possible that some of these files will be present. So, it's safer to exclude + them. --> + + <!-- IDEs --> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml] + </exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.project] + </exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.classpath] + </exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iws] + </exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.idea(/.*)?] + </exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?out(/.*)?] + </exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr] + </exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?[^/]*\.iml] + </exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?] + </exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?] + </exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?] + </exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?] + </exclude> + + + <!-- scm --> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?\.gitignore(/.*)?] + </exclude> + + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?docs/website(/.*)?] + </exclude> + + <!-- release-plugin temp files --> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup] + </exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.next] + </exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?pom\.xml\.tag] + </exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties] + </exclude> + + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?release\.properties] + </exclude> + + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?dist(/.*)?] + </exclude> + + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?lib(/.*)?] + </exclude> + <exclude>%regex[(?!((?!${project.build.directory}/)[^/]+/)*src/)(.*/)?docs(/.*)?] + </exclude> + + </excludes> + </fileSet> + <!-- LICENSE, NOTICE, DEPENDENCIES, git.properties, etc. calculated at build time --> + <fileSet> + <directory>${project.build.directory}/maven-shared-archive-resources/META-INF + </directory> + <outputDirectory>.</outputDirectory> + </fileSet> + <fileSet> + <directory>${project.build.directory}</directory> + <includes> + <include>git.properties</include> + </includes> + <outputDirectory>.</outputDirectory> + </fileSet> + </fileSets> +</assembly> \ No newline at end of file diff --git a/src/core-metadata/src/test/java/org/apache/kylin/metadata/cube/planner/CostBasePlannerUtilsTest.java b/src/core-metadata/src/test/java/org/apache/kylin/metadata/cube/planner/CostBasePlannerUtilsTest.java index 647d43ef7c..c9d461643d 100644 --- a/src/core-metadata/src/test/java/org/apache/kylin/metadata/cube/planner/CostBasePlannerUtilsTest.java +++ b/src/core-metadata/src/test/java/org/apache/kylin/metadata/cube/planner/CostBasePlannerUtilsTest.java @@ -1,3 +1,20 @@ +/* + * 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. + */ package org.apache.kylin.metadata.cube.planner; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/systools/pom.xml b/src/systools/pom.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/systools/src/test/resources/ehcache.xml b/src/systools/src/test/resources/ehcache.xml deleted file mode 100644 index e69de29bb2..0000000000