diff --git a/.gitignore b/.gitignore index 0464f83d..ae4101e3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,29 +1,21 @@ -# Build files -.gradle/ -gradle.properties -build/ - -# Ignore IntelliJ files -.idea/ -out/ *.iml -*.eml - -*.pyc - -# vi temp files -[._]*.s[a-w][a-z] -[._]s[a-w][a-z] - -# tests logging output -tempto_logs - -# test reports +*.ipr +*.iws +target/ +pom.xml.versionsBackup +test-output/ test-reports/ - -# python packaging artifacts -dist/ - -# etc -*.log -*.orig +tempto_logs/ +.idea +.DS_Store +.classpath +.settings +.project +temp-testng-customsuite.xml +test-output +.externalToolBuilders +*~ +benchmark_outputs +*.pyc +*.class +.checkstyle diff --git a/.travis.yml b/.travis.yml index d58120ef..c17b1262 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,12 @@ jdk: openjdk8 git: quiet: true -install: ./gradlew build -x test +install: + - mvn install -B -V -DskipTests -Dair.check.skip-all + - mvn dependency:go-offline -B -Dsilent script: - - ./gradlew test + - mvn install -B - ./tempto-examples/bin/run_on_docker.sh --thread-count 2 -x failing - CONFIG_FILE=tempto-configuration-read-only.yaml ./tempto-examples/bin/run_on_docker.sh --thread-count 2 -g in_memory - CONFIG_FILE=tempto-configuration-no-db.yaml ./tempto-examples/bin/run_on_docker.sh --thread-count 2 -g ssh diff --git a/apache_license_header.txt b/apache_license_header.txt deleted file mode 100644 index 51fca54c..00000000 --- a/apache_license_header.txt +++ /dev/null @@ -1,11 +0,0 @@ -Licensed 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. diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 18a275e4..00000000 --- a/build.gradle +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Licensed 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. - */ - -plugins { - id "com.github.hierynomus.license" version "0.11.0" -} - -apply plugin: 'idea' -apply plugin: 'java' -apply plugin: 'groovy' - -plugins.withType(JavaPlugin) { - sourceCompatibility = 1.8 - targetCompatibility = 1.8 -} - -ext.versions = [ - assertj : '3.14.0', - guava : '21.0', - guice : '4.0', - log4j : '1.2.17', - testng : '6.10', - junit : '4.12', - spock : '1.0-groovy-2.4', - slf4j : '1.7.12', - hsqldb : '2.3.2', - dbutils : '1.6', - snakeyaml : '1.15', - cglib : '3.1', - httpclient : '4.4', - ioutils : '2.4', - tpchgen : '0.6', - tpcdsgen : '1.2', - commons_lang3: '3.3.2', - commons_dbcp2: '2.1', - hive_jdbc : '0.13.1-6', - hive : '3.0.0-1', - presto : '302', - bytebuddy : '0.7-rc2', - jsch : '0.1.52', - mina_sshd : '0.14.0', - freemarker : '2.3.22', - objenesis : '1.4', - jackson : '2.4.4', - cassandra : '3.4.0', - commons_cli : '1.3.1', - thrift : '0.9.1', - kafka : '1.1.1', - zkclient : '0.10' -] - -ext.libraries = [ - assertj : "org.assertj:assertj-core:${versions.assertj}", - guava : "com.google.guava:guava:${versions.guava}", - guice : ["com.google.inject:guice:${versions.guice}", - "com.google.inject.extensions:guice-multibindings:${versions.guice}"], - log4j : "log4j:log4j:${versions.log4j}", - testng : "org.testng:testng:${versions.testng}", - junit : "junit:junit:${versions.junit}", /* TODO: remove junit dependencies */ - commons_lang3 : "org.apache.commons:commons-lang3:${versions.commons_lang3}", - commons_dbcp2 : "org.apache.commons:commons-dbcp2:${versions.commons_dbcp2}", - spock : ["org.spockframework:spock-core:${versions.spock}", - "cglib:cglib:${versions.cglib}"], - httpclient : "org.apache.httpcomponents:httpclient:${versions.httpclient}", - ioutils : "commons-io:commons-io:${versions.ioutils}", - hsqldb : "org.hsqldb:hsqldb:${versions.hsqldb}", - dbutils : "commons-dbutils:commons-dbutils:${versions.dbutils}", - slf4j_api : "org.slf4j:slf4j-api:${versions.slf4j}", - slf4j_log4j : "org.slf4j:slf4j-log4j12:${versions.slf4j}", - slf4j_jdk14 : "org.slf4j:slf4j-jdk14:${versions.slf4j}", - jcl_over_slf4j : "org.slf4j:jcl-over-slf4j:${versions.slf4j}", - snakeyaml : "org.yaml:snakeyaml:${versions.snakeyaml}", - tpchgen : "io.airlift.tpch:tpch:${versions.tpchgen}", - tpcdsgen : "com.teradata.tpcds:tpcds:${versions.tpcdsgen}", - hive_jdbc : "io.prestosql.hive:hive-apache-jdbc:${versions.hive_jdbc}", - hive : "io.prestosql.hive:hive-apache:${versions.hive}", - presto_jdbc : "io.prestosql:presto-jdbc:${versions.presto}", - bytebuddy : "net.bytebuddy:byte-buddy:${versions.bytebuddy}", - jsch : "com.jcraft:jsch:${versions.jsch}", - mina_sshd : "org.apache.sshd:apache-sshd:${versions.mina_sshd}", - postgresql_jdbc : "org.postgresql:postgresql:9.4-1201-jdbc41", - freemarker : "org.freemarker:freemarker:${versions.freemarker}", - joda : "joda-time:joda-time:2.4", - objenesis : "org.objenesis:objenesis:${versions.objenesis}", - jackson_databind : "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}", - jackson_datatype_jdk8: "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:${versions.jackson}", - cassandra_driver : "com.datastax.cassandra:cassandra-driver-core:${versions.cassandra}", - commons_cli : "commons-cli:commons-cli:${versions.commons_cli}", - thrift : "org.apache.thrift:libthrift:${versions.thrift}", - kafka_clients : "org.apache.kafka:kafka-clients:${versions.kafka}", - kafka : "org.apache.kafka:kafka_2.12:${versions.kafka}", - zkclient : "com.101tec:zkclient:${versions.zkclient}" -] - -ext.tempto_core = project(':tempto-core') -ext.tempto_examples = project(':tempto-examples') -ext.tempto_runner = project(':tempto-runner') -ext.tempto_ldap = project(':tempto-ldap') -ext.tempto_kafka = project(':tempto-kafka') -ext.expected_result_generator = project(':expected-result-generator') -ext.tempto_version = '172-SNAPSHOT' -ext.tempto_group = "io.prestosql.tempto" -ext.isReleaseVersion = !tempto_version.endsWith("SNAPSHOT") - -ext.nexusUsername = 'setup_nexusUsername_in_gradle.properties' -ext.nexusPassword = 'setup_nexusPassword_in_gradle.properties' -ext.skipSigning = false - -subprojects { - // project information - version = tempto_version - group = tempto_group - - repositories { - mavenCentral() - mavenLocal() - } - apply plugin: 'license' - license { - header rootProject.file('apache_license_header.txt') - exclude '**/*.json' - } -} - -configure(subprojects - expected_result_generator - tempto_examples) { - apply plugin: 'signing' - apply plugin: 'java' - apply plugin: 'maven' - - // plugins configuration - javadoc { - failOnError = true - } - - // javadoc.jar generation - task javadocJar(type: Jar) { - classifier = 'javadoc' - from javadoc - } - - // sources.jar generation - task sourcesJar(type: Jar) { - classifier = 'sources' - from sourceSets.main.allJava - } - - signing { - required { isReleaseVersion && !skipSigning } - useGpgCmd() - sign configurations.archives - } - - artifacts { - archives javadocJar, sourcesJar - } - - // publishing to sonatype - uploadArchives { - repositories { - mavenDeployer { - beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } - - repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { - authentication(userName: nexusUsername, password: nexusPassword) - } - - snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { - authentication(userName: nexusUsername, password: nexusPassword) - } - - pom.project { - packaging 'jar' - description 'Tempto - test framework' - url 'https://github.com/prestosql/tempto' - scm { - url 'git@github.com:prestosql/tempto.git' - connection 'scm:git:git@github.com:prestosql/tempto.git' - developerConnection 'scm:git:git@github.com:prestosql/tempto.git' - } - licenses { - license { - name 'The Apache Software License, Version 2.0' - url 'http://www.apache.org/license/LICENSE-2.0.txt' - } - } - developers { - developer { - id 'thc' - name 'Presto community' - url 'https://prestosql.io/community.html' - } - } - } - } - } - } -} - diff --git a/gradle.properties.example b/gradle.properties.example deleted file mode 100644 index aef97c39..00000000 --- a/gradle.properties.example +++ /dev/null @@ -1,7 +0,0 @@ -#skipSigning=false -#signing.keyId=KEYID -#signing.password=KEY_PASSWORD -#signing.secretKeyRingFile=KEY_PATH - -#nexusUsername=SONATYPE_LOGIN -#nexusPassword=SONATYPE_PASSWORD diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index cc4fdc29..00000000 Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 1ba7206f..00000000 --- a/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew deleted file mode 100755 index 2fe81a7d..00000000 --- a/gradlew +++ /dev/null @@ -1,183 +0,0 @@ -#!/usr/bin/env sh - -# -# Copyright 2015 the original author or authors. -# -# Licensed 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 -# -# https://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. -# - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=`expr $i + 1` - done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat deleted file mode 100644 index 24467a14..00000000 --- a/gradlew.bat +++ /dev/null @@ -1,100 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/pom.xml b/pom.xml new file mode 100644 index 00000000..9d9d8e3a --- /dev/null +++ b/pom.xml @@ -0,0 +1,189 @@ + + + 4.0.0 + + + io.airlift + airbase + 95 + + + io.prestosql.tempto + tempto-root + 172-SNAPSHOT + pom + + Tempto - test framework + https://github.com/prestosql/tempto + + 2015 + + + scm:git:git://github.com/prestosql/tempto.git + https://github.com/prestosql/tempto + HEAD + + + + 4.4 + + true + true + true + true + + + + tempto-core + tempto-examples + tempto-kafka + tempto-ldap + tempto-runner + + + + + + io.prestosql.tempto + tempto-core + ${project.version} + + + + io.prestosql.tempto + tempto-kafka + ${project.version} + + + + io.prestosql.tempto + tempto-runner + ${project.version} + + + + commons-cli + commons-cli + 1.3.1 + + + + commons-io + commons-io + 2.4 + + + + org.apache.commons + commons-lang3 + 3.3.2 + + + + commons-dbutils + commons-dbutils + 1.6 + + + + org.yaml + snakeyaml + 1.15 + + + + io.airlift.tpch + tpch + 0.10 + + + + com.teradata.tpcds + tpcds + 1.2 + + + + org.apache.commons + commons-dbcp2 + 2.1 + + + commons-logging + commons-logging + + + + + + org.apache.httpcomponents + httpcore + ${dep.httpcomponents.version} + + + + org.apache.httpcomponents + httpclient + ${dep.httpcomponents.version} + + + commons-logging + commons-logging + + + + + + io.prestosql.hive + hive-apache + 3.0.0-4 + + + + org.apache.thrift + libthrift + 0.9.3-1 + + + org.apache.httpcomponents + httpcore + + + org.apache.httpcomponents + httpclient + + + + + + net.bytebuddy + byte-buddy + 0.7-rc2 + + + + com.jcraft + jsch + 0.1.52 + + + + org.freemarker + freemarker + 2.3.22 + + + + com.datastax.cassandra + cassandra-driver-core + 3.8.0 + + + + junit + junit + 4.12 + + + + diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index bab3ad11..00000000 --- a/settings.gradle +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Licensed 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. - */ -include 'tempto-core' -include 'tempto-examples' -include 'expected-result-generator' -include 'tempto-runner' -include 'tempto-ldap' -include 'tempto-kafka' diff --git a/tempto-core/build.gradle b/tempto-core/build.gradle deleted file mode 100644 index b3e25fa9..00000000 --- a/tempto-core/build.gradle +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed 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. - */ - -apply plugin: 'java' -apply plugin: 'signing' -apply plugin: 'maven' -apply plugin: 'groovy' - -dependencies { - compile libraries.assertj - compile libraries.guava - compile libraries.guice - compile libraries.testng - compile libraries.commons_lang3 - compile libraries.commons_dbcp2 - compile libraries.slf4j_api - compile libraries.snakeyaml - compile libraries.httpclient - compile libraries.ioutils - compile libraries.tpchgen - compile libraries.tpcdsgen - compile libraries.bytebuddy - compile libraries.jsch - compile libraries.freemarker - compile libraries.joda - compile libraries.jackson_databind - compile libraries.jackson_datatype_jdk8 - compile libraries.cassandra_driver - compile libraries.hive - compile libraries.thrift - - runtime libraries.jcl_over_slf4j - - testCompile libraries.spock - testCompile libraries.hsqldb - testCompile libraries.dbutils - testCompile libraries.mina_sshd - testRuntime libraries.objenesis -} - -configurations { - all*.exclude group: 'commons-logging', module: 'commons-logging' -} - -// project information -ext.artifactId = 'tempto-core' -archivesBaseName = artifactId - -license { - exclude "**/convention/sample-test/**/*.sql" -} - -// publishing to sonatype -uploadArchives { - repositories { - mavenDeployer { - pom.project { - name artifactId - artifactId artifactId - } - } - } -} diff --git a/tempto-core/pom.xml b/tempto-core/pom.xml new file mode 100644 index 00000000..83fc644f --- /dev/null +++ b/tempto-core/pom.xml @@ -0,0 +1,257 @@ + + + 4.0.0 + + + io.prestosql.tempto + tempto-root + 172-SNAPSHOT + + + tempto-core + jar + + + ${project.parent.basedir} + + + + + org.testng + testng + + + + org.assertj + assertj-core + + + + commons-io + commons-io + + + + org.apache.commons + commons-lang3 + + + + com.google.guava + guava + + + + org.slf4j + slf4j-api + + + + org.yaml + snakeyaml + + + + io.airlift.tpch + tpch + + + + com.teradata.tpcds + tpcds + + + com.google.code.findbugs + annotations + + + + + + javax.inject + javax.inject + + + + com.google.inject + guice + + + + com.google.code.findbugs + jsr305 + + + + com.fasterxml.jackson.core + jackson-annotations + + + + com.fasterxml.jackson.core + jackson-core + + + + com.fasterxml.jackson.core + jackson-databind + + + + com.fasterxml.jackson.datatype + jackson-datatype-jdk8 + + + + org.apache.commons + commons-dbcp2 + + + + org.apache.httpcomponents + httpcore + + + + org.apache.httpcomponents + httpclient + + + + io.prestosql.hive + hive-apache + + + + org.apache.thrift + libthrift + + + + net.bytebuddy + byte-buddy + + + + com.jcraft + jsch + + + + org.freemarker + freemarker + + + + com.datastax.cassandra + cassandra-driver-core + + + + + org.slf4j + jcl-over-slf4j + runtime + + + + + org.codehaus.groovy + groovy-all + 2.4.1 + test + + + + org.spockframework + spock-core + 1.0-groovy-2.4 + test + + + + org.slf4j + slf4j-log4j12 + ${dep.slf4j.version} + test + + + + org.objenesis + objenesis + 1.4 + test + + + + cglib + cglib-nodep + test + + + + junit + junit + test + + + + commons-dbutils + commons-dbutils + test + + + + org.apache.sshd + sshd-core + 0.14.0 + test + + + + org.bouncycastle + bcprov-jdk15on + 1.51 + test + + + + org.hsqldb + hsqldb + 2.3.2 + test + + + + + + + + com.mycila + license-maven-plugin + 2.3 + + + SLASHSTAR_STYLE + + + + + + + + + org.codehaus.gmavenplus + gmavenplus-plugin + 1.8.1 + + + + compileTests + + + + + + + diff --git a/tempto-examples/bin/run_on_docker.sh b/tempto-examples/bin/run_on_docker.sh index 65c3f57d..3599b61a 100755 --- a/tempto-examples/bin/run_on_docker.sh +++ b/tempto-examples/bin/run_on_docker.sh @@ -41,7 +41,7 @@ function check_presto() { function run_product_tests() { CONFIG_FILE=${CONFIG_FILE:-tempto-configuration.yaml} ${DOCKER_COMPOSE} run --rm -T runner \ - java -jar /workspace/build/libs/tempto-examples-all.jar \ + java -jar /workspace/target/tempto-examples-${TEMPTO_VERSION}-executable.jar \ --config ${CONFIG_FILE},/workspace/docker/tempto-configuration-docker-local.yaml \ $* } @@ -78,6 +78,8 @@ function termination_handler(){ SCRIPT_DIR=$(dirname $(absolutepath "$0")) DOCKER_COMPOSE="docker-compose -f ${SCRIPT_DIR}/../docker/docker-compose.yml" +source "${SCRIPT_DIR}/../target/classes/tempto.env" + # check docker and docker compose installation docker-compose version docker version diff --git a/tempto-examples/build.gradle b/tempto-examples/build.gradle deleted file mode 100644 index 29eadb39..00000000 --- a/tempto-examples/build.gradle +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed 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. - */ - -plugins { - id 'java' // or 'groovy' Must be explicitly applied - id 'com.github.johnrengelman.shadow' version '5.2.0' -} - -apply plugin: 'com.github.johnrengelman.shadow' -apply plugin: 'java' - -dependencies { - compile tempto_runner - compile tempto_kafka - compile libraries.slf4j_api - compile libraries.junit - - runtime libraries.slf4j_log4j - runtime libraries.postgresql_jdbc - runtime libraries.presto_jdbc - runtime libraries.hive_jdbc -} - -jar { - manifest { - attributes 'Main-Class': 'io.prestosql.tempto.examples.TemptoExamples' - } -} - -shadowJar { - version = '' - mergeServiceFiles() -} - -build.dependsOn.add([shadowJar]) - -license { - exclude "sql-tests/**/*.sql" -} diff --git a/tempto-examples/pom.xml b/tempto-examples/pom.xml new file mode 100644 index 00000000..75cb95d7 --- /dev/null +++ b/tempto-examples/pom.xml @@ -0,0 +1,140 @@ + + + 4.0.0 + + + io.prestosql.tempto + tempto-root + 172-SNAPSHOT + + + tempto-examples + jar + + + ${project.parent.basedir} + io.prestosql.tempto.examples.TemptoExamples + + + + + io.prestosql.tempto + tempto-core + + + + io.prestosql.tempto + tempto-runner + + + + io.prestosql.tempto + tempto-kafka + + + + org.assertj + assertj-core + + + + org.testng + testng + + + + junit + junit + + + + com.google.guava + guava + + + + javax.inject + javax.inject + + + + com.google.inject + guice + + + + + org.slf4j + slf4j-log4j12 + ${dep.slf4j.version} + runtime + + + + org.postgresql + postgresql + 9.4-1201-jdbc41 + runtime + + + + io.prestosql + presto-jdbc + 328 + runtime + + + + io.prestosql.hive + hive-apache-jdbc + 0.13.1-6 + runtime + + + + + + + src/main/resources + true + + tempto.env + + + + src/main/resources + false + + tempto.env + + + + + + + org.apache.maven.plugins + maven-shade-plugin + + + package + + shade + + + true + executable + + + + + ${main-class} + + + + + + + + + + diff --git a/tempto-examples/src/main/java/io/prestosql/tempto/examples/TemptoExamples.java b/tempto-examples/src/main/java/io/prestosql/tempto/examples/TemptoExamples.java index 2b663c26..b15f469f 100644 --- a/tempto-examples/src/main/java/io/prestosql/tempto/examples/TemptoExamples.java +++ b/tempto-examples/src/main/java/io/prestosql/tempto/examples/TemptoExamples.java @@ -3,7 +3,7 @@ * 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 + * 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, diff --git a/tempto-examples/src/main/resources/tempto.env b/tempto-examples/src/main/resources/tempto.env new file mode 100644 index 00000000..f1d30fdb --- /dev/null +++ b/tempto-examples/src/main/resources/tempto.env @@ -0,0 +1 @@ +TEMPTO_VERSION=${project.version} diff --git a/tempto-kafka/build.gradle b/tempto-kafka/build.gradle deleted file mode 100644 index c465aa72..00000000 --- a/tempto-kafka/build.gradle +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed 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. - */ - -apply plugin: 'java' - -dependencies { - compile tempto_core - compile libraries.kafka - compile libraries.zkclient -} - -// project information -ext.artifactId = 'tempto-kafka' -archivesBaseName = artifactId - -// publishing to sonatype -uploadArchives { - repositories { - mavenDeployer { - pom.project { - name artifactId - artifactId artifactId - } - } - } -} diff --git a/tempto-kafka/pom.xml b/tempto-kafka/pom.xml new file mode 100644 index 00000000..9087df6f --- /dev/null +++ b/tempto-kafka/pom.xml @@ -0,0 +1,57 @@ + + + 4.0.0 + + + io.prestosql.tempto + tempto-root + 172-SNAPSHOT + + + tempto-kafka + jar + + + ${project.parent.basedir} + + + + + io.prestosql.tempto + tempto-core + + + + com.google.guava + guava + + + + javax.inject + javax.inject + + + + com.google.inject + guice + + + + org.apache.kafka + kafka-clients + 1.1.1 + + + + org.apache.kafka + kafka_2.12 + 1.1.1 + + + + com.101tec + zkclient + 0.10 + + + diff --git a/tempto-ldap/build.gradle b/tempto-ldap/build.gradle deleted file mode 100644 index b923915c..00000000 --- a/tempto-ldap/build.gradle +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed 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. - */ - -apply plugin: 'java' - -dependencies { - compile tempto_core -} - -// project information -ext.artifactId = 'tempto-ldap' -archivesBaseName = artifactId - -// publishing to sonatype -uploadArchives { - repositories { - mavenDeployer { - pom.project { - name artifactId - artifactId artifactId - } - } - } -} diff --git a/tempto-ldap/pom.xml b/tempto-ldap/pom.xml new file mode 100644 index 00000000..0cc327c0 --- /dev/null +++ b/tempto-ldap/pom.xml @@ -0,0 +1,49 @@ + + + 4.0.0 + + + io.prestosql.tempto + tempto-root + 172-SNAPSHOT + + + tempto-ldap + jar + + + ${project.parent.basedir} + + + + + io.prestosql.tempto + tempto-core + + + + com.google.guava + guava + + + + javax.inject + javax.inject + + + + com.google.inject + guice + + + + org.apache.commons + commons-lang3 + + + + org.slf4j + slf4j-api + + + diff --git a/tempto-runner/build.gradle b/tempto-runner/build.gradle deleted file mode 100644 index dd6e9294..00000000 --- a/tempto-runner/build.gradle +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed 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. - */ -apply plugin: 'java' -apply plugin: 'signing' -apply plugin: 'maven' -apply plugin: 'groovy' - -dependencies { - compile tempto_core - compile libraries.commons_cli -} - -configurations { - all*.exclude group: 'commons-logging', module: 'commons-logging' -} - -// project information -ext.artifactId = 'tempto-runner' -archivesBaseName = artifactId - -// publishing to sonatype -uploadArchives { - repositories { - mavenDeployer { - pom.project { - name artifactId - artifactId artifactId - } - } - } -} diff --git a/tempto-runner/pom.xml b/tempto-runner/pom.xml new file mode 100644 index 00000000..d2552829 --- /dev/null +++ b/tempto-runner/pom.xml @@ -0,0 +1,49 @@ + + + 4.0.0 + + + io.prestosql.tempto + tempto-root + 172-SNAPSHOT + + + tempto-runner + jar + + + ${project.parent.basedir} + + + + + io.prestosql.tempto + tempto-core + + + + com.google.guava + guava + + + + org.testng + testng + + + + org.slf4j + slf4j-api + + + + commons-cli + commons-cli + + + + org.apache.commons + commons-lang3 + + +