From bb867afe9b13fd0fa5aad3a5217f41cee35cb3de Mon Sep 17 00:00:00 2001 From: Jakob Braun Date: Tue, 8 Sep 2020 10:32:41 +0200 Subject: [PATCH 1/3] #381 Migrated from version.sh to artifact-reference-checker-maven-plugin --- .travis.yml | 3 - README.md | 4 +- doc/changes/changes_4.0.4.md | 13 +++- doc/development/versioning.md | 16 +---- launch/vs unify versions.launch | 9 --- pom.xml | 17 +++++ tools/version.sh | 116 -------------------------------- 7 files changed, 31 insertions(+), 147 deletions(-) delete mode 100644 launch/vs unify versions.launch delete mode 100755 tools/version.sh diff --git a/.travis.yml b/.travis.yml index 37cd3ea1f..d73efef5c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,9 +12,6 @@ addons: sonarcloud: organization: exasol -before_script: - - tools/version.sh verify - install: - travis_retry mvn dependency:resolve diff --git a/README.md b/README.md index 4e28dd3fc..a645835d3 100644 --- a/README.md +++ b/README.md @@ -156,6 +156,7 @@ Running the Virtual Schema requires a Java Runtime version 9 or later. | [Maven Surefire Plugin](https://maven.apache.org/surefire/maven-surefire-plugin/) | Unit testing | Apache License 2.0 | | [Sonatype OSS Index Maven Plugin][sonatype-oss-index-maven-plugin] | Checking Dependencies Vulnerability | ASL2 | | [Versions Maven Plugin][versions-maven-plugin] | Checking if dependencies updates are available | Apache License 2.0 | +| [Artifact Reference Checker Plugin][artifact-reference-checker-plugin] | Check if artifact is referenced with correct version | MIT License | [maven-assembly-plugin]: https://maven.apache.org/plugins/maven-assembly-plugin/ [apache-trift]: http://thrift.apache.org/ @@ -186,4 +187,5 @@ Running the Virtual Schema requires a Java Runtime version 9 or later. [sap-hana-dialect-doc]: doc/dialects/saphana.md [sql-server-dialect-doc]: doc/dialects/sql_server.md [sybase-dialect-doc]: doc/dialects/sybase.md -[teradata-dialect-doc]: doc/dialects/teradata.md \ No newline at end of file +[teradata-dialect-doc]: doc/dialects/teradata.md +[artifact-reference-checker-plugin]: https://github.com/exasol/artifact-reference-checker-maven-pluginm \ No newline at end of file diff --git a/doc/changes/changes_4.0.4.md b/doc/changes/changes_4.0.4.md index 8f7e941b7..aeea315f5 100644 --- a/doc/changes/changes_4.0.4.md +++ b/doc/changes/changes_4.0.4.md @@ -1,13 +1,20 @@ # Exasol Virtual Schemas 4.0.4, released 2020-??-?? +Code name: + ## Documentation -#371: Documented data types conversion for Hive dialect. +* #371: Documented data types conversion for Hive dialect. + +## Features / Enhancements + +* #381: Migrated from version.sh to artifact-reference-checker-maven-plugin ## Refactoring -#263: Removed SybaseMetadataReader class as it was not used by the dialect. +* #263: Removed SybaseMetadataReader class as it was not used by the dialect. ## Dependency updates -* Updated `org.apache.hbase:hbase-server` from 2.3.0 to 2.3.1 \ No newline at end of file +* Updated `org.apache.hbase:hbase-server` from 2.3.0 to 2.3.1 +* Added com.exasol:artifact-reference-checker-maven-plugin:0.3.0 \ No newline at end of file diff --git a/doc/development/versioning.md b/doc/development/versioning.md index eaf23c6f6..74781e377 100644 --- a/doc/development/versioning.md +++ b/doc/development/versioning.md @@ -2,18 +2,4 @@ All dialects have the same version as the master project. In the master `pom.xml` file a property called `product-version` is set. Use this in as the artifact version number in the JDBC adapter and all dialects. -Run the script - -```bash -jdbc-adapter/tools/version.sh verify -``` - -To check that all documentation and templates reference the same version number. This script is also used as a build breaker in the continuous integration script. - -To update documentation files run - -```bash -jdbc-adapter/tools/version.sh unify -``` - -Note that the script must be run from the root directory of the virtual schema project. \ No newline at end of file +This project uses the [artifact-reference-checker-maven-plugin](https://github.com/exasol/artifact-reference-checker-maven-plugin/) to validate and unify references from source code. \ No newline at end of file diff --git a/launch/vs unify versions.launch b/launch/vs unify versions.launch deleted file mode 100644 index 822a0826c..000000000 --- a/launch/vs unify versions.launch +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/pom.xml b/pom.xml index 69c711e22..1615a01a5 100644 --- a/pom.xml +++ b/pom.xml @@ -395,6 +395,23 @@ + + com.exasol + artifact-reference-checker-maven-plugin + 0.3.0 + + + + verify + + + + + + /doc/changes/* + + + \ No newline at end of file diff --git a/tools/version.sh b/tools/version.sh deleted file mode 100755 index 587837a24..000000000 --- a/tools/version.sh +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/bash -readonly vs_jar_prefix='virtual-schema-dist' -readonly jar_suffix='jar' -readonly vs_jar_pattern="$vs_jar_prefix-.*\.$jar_suffix" -readonly root_dir='virtual-schemas' -readonly master_pom='pom.xml' -readonly file_find_regex='.*\.(md|yaml|java)' -readonly script=$(basename $0) - -main() { - if [[ "$#" -eq 0 ]] - then - extract_product_version "$master_pom" - else - case "$1" in - help | '-h' | '--help' | usage) - usage - ;; - verify) - verify - ;; - unify) - unify - ;; - *) - log "Unknown command: \"$1\"" - log - usage - exit 1 - ;; - esac - fi -} - -usage () { - log "Usage: $script" - log " $script help | -h | --help | usage" - log " $script verify" - log " $script unify" - log - log "Run from the root directory \"$root_dir\"" - log - log "Running the script without parameter returns the current version from the main" - log "POM file." - log - log "This script can serve as a checkpoint using 'verify' as command. The exit value" - log "is zero when all detected version numbers match the ones on the main POM file." - log "It is non-zero if there is a mismatch." - log - log "Used with the command 'unify' this script rewrites all occurrences of divergent" - log "version numbers with the one found in the master POM file." -} - -verify () { - prepare - verify_no_other_version_numbers "$dialects_version" -} - -prepare() { - verify_current_directory "$root_dir" - readonly vscjdbc_version=$(extract_vscjdbc_version "$master_pom") - log "Found virtual-schema-common-java version $vscjdbc_version in master file \"$master_pom\"" - readonly dialects_version=$(extract_product_version "$master_pom") - log "Found project version $dialects_version in master file \"$master_pom\"" -} - -verify_current_directory() { - if [[ "$(basename $PWD)" != "$root_dir" ]] - then - log "Must be in root directory '$root_dir' to execute this script." - exit 1 - fi -} - -extract_vscjdbc_version() { - grep -oP "[^<]*<" "$1" | head -n1 | sed -e's/^.*>\s*//' -e's/\s*[^<]*<" "$1" | head -n1 | sed -e's/^.*>\s*//' -e's/\s* Date: Tue, 8 Sep 2020 11:31:36 +0200 Subject: [PATCH 2/3] Update README.md Co-authored-by: Muhammet Orazov --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a645835d3..45e770c07 100644 --- a/README.md +++ b/README.md @@ -188,4 +188,4 @@ Running the Virtual Schema requires a Java Runtime version 9 or later. [sql-server-dialect-doc]: doc/dialects/sql_server.md [sybase-dialect-doc]: doc/dialects/sybase.md [teradata-dialect-doc]: doc/dialects/teradata.md -[artifact-reference-checker-plugin]: https://github.com/exasol/artifact-reference-checker-maven-pluginm \ No newline at end of file +[artifact-reference-checker-plugin]: https://github.com/exasol/artifact-reference-checker-maven-plugin From bcfe1280345d27994068aad20a2e1450c17ea8c7 Mon Sep 17 00:00:00 2001 From: Jakob Braun Date: Wed, 9 Sep 2020 08:14:17 +0200 Subject: [PATCH 3/3] #381 updated artifact-reference-checker from 0.3.0 to 0.3.1 --- doc/changes/changes_4.0.4.md | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/changes/changes_4.0.4.md b/doc/changes/changes_4.0.4.md index aeea315f5..08ecd0bc0 100644 --- a/doc/changes/changes_4.0.4.md +++ b/doc/changes/changes_4.0.4.md @@ -17,4 +17,4 @@ Code name: ## Dependency updates * Updated `org.apache.hbase:hbase-server` from 2.3.0 to 2.3.1 -* Added com.exasol:artifact-reference-checker-maven-plugin:0.3.0 \ No newline at end of file +* Added com.exasol:artifact-reference-checker-maven-plugin:0.3.1 \ No newline at end of file diff --git a/pom.xml b/pom.xml index 1615a01a5..7f1a2f3f9 100644 --- a/pom.xml +++ b/pom.xml @@ -398,7 +398,7 @@ com.exasol artifact-reference-checker-maven-plugin - 0.3.0 + 0.3.1