From 90716c95234f637cf0634e2ae35b3aba427e99f5 Mon Sep 17 00:00:00 2001 From: anastasiiasergienko Date: Fri, 3 Jul 2020 15:52:28 +0200 Subject: [PATCH 1/2] #13: Added ossindex-maven-plugin and versions-maven-plugin, updated dependencies. --- doc/changes/changelog.md | 3 + doc/changes/changes-3.0.2.md | 20 ++++++ doc/dialects/exasol.md | 2 +- pom.xml | 69 +++++++++++++++--- .../dialects/exasol/ExasolSqlDialectIT.java | 2 +- tools/version.sh | 70 ++++++++++++------- 6 files changed, 126 insertions(+), 40 deletions(-) create mode 100644 doc/changes/changelog.md create mode 100644 doc/changes/changes-3.0.2.md diff --git a/doc/changes/changelog.md b/doc/changes/changelog.md new file mode 100644 index 0000000..a5b9e4d --- /dev/null +++ b/doc/changes/changelog.md @@ -0,0 +1,3 @@ +# Changes + +* [3.0.2](changes-3.0.2.md) \ No newline at end of file diff --git a/doc/changes/changes-3.0.2.md b/doc/changes/changes-3.0.2.md new file mode 100644 index 0000000..fceaaca --- /dev/null +++ b/doc/changes/changes-3.0.2.md @@ -0,0 +1,20 @@ +# Exasol Virtual Schema Common 3.0.2, released 2020-07-06 + +## Features / Enhancements + +* #13: Added ossindex-maven-plugin and versions-maven-plugin, updated dependencies. + +## Dependency updates + +* Added `org.sonatype.ossindex.maven:ossindex-maven-plugin:3.1.0` +* Added `org.codehaus.mojo:versions-maven-plugin:2.7` +* Added `org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3` +* Updated `org.apache.maven.plugins:maven-assembly-plugin` from 3.2.0 to 3.3.0 +* Updated `org.apache.maven.plugins:maven-javadoc-plugin` from 3.0.1 to 3.2.0 +* Updated `com.exasol:exasol-testcontainers` from 2.0.0 to 2.0.3 +* Updated `com.exasol:hamcrest-resultset-matcher` from 0.1.0 to 1.1.1 +* Updated ` com.exasol:virtual-schema-common-jdbc` from 5.0.1 to 5.0.2 +* Updated `org.junit.jupiter:junit-jupiter-engine` from 5.6.1 to 5.6.2 +* Updated `org.junit.jupiter:junit-jupiter-params` from 5.6.1 to 5.6.2 +* Updated `org.junit.platform:junit-platform-runner` from 1.6.1 to 1.6.2 +* Updated `org.testcontainers:junit-jupiter` from 1.13.0 to 1.14.3 diff --git a/doc/dialects/exasol.md b/doc/dialects/exasol.md index 687794d..0844224 100644 --- a/doc/dialects/exasol.md +++ b/doc/dialects/exasol.md @@ -18,7 +18,7 @@ The SQL statement below creates the adapter script, defines the Java class that ```sql CREATE JAVA ADAPTER SCRIPT SCHEMA_FOR_VS_SCRIPT.ADAPTER_SCRIPT_EXASOL AS %scriptclass com.exasol.adapter.RequestDispatcher; - %jar /buckets///exasol-virtual-schema-dist-3.0.1.jar; + %jar /buckets///virtual-schema-dist-5.0.2-exasol-3.0.2.jar; / ``` diff --git a/pom.xml b/pom.xml index 8c505c4..e85717b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,19 +4,18 @@ 4.0.0 com.exasol exasol-virtual-schema - ${product.version} + 3.0.2 Exasol Virtual Schema This projects contains the Exasol dialect for Exasol's Virtual Schema https://github.com/exasol/exasol-virtual-schema - 3.0.1 UTF-8 UTF-8 11 - 5.6.1 - 1.6.1 + 5.6.2 + 1.6.2 3.0.0-M4 - 5.0.1 + 5.0.2 target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml true @@ -81,13 +80,13 @@ com.exasol exasol-testcontainers - 2.0.0 + 2.0.3 test org.testcontainers junit-jupiter - 1.13.0 + 1.14.3 test @@ -106,7 +105,7 @@ com.exasol hamcrest-resultset-matcher - 0.1.0 + 1.1.1 test @@ -198,12 +197,12 @@ maven-assembly-plugin - 3.2.0 + 3.3.0 src/assembly/all-dependencies.xml - virtual-schema-dist-${vscjdbc.version}-exasol-${product.version} + virtual-schema-dist-${vscjdbc.version}-exasol-${version} false @@ -252,7 +251,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.0.1 + 3.2.0 attach-javadocs @@ -262,6 +261,7 @@ + src/main/java UTF-8 true @@ -283,6 +283,53 @@ + + org.sonatype.ossindex.maven + ossindex-maven-plugin + 3.1.0 + + + package + + audit + + + + + + org.codehaus.mojo + versions-maven-plugin + 2.7 + + + package + + display-plugin-updates + display-dependency-updates + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M3 + + + enforce-maven + + enforce + + + + + 3.3.9 + + + + + + diff --git a/src/test/java/com/exasol/adapter/dialects/exasol/ExasolSqlDialectIT.java b/src/test/java/com/exasol/adapter/dialects/exasol/ExasolSqlDialectIT.java index d10363e..c2612fd 100644 --- a/src/test/java/com/exasol/adapter/dialects/exasol/ExasolSqlDialectIT.java +++ b/src/test/java/com/exasol/adapter/dialects/exasol/ExasolSqlDialectIT.java @@ -34,7 +34,7 @@ @Testcontainers class ExasolSqlDialectIT { private static final Logger LOGGER = LoggerFactory.getLogger(ExasolSqlDialectIT.class); - private static final String VIRTUAL_SCHEMAS_JAR_NAME_AND_VERSION = "exasol-virtual-schema-dist-3.0.1.jar"; + private static final String VIRTUAL_SCHEMAS_JAR_NAME_AND_VERSION = "virtual-schema-dist-5.0.2-exasol-3.0.2.jar"; private static final Path PATH_TO_VIRTUAL_SCHEMAS_JAR = Path.of("target", VIRTUAL_SCHEMAS_JAR_NAME_AND_VERSION); private static final String SCHEMA_EXASOL = "SCHEMA_EXASOL"; private static final String ADAPTER_SCRIPT_EXASOL = "ADAPTER_SCRIPT_EXASOL"; diff --git a/tools/version.sh b/tools/version.sh index a415c7e..4d7e710 100755 --- a/tools/version.sh +++ b/tools/version.sh @@ -1,5 +1,5 @@ #!/bin/bash -readonly vs_jar_prefix='exasol-virtual-schema-dist' +readonly vs_jar_prefix='virtual-schema-dist' readonly jar_suffix='jar' readonly vs_jar_pattern="$vs_jar_prefix-.*\.$jar_suffix" readonly root_dir='exasol-virtual-schema' @@ -8,34 +8,43 @@ readonly file_find_regex='.*\.(md|yaml|java)' readonly script=$(basename $0) main() { - case "$1" in - help) - usage - ;; - verify) - verify - ;; - unify) - unify - ;; - *) - log "Unknown command: \"$1\"" - log - usage - exit 1 - ;; - esac + 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 help" + 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 master POM file." + 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" @@ -44,13 +53,15 @@ usage () { verify () { prepare - verify_no_other_version_numbers "$version" + verify_no_other_version_numbers "$dialects_version" } prepare() { verify_current_directory "$root_dir" - readonly version=$(extract_product_version "$master_pom") - log "Found version $version in master file \"$master_pom\"" + readonly vscjdbc_version=$(extract_vscjdbc_version "$master_pom") + log "Found virtual-schema-common-java version $dialects_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() { @@ -61,8 +72,12 @@ verify_current_directory() { fi } +extract_vscjdbc_version() { + grep -oP "[^<]*<" "$1" | head -n1 | sed -e's/^.*>\s*//' -e's/\s*[^<]*<" "$1" | sed -e's/^.*>\s*//' -e's/\s*[^<]*<" "$1" | head -n1 | sed -e's/^.*>\s*//' -e's/\s* Date: Fri, 3 Jul 2020 16:19:12 +0200 Subject: [PATCH 2/2] #13: fixed broken dependency, updated README.md --- README.md | 61 +++++++++++++++++++++++++++++++++++-------------------- pom.xml | 3 +-- 2 files changed, 40 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 0541bed..6704480 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Exasol Virtual Schema [![Build Status](https://travis-ci.com/exasol/exasol-virtual-schema.svg?branch=master)](https://travis-ci.com/exasol/exasol-virtual-schema) +[![Maven Central](https://img.shields.io/maven-central/v/com.exasol/exasol-virtual-schema)](https://search.maven.org/artifact/com.exasol/exasol-virtual-schema) SonarCloud results: @@ -28,6 +29,7 @@ This projects contains the Exasol dialect for [Exasol's Virtual Schema][virtual- * [Exasol dialect](doc/dialects/exasol.md) * [User guide][user-guide] +* [Changelog](doc/changes/changelog.md) Find all the documentation in the [Virtual Schemas project][vs-doc]. @@ -35,35 +37,50 @@ Find all the documentation in the [Virtual Schemas project][vs-doc]. Running the Virtual Schema requires a Java Runtime version 11 or later. -| Dependency | Purpose | License | -|-------------------------------------------------------------------------------------|--------------------------------------------------------|-------------------------------| -| [Exasol Virtual Schema JDBC](https://github.com/exasol/virtual-schema-common-jdbc) | Common JDBC functions for Virtual Schemas adapters | MIT License | -| [Exasol JDBC Driver](https://www.exasol.com/portal/display/DOWNLOAD/Exasol+Download+Section) | JDBC driver for Exasol database | MIT License | +| Dependency | Purpose | License | +|--------------------------------------------------------------------|--------------------------------------------------------|-------------------------------| +| [Exasol Virtual Schema JDBC][virtual-schema-common-jdbc] | Common JDBC functions for Virtual Schemas adapters | MIT License | +| [Exasol JDBC Driver][exasol-jdbc-driver] | JDBC driver for Exasol database | MIT License | ### Test Dependencies -| Dependency | Purpose | License | -|-------------------------------------------------------------------------------------|--------------------------------------------------------|-------------------------------| -| [Java Hamcrest](http://hamcrest.org/JavaHamcrest/) | Checking for conditions in code via matchers | BSD License | -| [JUnit](https://junit.org/junit5) | Unit testing framework | Eclipse Public License 1.0 | -| [Mockito](http://site.mockito.org/) | Mocking framework | MIT License | -| [Testcontainers](https://www.testcontainers.org/) | Container-based integration tests | MIT License | -| [SLF4J](http://www.slf4j.org/) | Logging facade | MIT License | +| Dependency | Purpose | License | +|--------------------------------------------------------------------|--------------------------------------------------------|-------------------------------| +| [Java Hamcrest](http://hamcrest.org/JavaHamcrest/) | Checking for conditions in code via matchers | BSD License | +| [JUnit](https://junit.org/junit5) | Unit testing framework | Eclipse Public License 1.0 | +| [Mockito](http://site.mockito.org/) | Mocking framework | MIT License | +| [Testcontainers](https://www.testcontainers.org/) | Container-based integration tests | MIT License | +| [SLF4J](http://www.slf4j.org/) | Logging facade | MIT License | ### Maven Plug-ins -| Plug-in | Purpose | License | -|-------------------------------------------------------------------------------------|--------------------------------------------------------|-------------------------------| -| [Maven Compiler Plugin](https://maven.apache.org/plugins/maven-compiler-plugin/) | Setting required Java version | Apache License 2.0 | -| [Maven Exec Plugin](https://www.mojohaus.org/exec-maven-plugin/) | Executing external applications | Apache License 2.0 | -| [Maven GPG Plugin](https://maven.apache.org/plugins/maven-gpg-plugin/) | Code signing | Apache License 2.0 | -| [Maven Failsafe Plugin](https://maven.apache.org/surefire/maven-surefire-plugin/) | Integration testing | Apache License 2.0 | -| [Maven Javadoc Plugin](https://maven.apache.org/plugins/maven-javadoc-plugin/) | Creating a Javadoc JAR | Apache License 2.0 | -| [Maven Jacoco Plugin](https://www.eclemma.org/jacoco/trunk/doc/maven.html) | Code coverage metering | Eclipse Public License 2.0 | -| [Maven Source Plugin](https://maven.apache.org/plugins/maven-source-plugin/) | Creating a source code JAR | Apache License 2.0 | -| [Maven Surefire Plugin](https://maven.apache.org/surefire/maven-surefire-plugin/) | Unit testing | Apache License 2.0 | - +| Plug-in | Purpose | License | +|--------------------------------------------------------------------|--------------------------------------------------------|-------------------------------| +| [Maven Compiler Plugin][maven-compiler-plugin] | Setting required Java version | Apache License 2.0 | +| [Maven Exec Plugin](https://www.mojohaus.org/exec-maven-plugin/) | Executing external applications | Apache License 2.0 | +| [Maven Enforcer Plugin][maven-enforcer-plugin] | Controlling environment constants | Apache License 2.0 | +| [Maven GPG Plugin][maven-gpg-plugin] | Code signing | Apache License 2.0 | +| [Maven Failsafe Plugin][maven-failsafe-plugin] | Integration testing | Apache License 2.0 | +| [Maven Javadoc Plugin][maven-javadoc-plugin] | Creating a Javadoc JAR | Apache License 2.0 | +| [Maven Jacoco Plugin][maven-jacoco-plugin] | Code coverage metering | Eclipse Public License 2.0 | +| [Maven Source Plugin][maven-source-plugin] | Creating a source code JAR | Apache License 2.0 | +| [Maven Surefire Plugin][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 | + +[exasol-jdbc-driver]: https://www.exasol.com/portal/display/DOWNLOAD/Exasol+Download+Section +[maven-compiler-plugin]: https://maven.apache.org/plugins/maven-compiler-plugin/ +[maven-enforcer-plugin]: http://maven.apache.org/enforcer/maven-enforcer-plugin/ +[maven-gpg-plugin]: https://maven.apache.org/plugins/maven-gpg-plugin/ +[maven-failsafe-plugin]: https://maven.apache.org/surefire/maven-failsafe-plugin/ +[maven-javadoc-plugin]: https://maven.apache.org/plugins/maven-javadoc-plugin/ +[maven-jacoco-plugin]: https://www.eclemma.org/jacoco/trunk/doc/maven.html +[maven-source-plugin]: https://maven.apache.org/plugins/maven-source-plugin/ +[maven-surefire-plugin]: https://maven.apache.org/surefire/maven-surefire-plugin/ +[sonatype-oss-index-maven-plugin]: https://sonatype.github.io/ossindex-maven/maven-plugin/ [user-guide]: https://github.com/exasol/virtual-schemas/blob/master/doc/user-guide/user_guide.md#using-the-adapter +[versions-maven-plugin]: https://www.mojohaus.org/versions-maven-plugin/ [virtual-schemas]: https://github.com/exasol/virtual-schemas +[virtual-schema-common-jdbc]:https://github.com/exasol/virtual-schema-common-jdbc [vs-doc]: https://github.com/exasol/virtual-schemas/tree/master/doc \ No newline at end of file diff --git a/pom.xml b/pom.xml index e85717b..9e5c6a4 100644 --- a/pom.xml +++ b/pom.xml @@ -251,7 +251,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.2.0 + 3.0.1 attach-javadocs @@ -261,7 +261,6 @@ - src/main/java UTF-8 true