summaryrefslogtreecommitdiff
path: root/test/jetty-solr-dependency-guard.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/jetty-solr-dependency-guard.sh')
-rwxr-xr-xtest/jetty-solr-dependency-guard.sh74
1 files changed, 50 insertions, 24 deletions
diff --git a/test/jetty-solr-dependency-guard.sh b/test/jetty-solr-dependency-guard.sh
index 9347c4fd7..daa1cbabe 100755
--- a/test/jetty-solr-dependency-guard.sh
+++ b/test/jetty-solr-dependency-guard.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env sh
-# Guard the production Jetty 12 classpath while Solr 9's Jetty 9 client remains
+# Guard the production Jetty 12 classpath while Solr 9's Jetty 10 client remains
# relocated into a private package and out of YaCy source code.
set -eu
@@ -42,6 +42,19 @@ grep -E 'name="jetty-client".*conf="solr9-bridge->master"' ivy.xml >/dev/null 2>
fail "jetty-client must only be a direct input of the Solr 9 bridge"
server_jetty_version=12.0.37
+bridge_jetty_version=10.0.26
+solr_version=9.10.1
+lucene_version=9.12.3
+
+for artifact in core api scripting solrj solrj-streaming solrj-zookeeper; do
+ grep -E "org=\"org.apache.solr\" name=\"solr-$artifact\" rev=\"$solr_version\" conf=\"solr9-bridge->master\"" ivy.xml >/dev/null 2>&1 || \
+ fail "solr-$artifact $solr_version must be an explicit Solr bridge input"
+done
+
+for artifact in analysis-common backward-codecs classification codecs expressions grouping highlighter join memory misc queries queryparser spatial-extras suggest; do
+ grep -E "org=\"org.apache.lucene\" name=\"lucene-$artifact\" rev=\"$lucene_version\"" ivy.xml >/dev/null 2>&1 || \
+ fail "lucene-$artifact must be on version $lucene_version"
+done
for artifact in jetty-http jetty-io jetty-proxy jetty-security jetty-server jetty-util; do
grep -E "org=\"org.eclipse.jetty\" name=\"$artifact\" rev=\"$server_jetty_version\" conf=\"compile->default\"" ivy.xml >/dev/null 2>&1 || \
@@ -57,13 +70,13 @@ if grep -E 'org="org.eclipse.jetty.compression"|name="jetty-compression-' ivy.xm
fi
if grep -E 'conf="jetty12-migration|rev="9\.4\.58\.v20250814" conf="compile' ivy.xml >/dev/null 2>&1; then
- fail "ivy.xml still contains an isolated migration configuration or public Jetty 9 dependency"
+ fail "ivy.xml still contains an isolated migration configuration or obsolete public Jetty dependency"
fi
if grep -R -n -E --include='*.java' \
'(Jetty9HttpServerImpl|AbstractRemoteHandler|YaCyLoginService|YaCySecurityHandler|YaCyDigestCredential|YacyDomainHandler|InetPathAccessHandler)' \
source >/dev/null 2>&1; then
- fail "obsolete Jetty 9 adapter references remain in production source"
+ fail "obsolete pre-Jetty-12 adapter references remain in production source"
fi
for artifact in http2-client http2-common http2-http-client-transport; do
@@ -71,10 +84,9 @@ for artifact in http2-client http2-common http2-http-client-transport; do
fail "$artifact must only be an input of the Solr 9 bridge"
done
-for artifact in slf4j-api slf4j-jdk14; do
- grep -E "name=\"$artifact\" rev=\"1.7.36\" conf=\"solr9-bridge->master\"" ivy.xml >/dev/null 2>&1 || \
- fail "$artifact 1.7.36 must only be an input of the Solr 9 bridge"
-done
+if grep -E 'name="slf4j-(api|jdk14)" rev="1\.7\.36"' ivy.xml >/dev/null 2>&1; then
+ fail "Solr 9.10 must use YaCy's shared SLF4J 2 runtime"
+fi
grep -E 'org="org.eclipse.jetty.toolchain" name="jetty-servlet-api" rev="4.0.9"' ivy.xml >/dev/null 2>&1 || \
fail "Jetty's EE8 Servlet 4 API must be an explicit dependency"
@@ -100,6 +112,18 @@ if [ -d lib ]; then
[ "$public_jetty_count" -gt 0 ] || \
fail "no production Jetty $server_jetty_version artifacts found"
+ public_lucene_count=0
+ for artifact in lib/lucene-*.jar; do
+ [ -e "$artifact" ] || continue
+ public_lucene_count=$((public_lucene_count + 1))
+ case $(basename "$artifact") in
+ *-"$lucene_version".jar) ;;
+ *) fail "Lucene artifact is not on version $lucene_version: $artifact" ;;
+ esac
+ done
+ [ "$public_lucene_count" -gt 0 ] || \
+ fail "no Lucene $lucene_version artifacts found"
+
servlet_api_count=0
for artifact in lib/*servlet-api-*.jar; do
[ -e "$artifact" ] || continue
@@ -121,6 +145,7 @@ if [ -d lib ]; then
'jetty-ee9-*.jar' \
'jetty-ee10-*.jar' \
'jetty-ee11-*.jar' \
+ 'solr-api-*.jar' \
'solr-core-*.jar' \
'solr-solrj-*.jar' \
'solr-scripting-*.jar' \
@@ -133,20 +158,24 @@ if [ -d lib ]; then
done
for artifact in \
- solr-core-9.0.0 \
- solr-solrj-9.0.0 \
- solr-scripting-9.0.0 \
- jetty-client-9.4.58.v20250814 \
- jetty-http-9.4.58.v20250814 \
- jetty-io-9.4.58.v20250814 \
- jetty-util-9.4.58.v20250814 \
- http2-client-9.4.58.v20250814 \
- http2-common-9.4.58.v20250814 \
- http2-http-client-transport-9.4.58.v20250814 \
- slf4j-api-1.7.36 \
- slf4j-jdk14-1.7.36; do
+ solr-api-$solr_version \
+ solr-core-$solr_version \
+ solr-scripting-$solr_version \
+ solr-solrj-$solr_version \
+ solr-solrj-streaming-$solr_version \
+ solr-solrj-zookeeper-$solr_version \
+ jetty-alpn-java-client-$bridge_jetty_version \
+ jetty-client-$bridge_jetty_version \
+ jetty-http-$bridge_jetty_version \
+ jetty-io-$bridge_jetty_version \
+ jetty-util-$bridge_jetty_version \
+ http2-client-$bridge_jetty_version \
+ http2-common-$bridge_jetty_version \
+ http2-http-client-transport-$bridge_jetty_version; do
jar="lib/solr9-bridge-$artifact.jar"
[ -f "$jar" ] || fail "missing generated bridge artifact: $jar"
+ grep -F "<classpathentry kind=\"lib\" path=\"$jar\"/>" .classpath >/dev/null 2>&1 || \
+ fail "Eclipse classpath is missing generated bridge artifact: $jar"
if jar tf "$jar" | grep '^org/eclipse/jetty/' >/dev/null 2>&1; then
fail "unrelocated Jetty class in $jar"
fi
@@ -154,12 +183,9 @@ if [ -d lib ]; then
fail "unrelocated Jetty reference in $jar"
fi
if jar tf "$jar" | grep '^org/slf4j/' >/dev/null 2>&1; then
- fail "unrelocated SLF4J class in $jar"
- fi
- if zipgrep -a -E 'org(/|\.)slf4j' "$jar" >/dev/null 2>&1; then
- fail "unrelocated SLF4J reference in $jar"
+ fail "bridge artifact must not bundle SLF4J classes: $jar"
fi
done
fi
-echo "PASS: production Jetty 12 and the relocated Solr 9 Jetty 9 dependencies are separated."
+echo "PASS: production Jetty 12 and the relocated Solr 9 Jetty 10 dependencies are separated."