diff --git a/pom.xml b/pom.xml
index 19df7f687..9117561be 100644
--- a/pom.xml
+++ b/pom.xml
@@ -434,7 +434,7 @@
while if true it will use an executable. -->
true
512m
- 768m
+ 2G
true
-J-XX:MaxRAMPercentage=50.0
diff --git a/setup-and-cache-job-template.yml b/setup-and-cache-job-template.yml
index a5100e4ed..fbee1d83e 100644
--- a/setup-and-cache-job-template.yml
+++ b/setup-and-cache-job-template.yml
@@ -28,7 +28,7 @@ jobs:
options: '--settings $(Agent.TempDirectory)/settings.xml -Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -DskipTests -DdeployToSonatype -P CHECKSTYLE'
${{ else }}:
options: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER) -DskipTests -P CHECKSTYLE'
- mavenOptions: '-Xmx768m'
+ mavenOptions: '-Xmx2G'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
jdkArchitectureOption: 'x64'