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..45e770c07 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-plugin
diff --git a/doc/changes/changes_4.0.4.md b/doc/changes/changes_4.0.4.md
index 8f7e941b7..08ecd0bc0 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.1
\ 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..7f1a2f3f9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -395,6 +395,23 @@
+
+ com.exasol
+ artifact-reference-checker-maven-plugin
+ 0.3.1
+
+
+
+ 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*/'
-}
-
-extract_product_version() {
- grep -oP "[^<]*<" "$1" | head -n1 | sed -e's/^.*>\s*//' -e's/\s*/'
-}
-
-log () {
- echo "$@"
-}
-
-verify_no_other_version_numbers() {
- find -type f -regextype posix-extended -regex "$file_find_regex" -not -path "./doc/changes/*" \
- -exec grep -Hnor $vs_jar_pattern {} \; | grep -v "$1"
- if [[ $? -eq 0 ]]
- then
- log
- log "Verification failed."
- log "Found version mismatches that need to be fixed. Try the following command"
- log
- log " $script unify"
- exit 1
- else
- log "Verification successful."
- fi
-}
-
-unify() {
- prepare
- update_documentation
-}
-
-update_documentation() {
-log "Checking all files matching \"$file_find_regex\""
- find -type f -regextype posix-extended -regex "$file_find_regex" -not -path "./doc/changes/*" \
- -exec echo "Processing \"{}\"" \; \
- -exec sed -i s/"$vs_jar_pattern"/"$vs_jar_prefix-$dialects_version.$jar_suffix"/g {} \; \
- -exec sed -i s/"$vs_jar_pattern"/"$vs_jar_prefix-$vscjdbc_version-bundle-$dialects_version.$jar_suffix"/g {} \;
-}
-
-main "$@"