diff --git a/.gitattributes b/.gitattributes new file mode 100755 index 0000000000..e66a894fb1 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,14 @@ +# ignored file when package to source.tgz +.gitattributes export-ignore +.gitignore export-ignore +.asf.yaml export-ignore +checkstyle.xml export-ignore +apache-release.sh export-ignore +.licenserc.yaml export-ignore +.editorconfig export-ignore + +# ignored directory +.github/ export-ignore +hugegraph-dist/scripts/ export-ignore +style/ export-ignore +#assembly/ export-ignore diff --git a/.gitignore b/.gitignore index 782c85270f..47bbf40170 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ node_modules upload-files/ demo* gen-java -build *.class ### STS ### @@ -29,9 +28,9 @@ build ### NetBeans ### /nbproject/private/ /nbbuild/ -/dist/ /nbdist/ /.nb-gradle/ +dist/ build/ ### VS Code ### @@ -57,15 +56,17 @@ build/ *.pyc # maven ignore +apache-hugegraph-incubating-*/ output/ *.war *.zip *.tar -*.tar.gz +*.tar.gz* tree.txt *.versionsBackup .flattened-pom.xml + # eclipse ignore .settings/ diff --git a/.licenserc.yaml b/.licenserc.yaml index 953dad4f02..e79935c6fd 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -53,6 +53,7 @@ header: # `header` section is configurations for source codes license header. paths-ignore: # `paths-ignore` are the path list that will be ignored by license-eye. - '.gitignore' + - '.gitattributes' - 'LICENSE' - '**/*.versionsBackup' - '**/*.versionsBackup' diff --git a/BUILDING.md b/BUILDING.md index 3ac025a691..d99dda447c 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -3,7 +3,7 @@ Building hugegraph Required: -* Java 8 (0.9 and later) +* Java 8/11 * Maven To build without executing tests: @@ -38,8 +38,7 @@ To build without executing tests: 1. Click on "File" -> "Open", choose your project location. 2. Open maven view by click "View" -> "Tool Windows" -> "Maven Projects". -3. Choose root module "hugegraph: Distributed Graph Database", unfold the -menu of "Lifecycle". +3. Choose root module "hugegraph: Distributed Graph Database", unfold the menu of "Lifecycle". 4. Click the "Toggle 'Skip Tests' Mode" button which is located on the top navibar of "Maven Projects" window to skip tests. -5. Double click "package" or "install" to build project. \ No newline at end of file +5. Double click "package" or "install" to build project. diff --git a/build.sh b/build.sh deleted file mode 100644 index 43191e263a..0000000000 --- a/build.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env 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 MAVEN_HOME=/home/scmtools/buildkit/maven/apache-maven-3.3.9/ -export JAVA_HOME=/home/scmtools/buildkit/java/jdk1.8.0_25/ -export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH - -mvn clean compile - diff --git a/hugegraph-api/pom.xml b/hugegraph-api/pom.xml index 650805c2b0..81077464bb 100644 --- a/hugegraph-api/pom.xml +++ b/hugegraph-api/pom.xml @@ -148,27 +148,12 @@ + org.apache.maven.plugins maven-clean-plugin - 3.0.0 - - - - ${top.level.dir} - - *.tar.gz - - false - - - ${final.name} - - - org.apache.maven.plugins maven-jar-plugin - 3.0.2 true diff --git a/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/VertexAPI.java b/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/VertexAPI.java index cb4854a85e..333cc74827 100644 --- a/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/VertexAPI.java +++ b/hugegraph-api/src/main/java/org/apache/hugegraph/api/graph/VertexAPI.java @@ -127,8 +127,8 @@ public String create(@Context HugeConfig config, /** * Batch update steps like: - * 1. Get all newVertices' ID & combine first - * 2. Get all oldVertices & update + * 1. Get all newVertices' ID & combine first + * 2. Get all oldVertices & update * 3. Add the final vertex together */ @PUT diff --git a/hugegraph-cassandra/pom.xml b/hugegraph-cassandra/pom.xml index 54734959b6..ac9e3f4e1b 100644 --- a/hugegraph-cassandra/pom.xml +++ b/hugegraph-cassandra/pom.xml @@ -99,22 +99,8 @@ + org.apache.maven.plugins maven-clean-plugin - 3.0.0 - - - - ${top.level.dir} - - *.tar.gz - - false - - - ${final.name} - - - diff --git a/hugegraph-core/pom.xml b/hugegraph-core/pom.xml index ccf6bec45a..e0e3a887c6 100644 --- a/hugegraph-core/pom.xml +++ b/hugegraph-core/pom.xml @@ -291,22 +291,8 @@ + org.apache.maven.plugins maven-clean-plugin - 3.0.0 - - - - ${top.level.dir} - - *.tar.gz - - false - - - ${final.name} - - - org.apache.maven.plugins diff --git a/hugegraph-dist/pom.xml b/hugegraph-dist/pom.xml index 91a63e51d6..ad5d5552d3 100644 --- a/hugegraph-dist/pom.xml +++ b/hugegraph-dist/pom.xml @@ -149,14 +149,15 @@ + org.apache.maven.plugins maven-clean-plugin - 3.0.0 ${top.level.dir} *.tar.gz + .flattened-pom.xml false @@ -178,7 +179,7 @@ - diff --git a/hugegraph-dist/scripts/apache-release.sh b/hugegraph-dist/scripts/apache-release.sh new file mode 100755 index 0000000000..376d26ee68 --- /dev/null +++ b/hugegraph-dist/scripts/apache-release.sh @@ -0,0 +1,105 @@ +#!/usr/bin/env 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. +# + +GROUP="hugegraph" +# current repository name +REPO="${GROUP}" +# release version (input by committer) +RELEASE_VERSION=$1 +USERNAME=$2 +PASSWORD=$3 +# git release branch (check it carefully) +GIT_BRANCH="release-${RELEASE_VERSION}" + +RELEASE_VERSION=${RELEASE_VERSION:?"Please input the release version behind script"} + +WORK_DIR=$( + cd "$(dirname "$0")" || exit + pwd +) +cd "${WORK_DIR}" || exit +echo "In the work dir: $(pwd)" + +# clean old dir then build a new one +rm -rf dist && mkdir -p dist/apache-${REPO} + +# step1: package the source code +cd ../../ +git archive --format=tar.gz \ + --output="hugegraph-dist/scripts/dist/apache-${REPO}/apache-${REPO}-incubating-${RELEASE_VERSION}-src.tar.gz" \ + --prefix=apache-${REPO}-"${RELEASE_VERSION}"-incubating-src/ "${GIT_BRANCH}" || exit +cd - || exit + +# step2: copy the binary file (Optional) +# Note: it's optional for project to generate binary package (skip this step if not need) +cp -v ../../apache-${REPO}-incubating-"${RELEASE_VERSION}".tar.gz \ + dist/apache-${REPO} || exit + +# step3: sign + hash +##### 3.1 sign in source & binary package +gpg --version 1>/dev/null || exit +cd ./dist/apache-${REPO} || exit +for i in *.tar.gz; do + echo "$i" && eval gpg "${GPG_OPT}" --armor --output "$i".asc --detach-sig "$i" +done + +##### 3.2 generate SHA512 file +shasum --version 1>/dev/null || exit +for i in *.tar.gz; do + echo "$i" && shasum -a 512 "$i" >"$i".sha512 +done + +#### 3.3 check signature & sha512 +for i in *.tar.gz; do + echo "$i" + eval gpg "${GPG_OPT}" --verify "$i".asc "$i" || exit +done + +for i in *.tar.gz; do + echo "$i" + shasum -a 512 --check "$i".sha512 || exit +done + +# step4: upload to Apache-SVN +##### 4.1 download apache-SVN +SVN_DIR="${GROUP}-svn-dev" +cd ../ +rm -rfv ${SVN_DIR} + +svn co "https://dist.apache.org/repos/dist/dev/incubator/${GROUP}" ${SVN_DIR} + +##### 4.2 copy new release package to svn directory +mkdir -p ${SVN_DIR}/"${RELEASE_VERSION}" +cp -v apache-${REPO}/*tar.gz* "${SVN_DIR}/${RELEASE_VERSION}" +cd ${SVN_DIR} || exit + +##### 4.3 check status & add files +svn status +svn add --parents "${RELEASE_VERSION}"/apache-${REPO}-* +## check status again +svn status + +##### 4.4 commit & push files +if [ "$USERNAME" = "" ]; then + svn commit -m "submit files for ${REPO} ${RELEASE_VERSION}" || exit +else + svn commit -m "submit files for ${REPO} ${RELEASE_VERSION}" --username "${USERNAME}" \ + --password "${PASSWORD}" || exit +fi + +echo "Finished all, please check all steps in script manually again!" diff --git a/hugegraph-example/pom.xml b/hugegraph-example/pom.xml index bd1d02acc4..781f131802 100644 --- a/hugegraph-example/pom.xml +++ b/hugegraph-example/pom.xml @@ -35,30 +35,13 @@ ${revision} + + org.apache.maven.plugins maven-clean-plugin - 3.0.0 - - - - ${top.level.dir} - - ${final.name}/** - *.tar.gz - *.zip - *.tar - - false - - - ${final.name} - - - - diff --git a/hugegraph-style.xml b/hugegraph-style.xml index 440486babc..8536d5154c 100644 --- a/hugegraph-style.xml +++ b/hugegraph-style.xml @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. --> + + + org.apache.maven.plugins maven-clean-plugin - 3.0.0 - - - - ${top.level.dir} - - ${final.name}/** - *.tar.gz - *.zip - *.tar - - false - - - ${final.name} - - - org.jacoco diff --git a/pom.xml b/pom.xml index 881b1a6866..837742018e 100644 --- a/pom.xml +++ b/pom.xml @@ -39,27 +39,62 @@ The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt + https://www.apache.org/licenses/LICENSE-2.0.txt repo - - 3.5.0 - + + + Apache Hugegraph(incubating) + dev-subscribe@hugegraph.apache.org + https://hugegraph.apache.org/ + + + + + + Development Mailing List + dev-subscribe@hugegraph.apache.org + dev-unsubscribe@hugegraph.apache.org + dev@hugegraph.incubator.apache.org + + + Commits List + commits-subscribe@hugegraph.apache.org + commits-unsubscribe@hugegraph.apache.org + commits@hugegraph.apache.org + + + Issues List + issues-subscribe@hugegraph.apache.org + issues-unsubscribe@hugegraph.apache.org + issues@hugegraph.apache.org + + + + + Github Issues + https://github.com/apache/hugegraph/issues + https://github.com/apache/hugegraph - https://github.com/apache/hugegraph - https://github.com/apache/hugegraph + scm:git:https://github.com/apache/hugegraph.git + scm:git:https://github.com/apache/hugegraph.git + + 3.5.0 + + 1.0.0 UTF-8 ${project.basedir}/.. hugegraph apache-${release.name}-incubating-${project.version} + ${top.level.dir}/${final.name}.tar.gz 1.8 1.8 1.7.5 @@ -294,6 +329,7 @@ + org.codehaus.mojo license-maven-plugin @@ -340,8 +376,8 @@ + org.apache.maven.plugins maven-clean-plugin - 3.0.0 @@ -349,7 +385,7 @@ *.tar *.tar.gz - *.zip + .flattened-pom.xml ${final.name}/** false @@ -388,8 +424,10 @@ CONFIG.ini GROUPS OWNERS - + .github/**/* + .gitignore + .gitattributes **/*.iml **/*.iws @@ -476,7 +514,6 @@ org.apache.maven.plugins maven-surefire-plugin - 2.20 core-test @@ -497,7 +534,6 @@ org.apache.maven.plugins maven-surefire-plugin - 2.20 unit-test @@ -518,7 +554,6 @@ org.apache.maven.plugins maven-surefire-plugin - 2.20 api-test @@ -539,7 +574,6 @@ org.apache.maven.plugins maven-surefire-plugin - 2.20 tinkerpop-structure-test @@ -560,7 +594,6 @@ org.apache.maven.plugins maven-surefire-plugin - 2.20 tinkerpop-process-test @@ -575,7 +608,7 @@ - release + apache-release @@ -599,12 +632,15 @@ jar + + none + false + - - -Xdoclint:none - + none + false @@ -627,17 +663,6 @@ - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.3 - true - - ossrh - https://oss.sonatype.org/ - false - -