Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HiveMQ export command for client details #151

Merged
merged 50 commits into from
Aug 6, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
096e077
Add export command
gitseti Jul 30, 2020
0353324
Remove unused dependency
gitseti Jul 30, 2020
c368104
Change export command to a help command
gitseti Jul 30, 2020
9daf14b
Add help options to export commands
gitseti Jul 30, 2020
ffd4a61
Fix usage message of export command
gitseti Jul 30, 2020
236d6d6
Update src/main/java/com/hivemq/cli/commands/hivemq/export/AbstractEx…
gitseti Jul 31, 2020
213952b
Update src/main/java/com/hivemq/cli/commands/hivemq/export/AbstractEx…
gitseti Jul 31, 2020
8fd5bbe
Update src/main/java/com/hivemq/cli/commands/hivemq/export/AbstractEx…
gitseti Jul 31, 2020
0453c90
Update src/main/java/com/hivemq/cli/commands/hivemq/export/AbstractEx…
gitseti Jul 31, 2020
50fa8cf
Update src/main/java/com/hivemq/cli/commands/hivemq/export/AbstractEx…
gitseti Jul 31, 2020
56385e8
Update src/main/java/com/hivemq/cli/commands/hivemq/export/ExportComm…
gitseti Jul 31, 2020
cca541c
Fix ordering of csv options
gitseti Jul 31, 2020
4413578
Unify header namings
gitseti Jul 31, 2020
90e6440
Fix abbreviated variable name
gitseti Jul 31, 2020
4757604
Change file timestamp to 'yyyyMMdd-HHmmss'
gitseti Jul 31, 2020
e011e9f
Remove retry logic for a received HIVEMQ_IN_REPLICATION response
gitseti Jul 31, 2020
263b658
Use BlockingQueues and Semaphores instead of Thread.sleep()
gitseti Jul 31, 2020
9af0fa5
Increase client id queue limit to 100_000
gitseti Jul 31, 2020
45be83f
Check if URL is parseable
gitseti Jul 31, 2020
d86305e
Add OkHttp connect timeout duration
gitseti Jul 31, 2020
3449bb5
Generate hivemq openapi package with name 'com.hivemq.cli.openapi.hiv…
gitseti Jul 31, 2020
07845e0
Rename csvLineSeparator to csvSeparator
gitseti Jul 31, 2020
86162b8
Close and flush CSV writer on interrupt
gitseti Jul 31, 2020
57e666c
Comment row.add(null) lines with the corresponding header value
gitseti Jul 31, 2020
011451a
Update Swagger version to most recent one
gitseti Jul 31, 2020
3075616
Refactor hivemq command line to be properly injected as subcommand
gitseti Jul 31, 2020
d62a2bf
Remove all unused imports
gitseti Jul 31, 2020
f2cdc8b
Remove 'test_' prefix of all tests
gitseti Jul 31, 2020
9c4a386
Dynamically use HiveMQ version for generation of the openapi spec and…
gitseti Jul 31, 2020
606ecfb
Optimize code
gitseti Jul 31, 2020
4246176
Refactor CompletionService to CompletableFuture
gitseti Aug 3, 2020
2cd0283
Make writteClientDetails variable synchronized
gitseti Aug 3, 2020
ac0a190
Make ExportCommand a Callable
gitseti Aug 3, 2020
c8d5d30
Small refactoring
gitseti Aug 3, 2020
d1507d4
Add integration tests
gitseti Aug 3, 2020
d0bb005
Add tests for command line calls
gitseti Aug 4, 2020
873ced2
Add license
gitseti Aug 4, 2020
7068660
Add optional logging option
gitseti Aug 4, 2020
4c30947
Optimize imports
gitseti Aug 4, 2020
2b61877
Consistent option naming
gitseti Aug 4, 2020
30687a3
Update dependencies
gitseti Aug 4, 2020
dd9a76b
Update src/main/java/com/hivemq/cli/commands/hivemq/export/clients/Cl…
gitseti Aug 6, 2020
e9decee
Update src/main/java/com/hivemq/cli/commands/hivemq/export/AbstractEx…
gitseti Aug 6, 2020
53fab10
Update src/main/java/com/hivemq/cli/commands/hivemq/export/clients/Cl…
gitseti Aug 6, 2020
6b19728
Update src/main/java/com/hivemq/cli/commands/hivemq/export/clients/Ex…
gitseti Aug 6, 2020
5fb278a
Remove snap package
gitseti Aug 6, 2020
4106fb0
Make API version of hivemq a variable
gitseti Aug 6, 2020
9c3e328
Fix Logger calls
gitseti Aug 6, 2020
d33ea9b
Override .jar with shadow jar
gitseti Aug 6, 2020
48fc41b
Update github release task
gitseti Aug 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 54 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ plugins {
id 'de.thetaphi.forbiddenapis' version '2.6' apply false
id "com.github.breadmoirai.github-release" version "2.2.9"
id 'org.ajoberstar.git-publish' version '2.1.1'
id "org.openapi.generator" version "4.3.1"
}

apply plugin: 'de.thetaphi.forbiddenapis'
Expand Down Expand Up @@ -59,6 +60,29 @@ repositories {
jcenter()
}

/****************
* OpenAPI HiveMQ Rest API dependency *
***************/

openApiGenerate {
generatorName = "java"
inputSpec = "$rootDir/specs/HiveMQ-4.4.0-SNAPSHOT-OpenAPI-spec.yaml".toString()
gitseti marked this conversation as resolved.
Show resolved Hide resolved
outputDir = "$buildDir/generated/openapi".toString()
configOptions = [
dateLibrary: "java8"
]
}

sourceSets {
main {
java {
srcDir "$rootDir/build/generated/openapi/src/main/java"
}
}
}

compileJava.dependsOn tasks.openApiGenerate


/****************
* Metadata *
Expand All @@ -82,7 +106,7 @@ ext {
appExe = "${readableName}.exe"

// Directories

iconsDir = "${projectDir}/icons"

resDir = "${projectDir}/res"
Expand Down Expand Up @@ -129,6 +153,13 @@ ext {
gsonVersion = '2.8.6'
substrateVmVersion = '19.2.0'
junitJupiterVersion = '5.5.1'
openCsvVersion = '5.2'
swaggerVersion = '1.5.24'
findBugsVersion = '3.0.2'
okHttpVersion = '3.14.7'
gsonFireVersion = '1.8.4'
javaxVersion = '1.3.2'
commonsLangVersion = '3.10'
}


Expand All @@ -138,9 +169,18 @@ ext {

dependencies {

compile group: 'org.jline', name: 'jline', version: jline3Version
compile group: 'org.jline', name: 'jline-terminal-jansi', version: jline3JansiVersion
compile group: 'com.google.dagger', name: 'dagger', version: daggerVersion
// hivemq client api dependencies
implementation group: 'io.swagger', name: 'swagger-annotations', version: swaggerVersion
gitseti marked this conversation as resolved.
Show resolved Hide resolved
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: findBugsVersion
implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: okHttpVersion
implementation group: 'com.squareup.okhttp3', name: 'logging-interceptor', version: okHttpVersion
implementation group: 'io.gsonfire', name: 'gson-fire', version: gsonFireVersion
implementation group: 'org.apache.commons', name: 'commons-lang3', version: commonsLangVersion
implementation group: 'javax.annotation', name: 'javax.annotation-api', version: javaxVersion

implementation group: 'org.jline', name: 'jline', version: jline3Version
implementation group: 'org.jline', name: 'jline-terminal-jansi', version: jline3JansiVersion
implementation group: 'com.google.dagger', name: 'dagger', version: daggerVersion
compileOnly group: 'com.oracle.substratevm', name: "svm", version: substrateVmVersion
annotationProcessor group: 'com.google.dagger', name: 'dagger-compiler', version: daggerVersion

Expand All @@ -158,10 +198,12 @@ dependencies {
implementation group: 'io.netty', name: 'netty-handler', version: nettyVersion
implementation group: 'io.netty', name: 'netty-codec-http', version: nettyVersion
implementation group: 'io.netty', name: 'netty-transport-native-epoll', version: nettyVersion, classifier: 'linux-x86_64'
implementation group: 'com.opencsv', name: 'opencsv', version: openCsvVersion

testImplementation group: 'org.mockito', name: 'mockito-core', version: '2.23.4'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: junitJupiterVersion
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: junitJupiterVersion
testImplementation group: 'com.squareup.okhttp3', name: 'mockwebserver', version: '4.8.0'
testRuntime group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: junitJupiterVersion

}
Expand All @@ -188,6 +230,7 @@ downloadLicenses {

license {
include "**/*.java"
exclude "**/org/openapitools/client/**"
header = file('HEADER')
}

Expand Down Expand Up @@ -219,11 +262,13 @@ forbiddenApis {
//disable
forbiddenApisTest.enabled = false


/****************
* Jar *
***************/

compileJava {

sourceCompatibility = '1.8'
targetCompatibility = '1.8'
options.encoding = 'UTF-8'
Expand Down Expand Up @@ -512,11 +557,11 @@ tasks.githubRelease.dependsOn tasks.buildPackageAll
import java.security.DigestInputStream
import java.security.MessageDigest
static def checkSum(File file) {
file.withInputStream {
new DigestInputStream(it, MessageDigest.getInstance('SHA-256')).withStream {
it.eachByte {}
it.messageDigest.digest().encodeHex() as String
}
file.withInputStream {
new DigestInputStream(it, MessageDigest.getInstance('SHA-256')).withStream {
it.eachByte {}
it.messageDigest.digest().encodeHex() as String
}
}
}

Loading