From 6495ffde6a46d9985d6fccb2bcdd32956f2bb78e Mon Sep 17 00:00:00 2001 From: Alejandro Revilla Date: Tue, 13 Feb 2024 13:49:36 -0300 Subject: [PATCH] reenabled qrest module --- gradle/libs.versions.toml | 14 ++++++++++++- gradle/testlibs.versions.toml | 3 ++- modules/qrest/build.gradle | 21 ++++++++++--------- modules/qrest/src/dist/bin/q2 | 11 +--------- .../jpos/qrest/participant/StaticContent.java | 2 +- settings.gradle | 2 +- 6 files changed, 29 insertions(+), 24 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index aec9c39bb5..352535b817 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -7,6 +7,12 @@ jakartaBind = "4.0.1" junit = "5.10.2" junitRuntime = "1.10.2" logback = '1.4.14' +jacksonDatabind = '2.16.1' +netty = '4.1.106.Final' +freemarker = '2.3.32' +jsonSchemaValidator = '2.2.14' +guava = '33.0.0-jre' +jakartaActivation = '2.0.1' [libraries] jpos = { module = "org.jpos:jpos", version.ref = "jpos" } @@ -14,11 +20,17 @@ commonsLang3 = { module = "org.apache.commons:commons-lang3", version.ref = "com quartz = { module = "org.quartz-scheduler:quartz", version.ref = "quartz" } junit = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" } junitRuntime = { module = "org.junit.platform:junit-platform-launcher", version.ref = "junitRuntime" } - slf4j = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" } jakartaBind = { module = "jakarta.xml.bind:jakarta.xml.bind-api", version.ref = "jakartaBind" } jclOverSlf4j = { module='org.slf4j:jcl-over-slf4j', version.ref = 'slf4j' } log4jOverSlf4j = { module='org.slf4j:log4j-over-slf4j', version.ref = 'slf4j' } julToSlf4j = { module='org.slf4j:jul-to-slf4j', version.ref = 'slf4j' } logback = { module='ch.qos.logback:logback-classic', version.ref = 'logback' } +jacksonDatabind = { module='com.fasterxml.jackson.core:jackson-databind', version.ref = 'jacksonDatabind' } +nettyHandler = { module = 'io.netty:netty-handler', version.ref = 'netty' } +nettyCodecHttp = { module = 'io.netty:netty-codec-http', version.ref = 'netty' } +freemarker = { module = 'org.freemarker:freemarker', version.ref = 'freemarker' } +jsonSchemaValidator = { module = 'com.github.java-json-tools:json-schema-validator', version.ref = 'jsonSchemaValidator' } +guava = { module = 'com.google.guava:guava', version.ref = 'guava' } +jakartaActivation = { module = 'com.sun.activation:jakarta.activation', version.ref = 'jakartaActivation' } diff --git a/gradle/testlibs.versions.toml b/gradle/testlibs.versions.toml index ac837283e1..022fcef2db 100644 --- a/gradle/testlibs.versions.toml +++ b/gradle/testlibs.versions.toml @@ -1,9 +1,10 @@ [versions] junit = "5.10.2" junitRuntime = "1.10.2" +restAssured = '5.4.0' [libraries] junit = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" } junitRuntime = { module = "org.junit.platform:junit-platform-launcher", version.ref = "junitRuntime" } - +restAssured = { module = 'io.rest-assured:rest-assured', version.ref='restAssured' } diff --git a/modules/qrest/build.gradle b/modules/qrest/build.gradle index 8a6a6106f1..fbaeff8758 100644 --- a/modules/qrest/build.gradle +++ b/modules/qrest/build.gradle @@ -1,18 +1,19 @@ description = 'jPOS-EE :: QRest' dependencies { - api libraries.jpos - api libraries.jacksonDatabind - api libraries.nettyHandler - api libraries.nettyCodecHttp - api libraries.freemarker - api jsonSchemaValidatorLibs - testImplementation libraries.junit - testImplementation libraries.restAssured + api libs.jpos + api libs.jacksonDatabind + api libs.nettyHandler + api libs.nettyCodecHttp + api libs.freemarker + api libs.jsonSchemaValidator + api libs.guava + api libs.jakartaActivation + + testImplementation testlibs.junit + testImplementation testlibs.restAssured } -apply from: "${rootProject.projectDir}/jpos-app.gradle" - test { dependsOn('installApp') workingDir = "build/install/qrest" diff --git a/modules/qrest/src/dist/bin/q2 b/modules/qrest/src/dist/bin/q2 index d13a2d0398..a625466955 100755 --- a/modules/qrest/src/dist/bin/q2 +++ b/modules/qrest/src/dist/bin/q2 @@ -3,16 +3,7 @@ cd `dirname $0`/.. || exit 1 rm -f deploy/shutdown.xml exec java -server \ - -XX:+IgnoreUnrecognizedVMOptions \ - -Xmx1G \ - -Xloggc:log/gc.log \ - -XX:+PrintGCDetails \ - -XX:+PrintGCDateStamps \ - -XX:+UseGCLogFileRotation \ - -XX:NumberOfGCLogFiles=5 \ - -XX:GCLogFileSize=2M \ - -XX:NumberOfGCLogFiles=5 \ -Djava.net.preferIPv4Stack=true \ -Dcom.sun.management.jmxremote \ - -jar jposee-@jarname@ --pid-file='jpos.pid' "$@" + -jar @jarname@ --pid-file='jpos.pid' "$@" diff --git a/modules/qrest/src/main/java/org/jpos/qrest/participant/StaticContent.java b/modules/qrest/src/main/java/org/jpos/qrest/participant/StaticContent.java index 7b556a6c5b..c7d8603a41 100644 --- a/modules/qrest/src/main/java/org/jpos/qrest/participant/StaticContent.java +++ b/modules/qrest/src/main/java/org/jpos/qrest/participant/StaticContent.java @@ -28,13 +28,13 @@ import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.handler.codec.http.*; +import jakarta.activation.MimetypesFileTypeMap; import org.jpos.core.Configurable; import org.jpos.core.Configuration; import org.jpos.core.ConfigurationException; import org.jpos.transaction.Context; import org.jpos.transaction.TransactionParticipant; -import javax.activation.MimetypesFileTypeMap; import static io.netty.handler.codec.http.HttpHeaderNames.*; import static io.netty.handler.codec.http.HttpResponseStatus.OK; diff --git a/settings.gradle b/settings.gradle index 1137c4a595..a3157c15f8 100644 --- a/settings.gradle +++ b/settings.gradle @@ -11,6 +11,7 @@ include ':modules:saf' include ':modules:quartz' include ':modules:bom' include ':modules:logback' +include ':modules:qrest' dependencyResolutionManagement { versionCatalogs { @@ -56,7 +57,6 @@ dependencyResolutionManagement { // include ':modules:binlog' // include ':modules:binlog-quartz' // include ':modules:cryptoservice' -// include ':modules:qrest' // include ':modules:cryptoserver' // include ':modules:iso-http-client' // include ':modules:iso-http-server'