This is an automated email from the ASF dual-hosted git repository.
vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git
The following commit(s) were added to refs/heads/master by this push:
new d50c11e8ec chore: create separate BOM for dependencies used in tests
d50c11e8ec is described below
commit d50c11e8ec1bb2202f6660fe3a4ab1359e30ea0f
Author: Vladimir Sitnikov <[email protected]>
AuthorDate: Fri Apr 28 19:59:34 2023 +0300
chore: create separate BOM for dependencies used in tests
Moving test versions for testing dependencies to a separate BOM
would make it slightly easier for the consumers to work with regular JMeter
dependencies.
In other words, JMeter should not require a specific JUnit 5 version,
so JUnit5 should not be a part of the regular dependencies.
---
.../src/main/kotlin/build-logic.java.gradle.kts | 3 ++
settings.gradle.kts | 1 +
src/bom-testing/build.gradle.kts | 51 ++++++++++++++++++++++
src/bom-thirdparty/build.gradle.kts | 13 +-----
src/testkit-wiremock/build.gradle.kts | 1 +
5 files changed, 57 insertions(+), 12 deletions(-)
diff --git a/build-logic/jvm/src/main/kotlin/build-logic.java.gradle.kts
b/build-logic/jvm/src/main/kotlin/build-logic.java.gradle.kts
index b202a26b95..807ef91b07 100644
--- a/build-logic/jvm/src/main/kotlin/build-logic.java.gradle.kts
+++ b/build-logic/jvm/src/main/kotlin/build-logic.java.gradle.kts
@@ -45,6 +45,9 @@ dependencies {
findProject(":src:bom")?.let {
api(platform(it))
}
+ findProject(":src:bom-testing")?.let{
+ testImplementation(platform(it))
+ }
findProject(":src:bom-thirdparty")?.let{
api(platform(it))
}
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 396df66592..fd1b385e72 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -46,6 +46,7 @@ includeBuild("build-logic")
include(
"src:bom",
+ "src:bom-testing",
"src:bom-thirdparty",
"src:bshclient",
"src:launcher",
diff --git a/src/bom-testing/build.gradle.kts b/src/bom-testing/build.gradle.kts
new file mode 100644
index 0000000000..7ed0f62283
--- /dev/null
+++ b/src/bom-testing/build.gradle.kts
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you 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("build-logic.java-published-platform")
+}
+
+description = "A collection of versions of third-party libraries used for
testing purposes by Apache JMeter"
+
+javaPlatform {
+ allowDependencies()
+}
+
+dependencies {
+ api(platform("org.junit:junit-bom:5.9.3"))
+
+ constraints {
+ // api means "the dependency is for both compilation and runtime"
+ // runtime means "the dependency is only for runtime, not for
compilation"
+ // In other words, marking dependency as "runtime" would avoid
accidental
+ // dependency on it during compilation
+ // Note: if there's at least single chance for the dependency to be
needed on the
+ // compilation classpath (e.g. it is used as a transitive by a
third-party library)
+ // then it should be declared as "api" here since we use
useCompileClasspathVersions
+ // to make runtime classpath consistent with the compile one.
+ api("com.github.tomakehurst:wiremock-jre8:2.32.0")
+
+ api("junit:junit:4.13.2")
+
+ api("nl.jqno.equalsverifier:equalsverifier:3.14.1")
+ api("org.hamcrest:hamcrest:2.2")
+ api("org.hamcrest:hamcrest-core:2.2")
+ api("org.hamcrest:hamcrest-library:2.2")
+ api("org.objenesis:objenesis:3.3")
+ api("org.spockframework:spock-core:2.2-groovy-3.0")
+ }
+}
diff --git a/src/bom-thirdparty/build.gradle.kts
b/src/bom-thirdparty/build.gradle.kts
index eb3f7cdadf..029de3c27a 100644
--- a/src/bom-thirdparty/build.gradle.kts
+++ b/src/bom-thirdparty/build.gradle.kts
@@ -38,7 +38,6 @@ dependencies {
// compilation classpath (e.g. it is used as a transitive by a
third-party library)
// then it should be declared as "api" here since we use
useCompileClasspathVersions
// to make runtime classpath consistent with the compile one.
- api("org.apache.tika:tika-parsers:1.28.5")
api("org.ow2.asm:asm:9.5")
// activemq-all should not be used as it provides secondary slf4j
binding
@@ -56,7 +55,6 @@ dependencies {
api("com.fifesoft:rsyntaxtextarea:3.2.0")
api("com.formdev:svgSalamander:1.1.2.4")
api("com.github.ben-manes.caffeine:caffeine:2.9.3")
- api("com.github.tomakehurst:wiremock-jre8:2.32.0")
api("com.github.weisj:darklaf-core:2.7.3")
api("com.github.weisj:darklaf-theme:2.7.3")
api("com.github.weisj:darklaf-property-loader:2.7.3")
@@ -84,14 +82,10 @@ dependencies {
api("org.jetbrains:annotations:23.0.0")
api("org.jetbrains.lets-plot:lets-plot-batik:3.1.0")
api("org.jetbrains.lets-plot:lets-plot-kotlin-jvm:4.3.0")
- api("org.junit.jupiter:junit-jupiter:5.9.3")
- api("org.junit.jupiter:junit-jupiter-api:5.9.3")
- api("org.junit.jupiter:junit-jupiter-params:5.9.3")
api("net.minidev:accessors-smart:2.4.8")
api("net.minidev:json-smart:2.4.8")
api("net.sf.jtidy:jtidy:r938")
api("net.sf.saxon:Saxon-HE:11.3")
- api("nl.jqno.equalsverifier:equalsverifier:3.14.1")
api("org.apache-extras.beanshell:bsh:2.0b6")
api("org.apache.commons:commons-collections4:4.4")
api("org.apache.commons:commons-dbcp2:2.9.0")
@@ -116,6 +110,7 @@ dependencies {
api("org.apache.mina:mina-core:2.1.6")
api("org.apache.rat:apache-rat:0.15")
api("org.apache.tika:tika-core:1.28.5")
+ api("org.apache.tika:tika-parsers:1.28.5")
api("org.apache.velocity:velocity:1.7")
api("org.apache.xmlgraphics:xmlgraphics-commons:2.7")
api("org.apiguardian:apiguardian-api:1.1.2")
@@ -125,9 +120,6 @@ dependencies {
api("org.brotli:dec:0.1.2")
api("org.exparity:hamcrest-date:2.0.8")
api("org.freemarker:freemarker:2.3.32")
- api("org.hamcrest:hamcrest:2.2")
- api("org.hamcrest:hamcrest-core:2.2")
- api("org.hamcrest:hamcrest-library:2.2")
api("org.hsqldb:hsqldb:2.5.2")
api("org.jdom:jdom:1.1.3")
api("org.jodd:jodd-core:5.0.13")
@@ -138,16 +130,13 @@ dependencies {
api("org.mongodb:mongo-java-driver:2.11.3")
api("org.mozilla:rhino:1.7.14")
api("org.neo4j.driver:neo4j-java-driver:4.4.6")
- api("org.objenesis:objenesis:3.3")
api("org.slf4j:jcl-over-slf4j:1.7.36")
api("org.slf4j:slf4j-api:1.7.36")
- api("org.spockframework:spock-core:2.2-groovy-3.0")
api("oro:oro:2.0.8")
api("xalan:serializer:2.7.2")
api("xalan:xalan:2.7.2")
api("xerces:xercesImpl:2.12.2")
api("xml-apis:xml-apis:1.4.01")
api("xmlpull:xmlpull:1.1.3.1")
- api("xpp3:xpp3_min:1.1.4c")
}
}
diff --git a/src/testkit-wiremock/build.gradle.kts
b/src/testkit-wiremock/build.gradle.kts
index 9f877c6988..0aa354d375 100644
--- a/src/testkit-wiremock/build.gradle.kts
+++ b/src/testkit-wiremock/build.gradle.kts
@@ -21,6 +21,7 @@ plugins {
}
dependencies {
+ api(platform(projects.src.bomTesting))
api("com.github.tomakehurst:wiremock-jre8")
api("org.junit.jupiter:junit-jupiter-api")
}