JBR21: Remove the Experimental AOT and JIT Compiler

Filter modules and don't remove them from xxx-modules.list to preserve
modules included in JBR17 build.

Change-Id: If4b899e55cbdd56dfbd5b54ca35455d2a57311b5
diff --git a/build-jbr_next-linux-x64.sh b/build-jbr_next-linux-x64.sh
index dc846ca..8d9517d 100755
--- a/build-jbr_next-linux-x64.sh
+++ b/build-jbr_next-linux-x64.sh
@@ -155,10 +155,14 @@
 
   # 1. add studio modules to jb/project/tools/common/modules.list
   # 2. remove trailing comas, and remove duplicates
-  # 3. trim, and convert lines to coma-separated list
+  # 3. JBR-3398 JDK-8263327 Remove the Experimental AOT and JIT Compiler
+  # 4. trim, and convert lines to coma-separated list
  declare modules=$(
    cat ${sources_dir}/jb/project/tools/common/modules.list ${top}/toolchain/jdk/build/studio-modules.list \
    | sed s/","/" "/g | sort | uniq \
+   | grep -v 'jdk.aot' \
+   | grep -v 'jdk.internal.vm.compiler' \
+   | grep -v 'jdk.internal.vm.compiler.management' \
    | xargs | sed s/" "/,/g
  )
 
diff --git a/build-jbr_next-mac-aarch64.sh b/build-jbr_next-mac-aarch64.sh
index 0d5b0d4..2734582 100755
--- a/build-jbr_next-mac-aarch64.sh
+++ b/build-jbr_next-mac-aarch64.sh
@@ -107,10 +107,14 @@
 
   # 1. add studio mudules to jb/project/tools/common/modules.list
   # 2. remove trailing comas, and remove duplicates
-  # 3. trim, and convert lines to coma-separated list
+  # 3. JBR-3398 JDK-8263327 Remove the Experimental AOT and JIT Compiler
+  # 4. trim, and convert lines to coma-separated list
  declare modules=$(
    cat ${sources_dir}/jb/project/tools/common/modules.list ${top}/toolchain/jdk/build/studio-modules.list \
    | sed s/","/" "/g | sort | uniq \
+   | grep -v 'jdk.aot' \
+   | grep -v 'jdk.internal.vm.compiler' \
+   | grep -v 'jdk.internal.vm.compiler.management' \
    | xargs | sed s/" "/,/g
  )
 
diff --git a/build-jbr_next-mac-x64.sh b/build-jbr_next-mac-x64.sh
index ff9b440..b43af45 100755
--- a/build-jbr_next-mac-x64.sh
+++ b/build-jbr_next-mac-x64.sh
@@ -109,10 +109,14 @@
 
   # 1. add studio modules to jb/project/tools/common/modules.list
   # 2. remove trailing comas, and remove duplicates
-  # 3. trim, and convert lines to coma-separated list
+  # 3. JBR-3398 JDK-8263327 Remove the Experimental AOT and JIT Compiler
+  # 4. trim, and convert lines to coma-separated list
  declare modules=$(
    cat ${sources_dir}/jb/project/tools/common/modules.list ${top}/toolchain/jdk/build/studio-modules.list \
    | sed s/","/" "/g | sort | uniq \
+   | grep -v 'jdk.aot' \
+   | grep -v 'jdk.internal.vm.compiler' \
+   | grep -v 'jdk.internal.vm.compiler.management' \
    | xargs | sed s/" "/,/g
  )
 
diff --git a/build-jbr_next-win-x64.sh b/build-jbr_next-win-x64.sh
index 63a4fb2..e4a034f 100644
--- a/build-jbr_next-win-x64.sh
+++ b/build-jbr_next-win-x64.sh
@@ -87,11 +87,14 @@
 
   # 1. add studio modules to jb/project/tools/common/modules.list
   # 2. remove trailing comas, and remove duplicates
-  # 3. trim, and convert lines to coma-separated list
+  # 3. JBR-3398 JDK-8263327 Remove the Experimental AOT and JIT Compiler
+  # 4. trim, and convert lines to coma-separated list
  declare modules=$(
    cat ${sources_dir}/jb/project/tools/common/modules.list ${top}/toolchain/jdk/build/studio-modules.list \
    | sed s/","/" "/g | sort | uniq \
+   | grep -v 'jdk.aot' \
    | grep -v 'jdk.internal.vm.compiler' \
+   | grep -v 'jdk.internal.vm.compiler.management' \
    | xargs | sed s/" "/,/g
  )