Skip to content

Commit

Permalink
Jetty / Update version and fix sending mail
Browse files Browse the repository at this point in the history
on Java 11. See jetty/jetty.docker#10.
  • Loading branch information
fxprunayre committed Sep 18, 2023
1 parent 0a95b58 commit a53fc64
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,7 @@
request the list of hosts (but JPA cache db queries). -->
<cors.allowedHosts>*</cors.allowedHosts>

<jetty.version>9.4.51.v20230217</jetty.version>
<jetty.version>9.4.52.v20230823</jetty.version>
<jetty.file>jetty-distribution-${jetty.version}</jetty.file>
<jetty.download>https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/${jetty.version}/${jetty.file}.tar.gz</jetty.download>

Expand Down
4 changes: 1 addition & 3 deletions release/bin/startup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ del logs\*request.log*
del logs\output.log
move logs\geonetwork.log.* logs\archive

java -Dmime-mappings=..\web\geonetwork\WEB-INF\mime-types.properties -DSTOP.PORT=8079 -Djava.awt.headless=true -DSTOP.KEY=geonetwork -jar start.jar
java -Xms512m -Xmx1g -Djetty.httpConfig.requestHeaderSize=32768 -Dorg.eclipse.jetty.server.Request.maxFormContentSize=500000 -Dorg.eclipse.jetty.server.Request.maxFormKeys=4000 -Dmime-mappings=..\web\geonetwork\WEB-INF\mime-types.properties -DSTOP.PORT=8079 -Djava.awt.headless=true -DSTOP.KEY=geonetwork -jar start.jar

rem Try changing the Xmx parameter if having memory errors
rem java -Xms1g -Xmx1g -Xss2M -Dmime-mappings=..\web\geonetwork\WEB-INF\mime-types.properties -DSTOP.PORT=8079 -Djava.awt.headless=true -DSTOP.KEY=geonetwork -jar start.jar

rem If you want to hide the dos window when GeoNetwork is started, comment the previous line and comment out the last line
rem start javaw -Dmime-mappings=..\web\geonetwork\WEB-INF\mime-types.properties -DSTOP.PORT=8079 -Djava.awt.headless=true -DSTOP.KEY=geonetwork -jar start.jar
4 changes: 1 addition & 3 deletions release/bin/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ find logs -maxdepth 1 -name 'geonetwork.log.*' -type f -exec mv -t logs/archive/
#export geonetwork_dir=/app/geonetwork_data_dir

export JAVA_MEM_OPTS="-Xms512m -Xmx1g"
# try changing the Xmx parameter if your machine has little RAM
#export JAVA_MEM_OPTS="-Xms48m -Xmx512m"

export JAVA_OPTS="$JAVA_MEM_OPTS -Xss2M -Djeeves.filecharsetdetectandconvert=enabled -Dmime-mappings=../web/geonetwork/WEB-INF/mime-types.properties -DSTOP.PORT=8079 -Djava.awt.headless=true -DSTOP.KEY=geonetwork"
export JAVA_OPTS="$JAVA_MEM_OPTS -Djetty.httpConfig.requestHeaderSize=32768 -Dorg.eclipse.jetty.server.Request.maxFormContentSize=500000 -Dorg.eclipse.jetty.server.Request.maxFormKeys=4000 -Xss2M -Djeeves.filecharsetdetectandconvert=enabled -Dmime-mappings=../web/geonetwork/WEB-INF/mime-types.properties -DSTOP.PORT=8079 -Djava.awt.headless=true -DSTOP.KEY=geonetwork"

# Set custom data directory location using Java property
# export JAVA_OPTS="$JAVA_OPTS -Dgeonetwork.dir=/app/geonetwork_data_dir"
Expand Down
5 changes: 3 additions & 2 deletions release/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@
<zipfileset dir="./bin" excludes="**.sh" prefix="bin" />
<zipfileset dir="./bin" includes="**.sh" prefix="bin" filemode="774"/>
<zipfileset dir="${propsdir}" includes="readme.html, license.html" />
<zipfileset dir="./jetty" prefix="jetty" excludes="logs/*.log, logs/archive/*.log" />
<zipfileset src="../web/target/geonetwork.war" prefix="web/geonetwork" />
<zipfileset dir="./jetty" prefix="jetty" excludes="lib/mail/**, logs/*.log, logs/archive/*.log" />
<zipfileset src="../web/target/geonetwork.war" prefix="apps/geonetwork" />
<zipfileset dir="." includes="geonetwork.xml" prefix="web" />
</zip>

<checksum
Expand Down
17 changes: 17 additions & 0 deletions release/geonetwork.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">

<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">/geonetwork</Set>
<Set name="war">../apps/geonetwork</Set>
<Get name="systemClasspathPattern">
<Call name="add"><Arg>-javax.mail.</Arg></Call>
</Get>
<Get name="serverClasspathPattern">
<Call name="add"><Arg>javax.mail.</Arg></Call>
</Get>
<Call name="setAttribute">
<Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg>
<Arg>nomatches</Arg>
</Call>
</Configure>

0 comments on commit a53fc64

Please sign in to comment.