Skip to content

Commit 8177281

Browse files
committed
GH-3673: Revise the scripts (apache-jena-fuseki)
1 parent c185245 commit 8177281

File tree

9 files changed

+512
-305
lines changed

9 files changed

+512
-305
lines changed

jena-fuseki2/apache-jena-fuseki/assembly-dist.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
<outputDirectory></outputDirectory>
6666
<includes>
6767
<include>log4j2.properties</include>
68-
<include>fuseki</include>
6968
<include>fuseki.service</include>
7069
<include>fuseki-server.bat</include>
7170
</includes>
@@ -77,9 +76,18 @@
7776
<fileMode>0755</fileMode>
7877
<includes>
7978
<include>fuseki-server</include>
79+
<include>fuseki-plain</include>
8080
<include>fuseki-backup</include>
8181
</includes>
8282
</fileSet>
83+
84+
<fileSet>
85+
<outputDirectory>service/</outputDirectory>
86+
<includes>
87+
<include>service/fuseki.service</include>
88+
<include>service/fuseki.initd</include>
89+
</includes>
90+
</fileSet>
8391

8492
</fileSets>
8593
</assembly>

jena-fuseki2/apache-jena-fuseki/dist/LICENSE

Lines changed: 447 additions & 268 deletions
Large diffs are not rendered by default.

jena-fuseki2/apache-jena-fuseki/dist/README

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,18 @@ Apache Jena Fuseki is a SPARQL server.
66
Full documentation:
77
http://jena.apache.org/documentation/fuseki2/
88

9-
This distribution contains Fuseki2 package as a self-contained jar, to run as an
10-
operating system process.
9+
This distribution contains Fuseki2 package as a self-contained jar.
10+
It can be run as an operating system process.
1111

12-
The script 'fuseki-server' is a script to run the server using
13-
'fuseki-server.jar from the command line. Use 'fuseki-server --help' for
14-
details.
12+
The script 'fuseki-server' is a script to run the server, with UI,
13+
using 'fuseki-server.jar' from the command line.
1514

16-
The script 'fuseki' is a Linux init script to run Fuseki as an OS service.
15+
The script 'fuskei-plain' runs the same 'fuseki-server.jar' without a UI.
16+
17+
The script 'service/fuseki.initd' is a Linux init script to run Fuseki as an OS service.
1718
The file 'fuseki.service' is a systemd unit file to run Fuseki2 as a service.
1819
Instructions are in comments at the start of the files.
1920

20-
A WAR file to run Fuseki in a webapp container server, such as Apache
21-
Tomcat, can be obtained from https://downloads.apache.org/jena/binaries/
22-
or https://repo1.maven.org/maven2/org/apache/jena/jena-fuseki-war/.
23-
2421
A Dockerfile which can be customized for choices of storage can be found at:
2522

2623
https://repo1.maven.org/maven2/org/apache/jena/jena-fuseki-docker/

jena-fuseki2/apache-jena-fuseki/fuseki-plain

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717

1818
## Run Fuseki as a standalone server with no UI
1919

20-
export MAIN=org.apache.jena.fuseki.main.cmds.FusekiMainCmd
21-
exec fuseki-server "$#"
20+
export MAIN="server-plain"
21+
exec fuseki-server "$@"

jena-fuseki2/apache-jena-fuseki/fuseki-server

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -114,24 +114,27 @@ then
114114
LOGGING="-Dlog4j.configurationFile=$DFT_LOG_CONF"
115115
fi
116116

117-
## MAIN="${MAIN:-org.apache.jena.fuseki.main.cmds.FusekiMainCmd}"
117+
## Fuseki server. Default: with UI and admin area.
118+
MAIN="${MAIN:-serverUI}"
118119

119-
## Fuseki server, with UI and admin area.
120-
MAIN="${MAIN:-server}"
121-
122-
## Translater names into Java entry points.
120+
## Translate names into Java entry points.
123121
case $MAIN in
124122
## Minimal server - no additional features.
125-
"basic") MAIN=org.apache.jena.fuseki.main.cmds.FusekiBasicCmd ;;
126-
127-
## Server, no UI, no admin work area, only Prometheus.
128-
"main") MAIN=org.apache.jena.fuseki.main.cmds.FusekiMainCmd ;;
129-
130-
## Plain server, with Fuseki modules, no UI, no admin work area, only Prometheus.
131-
"plain") MAIN=org.apache.jena.fuseki.main.cmds.FusekiServerPlainCmd ;;
132-
133-
## Full server, with Fuseki modules, no UI, no admin work area, only Prometheus.
134-
"server") MAIN=org.apache.jena.fuseki.main.cmds.FusekiServerCmd ;;
123+
"basic")
124+
MAIN='org.apache.jena.fuseki.main.cmds.FusekiBasicCmd'
125+
;;
126+
## Server, no UI, no admin work area, only Prometheus and Shiro
127+
"main")
128+
MAIN='org.apache.jena.fuseki.main.cmds.FusekiMainCmd'
129+
;;
130+
## Plain server, with Fuseki modules, no UI, no admin work area, with Prometheus and Shiro.
131+
"server-plain" | "plain")
132+
MAIN='org.apache.jena.fuseki.main.cmds.FusekiServerPlainCmd'
133+
;;
134+
## Full server, with Fuseki modules, with UI and with an admin work area.
135+
"serverui"| "server-ui" | "serverUI" )
136+
MAIN='org.apache.jena.fuseki.main.cmds.FusekiServerUICmd'
137+
;;
135138
esac
136139

137140
if [ -n "$LOGGING" ]

jena-fuseki2/apache-jena-fuseki/fuseki-server.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616

1717
@echo off
1818
@REM modify this to name the server jar
19-
java -Xmx4G -cp fuseki-server.jar org.apache.jena.fuseki.main.cmds.FusekiServerCmd %*
19+
java -Xmx4G -cp fuseki-server.jar org.apache.jena.fuseki.main.cmds.FusekiServerUICmd %*
2020

2121
@REM Adding custom code to the Fuseki server:
2222
@REM
2323
@REM In this way, you can add custom java to the classpath:
2424
@REM
25-
@REM java ... -cp fuseki-server.jar;MyCustomCode.jar org.apache.jena.fuseki.main.cmds.FusekiServerCmd %*
25+
@REM java ... -cp fuseki-server.jar;MyCustomCode.jar org.apache.jena.fuseki.main.cmds.FusekiServerUICmd %*

jena-fuseki2/apache-jena-fuseki/fuseki renamed to jena-fuseki2/apache-jena-fuseki/service/fuseki.initd

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
# Default-Start: 3 4 5
8686
# Default-Stop: 0 1 2 6
8787
# Short-Description: Start Jena Fuseki at boot time
88-
# Description: Jena Fuseki is a service that provides a SPARQL API over HTTP
88+
# Description: Apache Jena Fuseki is a service that provides the SPARQL API over HTTP
8989
### END INIT INFO
9090

9191
# DEBUG=1
@@ -254,7 +254,7 @@ if [ -z "$JAVA" ]
254254
then
255255
if [ -z "$JAVA_HOME" ]
256256
then
257-
JAVA=$(which java)
257+
JAVA=$(which java)
258258
else
259259
JAVA=$JAVA_HOME/bin/java
260260
fi
@@ -295,10 +295,30 @@ then
295295
fi
296296
fi
297297

298-
# Run command
299-
## Plain server, no UI, no admin work area.
300-
## MAIN=org.apache.jena.fuseki.main.cmds.FusekiMainCmd
301-
MAIN=org.apache.jena.fuseki.main.cmds.FusekiServerCmd
298+
# -- Run command
299+
## Default: Fuseki server, with UI and admin area.
300+
MAIN="${MAIN:-serverUI}"
301+
302+
## Translate names into Java entry points.
303+
case $MAIN in
304+
## Minimal server - no additional features.
305+
"basic")
306+
MAIN='org.apache.jena.fuseki.main.cmds.FusekiBasicCmd'
307+
;;
308+
## Server, no UI, no admin work area, only Prometheus and Shiro
309+
"main")
310+
MAIN='org.apache.jena.fuseki.main.cmds.FusekiMainCmd'
311+
;;
312+
## Plain server, with Fuseki modules, no UI, no admin work area, with Prometheus and Shiro.
313+
"server-plain" | "plain")
314+
MAIN='org.apache.jena.fuseki.main.cmds.FusekiServerPlainCmd'
315+
;;
316+
## Full server, with Fuseki modules, with UI and with an admin work area.
317+
"serverui"| "server-ui" | "serverUI" )
318+
MAIN='org.apache.jena.fuseki.main.cmds.FusekiServerUICmd'
319+
;;
320+
esac
321+
# -- Run command
302322

303323
if [ -z "$FUSEKI_CLASSES" ]
304324
then
File renamed without changes.

jena-fuseki2/jena-fuseki-server/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111

112112
<transformers>
113113
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
114-
<mainClass>org.apache.jena.fuseki.main.cmds.FusekiCmd</mainClass>
114+
<mainClass>org.apache.jena.fuseki.main.cmds.FusekiServerCmd</mainClass>
115115
<!-- https://issues.apache.org/jira/browse/LOG4J2-2537 -->
116116
<manifestEntries>
117117
<Multi-Release>true</Multi-Release>

0 commit comments

Comments
 (0)