diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9fa29c63e85feda5b6fe7d1aab25df186bf16691..d8ef3d37f073e531e994c76a0273bd6d3bf564ee 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -72,20 +72,4 @@ generic:
     - wget --no-check-certificate "https://res.de.dariah.eu/scripts/push-to-aptly.sh"
     - chmod +x push-to-aptly.sh
     - ./push-to-aptly.sh
-
-architrave:
-  stage: deploy
-  allow_failure: true
-  script:
-    - ls build/*
-    - if [ -d build/expkg-sade/ ]; then rm -r build/expkg-sade/; fi
-    - ant -f architrave.xml artifact-cleanup
-    - ant -f architrave.xml
-    - ant -f architrave.xml build-debian-package
-    - ls build/*.deb
-    - export DEB_FILE="$(ls build/*.deb)"
-    - export DEB_NAME="sade-${CI_JOB_NAME}-${CI_JOB_ID}"
-    - export APTLY_REPO="indy-snapshots"
-    - wget --no-check-certificate "https://res.de.dariah.eu/scripts/push-to-aptly.sh"
-    - chmod +x push-to-aptly.sh
-    - ./push-to-aptly.sh
+    
\ No newline at end of file
diff --git a/generic.build.properties b/generic.build.properties
index f5a3e190ae3c7ae845650ff21cab62c926967afc..bd9a587f5217b7f9156a917ba014b96877abb14e 100644
--- a/generic.build.properties
+++ b/generic.build.properties
@@ -15,6 +15,11 @@ exist.version=4.4.0
 exist.tag=eXist-${exist.version}
 exist.dest=${build.dir}/exist
 exist.dist=${exist.dest}/dist/eXist-db-${exist.version}
+exist.memory=2048
+
+# Jetty port configuration
+jetty.http.port=8080
+jetty.https.port=8443
 
 # SADE configuration
 sade.git=https\://gitlab.gwdg.de/SADE/SADE.git
diff --git a/generic.xml b/generic.xml
index b95b657763689f517c209550de46823fbc362cac..1cc359d966cbdaac178a288b6dfb5abc9529557e 100644
--- a/generic.xml
+++ b/generic.xml
@@ -16,7 +16,7 @@
         <format property="timestamp" pattern="yyyyMMddHHmmss" unit="hour"/>
     </tstamp>
 
-    <target name="build" depends="ant-dependencies, artifact-cleanup, sade, dashboard, junit-ant-patch, sade-assets, sade-search, undo-junit-ant-patch"/>
+    <target name="build" depends="ant-dependencies, artifact-cleanup, sade, dashboard, junit-ant-patch, sade-assets, sade-search, undo-junit-ant-patch, jetty-port, sade-memory"/>
 
     <target name="exist-git" depends="ant-dependencies">
         <git repo="${exist.git}" branch="tags/${exist.tag}" dest="${exist.dest}"/>
@@ -83,6 +83,52 @@
         </replace>
 
     </target>
+  
+    <target name="sade-memory" depends="exist-dist-conf">
+      <replace file="${build.dir}/sade/bin/functions.d/eXist-settings.sh" 
+        token="Xmx2048m" 
+        value="Xmx${exist.memory}m"/>
+      
+      <echo>Total memory available for SADE's eXist-db: ${exist.memory}.</echo>
+    </target>
+
+    <!-- Port configuration -->
+    <target name="jetty-port" depends="prepare-dist-dir">
+      <!-- HTTP port -->
+      <xslt 
+        in="${build.dir}/sade/tools/jetty/etc/jetty-http.xml" 
+        out="${build.dir}/sade/tools/jetty/etc/jetty-http-tmp.xml" 
+        style="jetty-port-update.xsl">   
+        <param name="customPort" expression="${jetty.http.port}"/>
+      </xslt>
+      <move 
+        file="${build.dir}/sade/tools/jetty/etc/jetty-http-tmp.xml" 
+        tofile="${build.dir}/sade/tools/jetty/etc/jetty-http.xml"/>
+      
+      <!-- HTTPS port -->
+      <xslt 
+        in="${build.dir}/sade/tools/jetty/etc/jetty-ssl.xml" 
+        out="${build.dir}/sade/tools/jetty/etc/jetty-ssl-tmp.xml" 
+        style="jetty-port-update.xsl">   
+        <param name="customPort" expression="${jetty.https.port}"/>
+      </xslt>
+      <move 
+        file="${build.dir}/sade/tools/jetty/etc/jetty-ssl-tmp.xml" 
+        tofile="${build.dir}/sade/tools/jetty/etc/jetty-ssl.xml"/>
+      
+      <xslt 
+        in="${build.dir}/sade/tools/jetty/etc/jetty.xml" 
+        out="${build.dir}/sade/tools/jetty/etc/jetty-tmp.xml" 
+        style="jetty-port-update.xsl">   
+        <param name="customPort" expression="${jetty.https.port}"/>
+      </xslt>
+      <move 
+        file="${build.dir}/sade/tools/jetty/etc/jetty-tmp.xml" 
+        tofile="${build.dir}/sade/tools/jetty/etc/jetty.xml"/>
+      
+      <echo>Jetty HTTP port is set to ${jetty.http.port}.</echo>
+      <echo>Jetty HTTPS port is set to ${jetty.https.port}.</echo>
+    </target>
 
     <target name="prepare-dist-dir" depends="exist-dist-conf">
         <delete dir="${build.dir}/sade"/>
@@ -102,11 +148,10 @@
         <patch reverse="true" patchfile="${resources.dir}/lucene-inline.patch"
             originalfile="${exist.dest}/extensions/indexes/lucene/src/org/exist/indexing/lucene/DefaultTextExtractor.java"
             ignorewhitespace="true" failonerror="false"/>
-
     </target>
 
     <!-- SADE -->
-    <target name="sade" depends="prepare-dist-dir, sade-assets">
+    <target name="sade" depends="prepare-dist-dir, sade-assets, sade-memory">
         <git repo="${sade.git}" branch="${sade.branch}" dest="${sade.dest}"/>
         <ant antfile="${sade.dest}/build.xml" inheritAll="false"/>
         <move2autodeploy source="${sade.dest}/build/"/>
diff --git a/jetty-port-update.xsl b/jetty-port-update.xsl
new file mode 100644
index 0000000000000000000000000000000000000000..76ca1f0ea7d06fb0be580b65b762a37b483767dc
--- /dev/null
+++ b/jetty-port-update.xsl
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">
+  <xsl:output method="xml" 
+    version="1.0" 
+    encoding="UTF-8" 
+    indent="no"
+    doctype-public="-//Jetty//Configure//EN"
+    doctype-system="http://www.eclipse.org/jetty/configure_9_3.dtd"/>
+  <xsl:param name="customPort"/>
+  
+  <xsl:template match="@*|node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+  
+<!--  <xsl:template match="SystemProperty[@name = 'jetty.port']">
+      <xsl:copy>
+        <xsl:apply-templates select="@*[not(. = 'default')]"/>
+        <xsl:attribute name="default"><xsl:value-of select="$customPort"/></xsl:attribute>
+      </xsl:copy>
+  </xsl:template>-->
+<!--  <xsl:template match="comment()"/>-->
+  
+  <xsl:template match="@default[parent::*[@name = 'jetty.port']]">
+    <xsl:attribute name="default"><xsl:value-of select="$customPort"/></xsl:attribute>
+  </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file