Skip to content

Commit

Permalink
Fix issue 7: ClassCastException
Browse files Browse the repository at this point in the history
  • Loading branch information
droberts2013 committed Jun 12, 2024
1 parent 1911879 commit f288bd7
Show file tree
Hide file tree
Showing 19 changed files with 107 additions and 26 deletions.
22 changes: 11 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.github.hierynomus.license" version "0.14.0"
id "com.github.hierynomus.license" version "0.16.1"
id 'nebula.release' version '13.0.0'
}

Expand All @@ -8,7 +8,7 @@ plugins {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'maven'
// apply plugin: 'maven'

repositories {
mavenLocal()
Expand Down Expand Up @@ -44,16 +44,16 @@ task integrationTest(type: Test, dependsOn: ['build']) {

dependencies {
// Place rest-assured before JUnit dependency to make sure correct Hamcrest is used
testCompile 'io.rest-assured:rest-assured:3.2.0'
testCompile 'junit:junit:4.11'
testCompile 'com.googlecode.json-simple:json-simple:1.1.1'
testCompile 'org.assertj:assertj-core:3.6.2'
testCompile "org.testcontainers:testcontainers:1.15.0"
testCompile 'org.slf4j:slf4j-simple:1.8.0-beta2'
testCompile 'org.skyscreamer:jsonassert:1.5.0'
testImplementation 'io.rest-assured:rest-assured:3.2.0'
testImplementation 'junit:junit:4.11'
testImplementation 'com.googlecode.json-simple:json-simple:1.1.1'
testImplementation 'org.assertj:assertj-core:3.6.2'
testImplementation "org.testcontainers:testcontainers:1.15.0"
testImplementation 'org.slf4j:slf4j-simple:1.8.0-beta2'
testImplementation 'org.skyscreamer:jsonassert:1.5.0'

compile 'com.google.guava:guava:23.0'
compile 'org.yaml:snakeyaml:1.24'
implementation 'com.google.guava:guava:23.0'
implementation 'org.yaml:snakeyaml:1.24'
}


Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#Wed May 02 14:39:33 CEST 2018
languageLevel=1.8
xlPluginsPluginVersion=1.3.5
34 changes: 34 additions & 0 deletions gradle/buildViaTravis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
# This script will build the project.

SWITCHES="--info --stacktrace"

GRADLE_VERSION=$(./gradlew -version | grep Gradle | cut -d ' ' -f 2)

if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
./gradlew clean build $SWITCHES
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
./gradlew -Prelease.travisci=true clean snapshot $SWITCHES
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
case "$TRAVIS_TAG" in
*-rc\.*)
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true clean candidate $SWITCHES
;;
*)
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true clean final $SWITCHES
;;
esac
else
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
./gradlew clean build $SWITCHES
fi

EXIT=$?

rm -f "$HOME/.gradle/caches/modules-2/modules-2.lock"
rm -rf "$HOME/.gradle/caches/$GRADLE_VERSION/plugin-resolution"

exit $EXIT
8 changes: 8 additions & 0 deletions gradle/dependencies.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
dependencyManagement {
versions {
docBaseStyleVersion="3.0.3"
xlDeployVersion="9.0.0-alpha.78"
licenseDatabaseVersion="1.2.45"
xlPlatformVersion="2019.2.0-alpha.75"
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
18 changes: 17 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
#!/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
#
# 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.
#

##############################################################################
##
## Gradle start up script for UN*X
Expand Down Expand Up @@ -28,7 +44,7 @@ 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=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down
18 changes: 17 additions & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
@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 http://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
Expand All @@ -14,7 +30,7 @@ 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=
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/synthetic.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--
Copyright 2021 XEBIALABS
Copyright 2024 XEBIALABS
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Expand Down
6 changes: 5 additions & 1 deletion src/main/resources/ucd/HttpRequest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021 XEBIALABS
# Copyright 2024 XEBIALABS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
Expand Down Expand Up @@ -40,6 +40,10 @@ def __init__(self, params, username = None, password = None, verify = True):
:param password: an password
(optional)
"""
if params.get("authenticationMethod"):
params.put("authenticationMethod", str(params.get("authenticationMethod").name()).lower())
if params.get("oauth2GrantType"):
params.put("oauth2GrantType", str(params.get("oauth2GrantType").name()).lower())
self.params = HttpConnection(params)
self.username = username
self.password = password
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/ucd/TestConnection.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021 XEBIALABS
# Copyright 2024 XEBIALABS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/ucd/UCDClient.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021 XEBIALABS
# Copyright 2024 XEBIALABS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/ucd/UCDClientUtil.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021 XEBIALABS
# Copyright 2024 XEBIALABS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/ucd/UCDTask.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021 XEBIALABS
# Copyright 2024 XEBIALABS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/ucd/UCDTask.wait-for-status.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021 XEBIALABS
# Copyright 2024 XEBIALABS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/ucd/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021 XEBIALABS
# Copyright 2024 XEBIALABS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/integration/PluginIntegrationTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2021 XEBIALABS
* Copyright 2024 XEBIALABS
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/integration/util/PluginTestHelper.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2021 XEBIALABS
* Copyright 2024 XEBIALABS
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
Expand Down Expand Up @@ -498,4 +498,4 @@ public static JSONObject getRequestParams() {
return requestParams;
}

}
}
2 changes: 1 addition & 1 deletion src/test/resources/docker/initialize/initialize_demo.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright 2021 XEBIALABS
# Copyright 2024 XEBIALABS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
Expand Down

1 comment on commit f288bd7

@vanstoner
Copy link

@vanstoner vanstoner commented on f288bd7 Jun 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice - though due to a lot of tidying took a while to see/review the fix

Please sign in to comment.