summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkmar W. Pogatzki <gentoo@pogatzki.net>2023-11-26 12:39:43 +0100
committerMiroslav Šulc <fordfrog@gentoo.org>2023-11-27 09:41:49 +0100
commit5086b55e42c81dc9db9f5cc1cc7ffeeeeb1be742 (patch)
treeac3d9d29e09a299957f8b0e552d0d0a0c12368c4 /dev-java/json
parentdev-java/json-smart: add github upstream metadata (diff)
downloadgentoo-5086b55e42c81dc9db9f5cc1cc7ffeeeeb1be742.tar.gz
gentoo-5086b55e42c81dc9db9f5cc1cc7ffeeeeb1be742.tar.bz2
gentoo-5086b55e42c81dc9db9f5cc1cc7ffeeeeb1be742.zip
dev-java/json: unbundle json-smart
Using net.minidev:accessors-smart replaces minidev's asm-1.0.2.jar which allows switching mockito:0 -> mockito:4 and solves the test failure. Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Closes: https://github.com/gentoo/gentoo/pull/33999 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java/json')
-rw-r--r--dev-java/json/Manifest2
-rw-r--r--dev-java/json/files/json-20231013-JSONObjectTest.patch31
-rw-r--r--dev-java/json/json-20231013-r1.ebuild (renamed from dev-java/json/json-20231013.ebuild)14
3 files changed, 5 insertions, 42 deletions
diff --git a/dev-java/json/Manifest b/dev-java/json/Manifest
index ad2bfa90a8b3..549c5a166a89 100644
--- a/dev-java/json/Manifest
+++ b/dev-java/json/Manifest
@@ -1,5 +1,3 @@
-DIST asm-1.0.2.jar 71757 BLAKE2B f4aaaba90cbe5a0e22c236c7d368e1ee7513511d924d8c19a4218abcbc874832bfa219024c0758933b855cd4eba351458c500bbbe66123d54a4d384383dfcb4d SHA512 469ad53734d02b685506921e9318fc649da373eab5febfe23697f0ed948d04aa74e77792834f7cf2438a6b8bb91550cbb4d64c5037556dafa48118842fa7c881
DIST json-20220320.tar.gz 229462 BLAKE2B 9d549e4e905e2a63985b0b2d9a6cfbf7483776799d6b907455356940b48242fda9344874f1625da06215991eae1cfa1e87f3f8f0a204807795ed50f3f9afdbc2 SHA512 1bcd99c69201ea6609a41ec1679467504cd129a8c5a9caede0829cd8eb70b0e59e504a4bc409f57e6b27091e11acbf6108830c6f1fe16919d0cb1daff643bdf0
DIST json-20231013.tar.gz 240211 BLAKE2B c0594f89c2b02273c736c0fc362f1e3d519d3d88b7e708e64bbd5ca202f539368e9856e311dd9ad42a24c317cfd727feed5af215fbc5e9bbcb18e797323684c8 SHA512 4c5eb3e9ef77825c9e7b874c9084b5bb75b39c527c3cb419fc45171e0d11b24796931a2d16255500ed86610da3ac7805b302ec0b1051f97c97795580dca7c183
DIST json-path-2.1.0.jar 189658 BLAKE2B 2813abfc3b6c758f600bb5e8f8b73eac8dc2a642d461bc26c569a650378ea65cebf691afe975fa2dca406eb324863c36c4623b21c1df2cb83c92e6859b5a9d85 SHA512 c16fc68a04945ad49eb96c38f68a8b4ff351ab1bbc51685f42d22723b2dee4b827ba45cb6b8167199e3f4d22e668ef58665558beec8e11399ac547e9fcebd9f6
-DIST json-smart-2.5.0.jar 120233 BLAKE2B fb6f89b6df02789d24b650b9c55130363ee235af09f1446926135bf2f4de33757a3d4fd26f0e7f24e44532e21c5453022c781d8fec85e34ea4da92ce4ac992ae SHA512 56284bb3cee2bcc3684cdcc610115c7eacafdbd70aa852cb0209616b0503dfd448c5110b50e11a71b1c61a6e7ea27594ff63cc968230374555cc6f652d69d372
diff --git a/dev-java/json/files/json-20231013-JSONObjectTest.patch b/dev-java/json/files/json-20231013-JSONObjectTest.patch
deleted file mode 100644
index e077f19bd5a1..000000000000
--- a/dev-java/json/files/json-20231013-JSONObjectTest.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-There was 1 failure:
-1) jsonObjectByBean1(org.json.junit.JSONObjectTest)
-com.jayway.jsonpath.PathNotFoundException: No results for path: $['mockitoInterceptor']
- at com.jayway.jsonpath.internal.path.EvaluationContextImpl.getValue(EvaluationContextImpl.java:131)
- at com.jayway.jsonpath.JsonPath.read(JsonPath.java:187)
- at com.jayway.jsonpath.internal.JsonContext.read(JsonContext.java:164)
- at com.jayway.jsonpath.internal.JsonContext.read(JsonContext.java:151)
- at com.jayway.jsonpath.JsonPath.read(JsonPath.java:488)
- at org.json.junit.JSONObjectTest.jsonObjectByBean1(JSONObjectTest.java:634)
-
-FAILURES!!!
-Tests run: 668, Failures: 1
---- a/src/test/java/org/json/junit/JSONObjectTest.java
-+++ b/src/test/java/org/json/junit/JSONObjectTest.java
-@@ -56,6 +56,7 @@ import org.json.junit.data.Singleton;
- import org.json.junit.data.SingletonEnum;
- import org.json.junit.data.WeirdList;
- import org.junit.Test;
-+import org.junit.Ignore;
-
- import com.jayway.jsonpath.Configuration;
- import com.jayway.jsonpath.JsonPath;
-@@ -601,7 +602,7 @@ public class JSONObjectTest {
- * bean getters return valid JSON types
- */
- @SuppressWarnings("boxing")
-- @Test
-+ @Test @Ignore
- public void jsonObjectByBean1() {
- /**
- * Default access classes have to be mocked since JSONObject, which is
diff --git a/dev-java/json/json-20231013.ebuild b/dev-java/json/json-20231013-r1.ebuild
index 3a3262132a5c..a11eb3f69c95 100644
--- a/dev-java/json/json-20231013.ebuild
+++ b/dev-java/json/json-20231013-r1.ebuild
@@ -14,8 +14,6 @@ HOMEPAGE="https://github.com/stleary/JSON-java"
SRC_URI="https://codeload.github.com/stleary/JSON-java/tar.gz/${PV} -> ${P}.tar.gz
test? (
https://repo1.maven.org/maven2/com/jayway/jsonpath/json-path/2.1.0/json-path-2.1.0.jar
- https://repo1.maven.org/maven2/net/minidev/json-smart/2.5.0/json-smart-2.5.0.jar
- https://repo1.maven.org/maven2/net/minidev/asm/1.0.2/asm-1.0.2.jar
)"
S="${WORKDIR}/JSON-java-${PV}"
@@ -26,23 +24,25 @@ KEYWORDS="~amd64 ~x86"
DEPEND="
>=virtual/jdk-1.8:*
test? (
+ dev-java/asm:9
+ dev-java/json-smart:2
+ dev-java/mockito:4
dev-java/slf4j-api:0
- dev-java/mockito:0
)
"
RDEPEND=">=virtual/jre-1.8:*"
DOCS=( {CONTRIBUTING,README,SECURITY}.md )
-PATCHES=( "${FILESDIR}/json-20231013-JSONObjectTest.patch" )
JAVA_AUTOMATIC_MODULE_NAME="org.json"
JAVA_SRC_DIR="src/main/java"
JAVA_TEST_GENTOO_CLASSPATH="
asm-9
+ json-smart-2
junit-4
- mockito
+ mockito-4
slf4j-api
"
JAVA_TEST_RESOURCE_DIRS="src/test/resources"
@@ -55,10 +55,6 @@ src_prepare() {
src_test() {
JAVA_GENTOO_CLASSPATH_EXTRA="${DISTDIR}/json-path-2.1.0.jar" # Test compile dependency
- JAVA_GENTOO_CLASSPATH_EXTRA+=":${DISTDIR}/json-smart-2.5.0.jar" # Test runtime dependency
-
- # Exception java.lang.NoClassDefFoundError: net/minidev/asm/FieldFilter
- JAVA_GENTOO_CLASSPATH_EXTRA+=":${DISTDIR}/asm-1.0.2.jar" # Test runtime dependency
local vm_version="$(java-config -g PROVIDES_VERSION)"
if ver_test "${vm_version}" -ge 17; then