[
https://issues.apache.org/jira/browse/SOLR-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17719164#comment-17719164
]
Shawn Heisey commented on SOLR-7871:
------------------------------------
{quote}Or we can write a small java program that parses the config file and
runs solr directly, no complicated scripts.
{quote}
I've started some preliminary work on this. I have a greatly simplified shell
script that finds Java and starts a jar, and I've begun fleshing out a Java
program to do what bin/solr does now. I envision writing a powershell script
for Windows, rather than using cmd, but I admit that it may require expertise
that I don't have. I believe powershell is more capable and far more precise
than the batch language.
I started with commons-cli for the Java program, but was not able to come up
with a way to handle commands and subcommands. I asked chat-gpt to write me a
program using commons-cli that did this, but the resulting code did not compile
and I could not figure out how to fix it.
After poking around a bit (and asking chat-gpt for help again) I figured out
how to accomplish what I was aiming for with picocli. Now I just need to wade
through all the bin/solr code and recreate it in Java.
I've got the work on my gitlab server and can share the URL privately with
whoever would like to follow along and fix my mistakes.
> Platform independent config file instead of solr.in.sh and solr.in.cmd
> ----------------------------------------------------------------------
>
> Key: SOLR-7871
> URL: https://issues.apache.org/jira/browse/SOLR-7871
> Project: Solr
> Issue Type: Improvement
> Components: scripts and tools
> Affects Versions: 5.2.1
> Reporter: Jan Høydahl
> Priority: Major
> Labels: bin/solr
> Attachments: SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch,
> SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch,
> SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch,
> SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch, SOLR-7871.patch
>
>
> Spinoff from SOLR-7043
> The config files {{solr.in.sh}} and {{solr.in.cmd}} are currently executable
> batch files, but all they do is to set environment variables for the start
> scripts on the format {{key=value}}
> Suggest to instead have one central platform independent config file e.g.
> {{bin/solr.yml}} or {{bin/solrstart.properties}} which is parsed by
> {{SolrCLI.java}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]