Skip to content

Commit

Permalink
apacheGH-2902: Use jena-fuseki-server for fuseki-server.jar
Browse files Browse the repository at this point in the history
  • Loading branch information
afs committed Jan 2, 2025
1 parent 8a262bf commit 6049c49
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 47 deletions.
38 changes: 11 additions & 27 deletions jena-fuseki2/apache-jena-fuseki/assembly-dist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
-->

<!--
The distribution.
Assumes jar made and onejar has been assembled.
The distribution for Apache Jena Fuseki.
-->

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
Expand All @@ -39,20 +38,10 @@
<dependencySet>
<useProjectArtifact>false</useProjectArtifact>
<includes>
<include>org.apache.jena:jena-fuseki-fulljar:jar</include>
<include>org.apache.jena:jena-fuseki-server:jar</include>
</includes>
<outputFileNameMapping>fuseki-server.jar</outputFileNameMapping>

</dependencySet>
<!-- WAR file
<dependencySet>
<useProjectArtifact>false</useProjectArtifact>
<includes>
<include>org.apache.jena:jena-fuseki-war:war</include>
</includes>
<outputFileNameMapping>fuseki.war</outputFileNameMapping>
</dependencySet>
-->
</dependencySets>

<files>
Expand Down Expand Up @@ -91,20 +80,15 @@
</fileSet>

<fileSet>
<!-- Executables -->
<outputDirectory></outputDirectory>
<fileMode>0755</fileMode>
<includes>
<include>fuseki-server</include>
<include>fuseki-backup</include>
<include>bin/*</include>
</includes>
</fileSet>

<fileSet>
<directory>../jena-fuseki-webapp/target/webapp/</directory>
<outputDirectory>webapp</outputDirectory>
<!-- Executables -->
<outputDirectory></outputDirectory>
<fileMode>0755</fileMode>
<includes>
<include>fuseki-server</include>
<include>fuseki-backup</include>
<include>bin/*</include>
</includes>
</fileSet>

</fileSets>
</assembly>
8 changes: 5 additions & 3 deletions jena-fuseki2/apache-jena-fuseki/fuseki
Original file line number Diff line number Diff line change
Expand Up @@ -296,17 +296,19 @@ then
fi

# Run command
## Plain server, no UI, no admin work area.
## MAIN=org.apache.jena.fuseki.main.cmds.FusekiMainCmd
MAIN=org.apache.jena.fuseki.main.cmds.FusekiServerCmd

if [ -z "$FUSEKI_CLASSES" ]
then
RUN_ARGS=(${JAVA_OPTIONS[@]} -jar "$FUSEKI_START" "${FUSEKI_ADDITIONAL_ARGS[@]}" $FUSEKI_ARGS)
RUN_ARGS=(${JAVA_OPTIONS[@]} -cp "$FUSEKI_START" "$MAIN" "${FUSEKI_ADDITIONAL_ARGS[@]}" $FUSEKI_ARGS)
else
RUN_ARGS=(${JAVA_OPTIONS[@]} -cp "$FUSEKI_START:$FUSEKI_CLASSES" org.apache.jena.fuseki.cmd.FusekiCmd "${FUSEKI_ADDITIONAL_ARGS[@]}" $FUSEKI_ARGS)
RUN_ARGS=(${JAVA_OPTIONS[@]} -cp "$FUSEKI_START:$FUSEKI_CLASSES" "$MAIN" "${FUSEKI_ADDITIONAL_ARGS[@]}" $FUSEKI_ARGS)
fi
RUN_CMD=("$JAVA" "${RUN_ARGS[@]}")

# Export the variables to be seen by the java server process.
export FUSEKI_HOME
export FUSEKI_BASE

#####################################################
Expand Down
10 changes: 6 additions & 4 deletions jena-fuseki2/apache-jena-fuseki/fuseki-server
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,17 @@ then
LOGGING="-Dlog4j.configurationFile=$DFT_LOG_CONF"
fi

## Plain server, no UI, no admin work area.
## MAIN=org.apache.jena.fuseki.main.cmds.FusekiMainCmd
MAIN=org.apache.jena.fuseki.main.cmds.FusekiServerCmd

if [ -n "$LOGGING" ]
then
exec "$JAVA" $JVM_ARGS "$LOGGING" -cp "$CP" org.apache.jena.fuseki.cmd.FusekiCmd "$@"
exec "$JAVA" $JVM_ARGS "$LOGGING" -cp "$CP" "$MAIN" "$@"
else
exec "$JAVA" $JVM_ARGS -cp "$CP" org.apache.jena.fuseki.cmd.FusekiCmd "$@"
exec "$JAVA" $JVM_ARGS -cp "$CP" "$MAIN" "$@"
fi

exec "$JAVA" $JVM_ARGS $LOGGING -cp "$CP" org.apache.jena.fuseki.cmd.FusekiCmd "$@"

## Adding custom code to the Fuseki server:
##
## The recommended way to add custom jars to the Fuseki server is to create an
Expand Down
7 changes: 2 additions & 5 deletions jena-fuseki2/apache-jena-fuseki/fuseki-server.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@

@echo off
@REM modify this to name the server jar
java -Xmx1200M -jar fuseki-server.jar %*
java -Xmx1500M -cp fuseki-server.jar org.apache.jena.fuseki.main.cmds.FusekiServerCmd %*

@REM Adding custom code to the Fuseki server:
@REM
@REM It is also possible to launch Fuseki using
@REM java ..jvmarsg... -cp $JAR org.apache.jena.fuseki.cmd.FusekiCmd %*
@REM
@REM In this way, you can add custom java to the classpath:
@REM
@REM java ... -cp fuseki-server.jar;MyCustomCode.jar org.apache.jena.fuseki.cmd.FusekiCmd %*
@REM java ... -cp fuseki-server.jar;MyCustomCode.jar org.apache.jena.fuseki.main.cmds.FusekiServerCmd %*
9 changes: 1 addition & 8 deletions jena-fuseki2/apache-jena-fuseki/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,10 @@

<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-fuseki-fulljar</artifactId>
<artifactId>jena-fuseki-server</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-fuseki-war</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>

</dependencies>
<build>
<plugins>
Expand Down

0 comments on commit 6049c49

Please sign in to comment.