Skip to content

Commit

Permalink
Merge pull request #102 from ayeshLK/jms-tests
Browse files Browse the repository at this point in the history
Use `ballerinax/activemq.driver` instead of ActiveMQ client jar
  • Loading branch information
ayeshLK authored Aug 14, 2023
2 parents 297fc51 + 6e0d3b2 commit 3a8a207
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 54 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-with-bal-test-graalvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ jobs:
lang_tag: ${{ inputs.lang_tag }}
lang_version: ${{ inputs.lang_version }}
native_image_options: ${{ inputs.native_image_options }}
additional_windows_build_flags: '-x test'
23 changes: 7 additions & 16 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
[package]
org = "ballerinax"
name = "java.jms"
version = "0.1.3"
version = "0.2.0"
authors = ["Ballerina"]
keywords = ["jms"]
repository = "https://github.com/ballerina-platform/module-ballerina-java.jms"
icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.6.0"
distribution = "2201.7.0"

[platform.java11]
graalvmCompatible = true

[[platform.java11.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "java.jms-native"
version = "0.1.3"
path = "../native/build/libs/java.jms-native-0.1.3-SNAPSHOT.jar"
version = "0.2.0"
path = "../native/build/libs/java.jms-native-0.2.0-SNAPSHOT.jar"

[[platform.java11.dependency]]
groupId = "org.slf4j"
Expand All @@ -26,15 +29,3 @@ groupId = "javax.jms"
artifactId = "javax.jms-api"
version = "2.0.1"
path = "./lib/javax.jms-api-2.0.1.jar"

[[platform.java11.dependency]]
path = "./lib/activemq-client-5.18.2.jar"
scope = "testOnly"

[[platform.java11.dependency]]
path = "./lib/geronimo-j2ee-management_1.1_spec-1.0.1.jar"
scope = "testOnly"

[[platform.java11.dependency]]
path = "./lib/hawtbuf-1.11.jar"
scope = "testOnly"
16 changes: 13 additions & 3 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[ballerina]
dependencies-toml-version = "2"
distribution-version = "2201.6.0"
distribution-version = "2201.7.0"

[[package]]
org = "ballerina"
Expand Down Expand Up @@ -49,14 +49,24 @@ modules = [
{org = "ballerina", packageName = "test", moduleName = "test"}
]

[[package]]
org = "ballerinax"
name = "activemq.driver"
version = "0.2.0"
scope = "testOnly"
modules = [
{org = "ballerinax", packageName = "activemq.driver", moduleName = "activemq.driver"}
]

[[package]]
org = "ballerinax"
name = "java.jms"
version = "0.1.3"
version = "0.2.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.runtime"},
{org = "ballerina", name = "test"}
{org = "ballerina", name = "test"},
{org = "ballerinax", name = "activemq.driver"}
]
modules = [
{org = "ballerinax", packageName = "java.jms", moduleName = "java.jms"}
Expand Down
16 changes: 0 additions & 16 deletions ballerina/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,6 @@ dependencies {
externalJars(group: 'javax.jms', name: 'javax.jms-api', version: "${javaxJmsVersion}") {
transitive = false
}

/**
Test related dependencies
*/
externalJars(group: 'org.apache.activemq', name: 'activemq-client', version: "${activemqClientVersion}") {
transitive = false
}
externalJars(group: 'org.apache.geronimo.specs', name: 'geronimo-j2ee-management_1.1_spec', version: "${geronimoJ2eeMng11SpecVersion}") {
transitive = false
}
externalJars(group: 'org.fusesource.hawtbuf', name: 'hawtbuf', version: "${hawtbufVersion}") {
transitive = false
}
}

task updateTomlFiles {
Expand All @@ -98,9 +85,6 @@ task updateTomlFiles {
newConfig = newConfig.replace("@toml.version@", tomlVersion)
newConfig = newConfig.replace("@slf4j.version@", stdlibDependentSlf4jVersion)
newConfig = newConfig.replace("@javax.jms.version@", stdlibDependentJavaxJmsVersion)
newConfig = newConfig.replace('@activemq.client.version@', project.activemqClientVersion)
newConfig = newConfig.replace('@geronimoj2ee.spec.version@', project.geronimoJ2eeMng11SpecVersion)
newConfig = newConfig.replace('@hawtbuf.version@', project.hawtbufVersion)
ballerinaTomlFile.text = newConfig
}
}
Expand Down
1 change: 1 addition & 0 deletions ballerina/tests/test_commons.bal
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// under the License.

import ballerina/test;
import ballerinax/activemq.driver as _;

final Connection TEST_CONNECTION = check new (
initialContextFactory = "org.apache.activemq.jndi.ActiveMQInitialContextFactory",
Expand Down
17 changes: 4 additions & 13 deletions build-config/resources/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ keywords = ["jms"]
repository = "https://github.com/ballerina-platform/module-ballerina-java.jms"
icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.6.0"
distribution = "2201.7.0"

[platform.java11]
graalvmCompatible = true

[[platform.java11.dependency]]
groupId = "io.ballerina.stdlib"
Expand All @@ -26,15 +29,3 @@ groupId = "javax.jms"
artifactId = "javax.jms-api"
version = "@javax.jms.version@"
path = "./lib/javax.jms-api-@javax.jms.version@.jar"

[[platform.java11.dependency]]
path = "./lib/activemq-client-@activemq.client.version@.jar"
scope = "testOnly"

[[platform.java11.dependency]]
path = "./lib/geronimo-j2ee-management_1.1_spec-@geronimoj2ee.spec.version@.jar"
scope = "testOnly"

[[platform.java11.dependency]]
path = "./lib/hawtbuf-@hawtbuf.version@.jar"
scope = "testOnly"
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ subprojects {
ballerinaStdLibs "io.ballerina.stdlib:io-ballerina:${stdlibIoVersion}"
ballerinaStdLibs "io.ballerina.stdlib:observe-ballerina:${observeVersion}"
ballerinaStdLibs "io.ballerina:observe-ballerina:${observeInternalVersion}"
ballerinaStdLibs "io.ballerina.stdlib:activemq.driver-ballerina:${activeMQDriverVersion}"
}

task allDeps(type: DependencyReportTask) {}
Expand Down
10 changes: 4 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
org.gradle.caching=true
group=io.ballerina.stdlib
version=0.1.3-SNAPSHOT
ballerinaLangVersion=2201.6.0
version=0.2.0-SNAPSHOT
ballerinaLangVersion=2201.7.0

checkstylePluginVersion=8.18
spotbugsPluginVersion=4.5.1
shadowJarPluginVersion=5.2.0
downloadPluginVersion=4.0.4
releasePluginVersion=2.6.0
ballerinaGradlePluginVersion=1.0.0
ballerinaGradlePluginVersion=1.1.0

# JMS dependencies
javaxJmsVersion=2.0.1
slf4jVersion=2.0.7

# Test dependenices
activemqClientVersion=5.18.2
geronimoJ2eeMng11SpecVersion=1.0.1
hawtbufVersion=1.11
activeMQDriverVersion=0.2.0

#stdlib dependencies

Expand Down

0 comments on commit 3a8a207

Please sign in to comment.