This is an automated email from the ASF dual-hosted git repository.
houston pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 8a3e4c87a3b SOLR-17790: Allow -j option to start with a dash (#3392)
8a3e4c87a3b is described below
commit 8a3e4c87a3b167fe276efaac2621d5ce5646122e
Author: Houston Putman <[email protected]>
AuthorDate: Mon Jun 16 17:21:09 2025 -0500
SOLR-17790: Allow -j option to start with a dash (#3392)
---
solr/CHANGES.txt | 2 ++
solr/bin/solr | 2 +-
solr/packaging/test/test_start_solr.bats | 8 ++++++++
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index a4bd16c5311..9457ebce1da 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -311,6 +311,8 @@ Bug Fixes
* SOLR-17769: Use S3 RetryStrategy instead of RetryPolicy. This fixes the
error caused by using the "Adaptive" retry mode. (Houston Putman)
+* SOLR-17790: Allow the -j or --jettyconfig option to start with a dash (-).
(Houston Putman)
+
Dependency Upgrades
---------------------
* SOLR-17471: Upgrade Lucene to 9.12.1. (Pierre Salagnac, Christine Poerschke)
diff --git a/solr/bin/solr b/solr/bin/solr
index 846ff39ce32..be0389a5eef 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -792,7 +792,7 @@ if [ $# -gt 0 ]; then
shift 2
;;
-j|--jettyconfig)
- if [[ -z "$2" || "${2:0:1}" == "-" ]]; then
+ if [[ -z "$2" ]]; then
print_usage "$SCRIPT_CMD" "Jetty config is required when using
the $1 option!"
exit 1
fi
diff --git a/solr/packaging/test/test_start_solr.bats
b/solr/packaging/test/test_start_solr.bats
index a4b80efe01d..8a8416f6ab2 100644
--- a/solr/packaging/test/test_start_solr.bats
+++ b/solr/packaging/test/test_start_solr.bats
@@ -80,3 +80,11 @@ teardown() {
run cat ${SOLR_LOGS_DIR}/solr-${SOLR_PORT}-console.log
refute_output --partial 'Exception'
}
+
+@test "start with custom jetty options" {
+ export ENABLE_REMOTE_JMX_OPTS=true
+ export RMI_PORT=65535 # need to make sure we don't exceed port range so hard
code it
+
+ solr start -j "--module=server"
+ solr assert --started http://localhost:${SOLR_PORT} --timeout 5000
+}