Provide initial structure for 3.18 and publish RAP 3.18 M1

Change-Id: I3f13263e1a11e0ac38facea76d94eb7ff416598c
Signed-off-by: Markus Knauer <mknauer@eclipsesource.com>
diff --git a/_builds/builds-3.18.xml b/_builds/builds-3.18.xml
new file mode 100644
index 0000000..88eee03
--- /dev/null
+++ b/_builds/builds-3.18.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<builds version="3.18" simultaneousRelease="2021-09">
+
+  <feature id="runtime">
+    <name>RAP (Runtime)</name>
+    <description>based on Eclipse 4.21 (2021-09)</description>
+    <site>https://download.eclipse.org/rt/rap/3.18</site>
+    <downloadPath>/rt/rap/3.18/</downloadPath>
+  </feature>
+
+  <feature id="runtime4">
+    <name>RAP E4 (Runtime)</name>
+    <description>based on Eclipse 4.21 (2021-09)</description>
+    <site>https://download.eclipse.org/rt/rap/3.18/e4</site>
+    <downloadPath>/rt/rap/3.18/e4/</downloadPath>
+  </feature>
+
+  <feature id="tools">
+    <name>RAP Tools</name>
+    <description>for use with Eclipse 4.21 (2021-09)</description>
+    <site>https://download.eclipse.org/rt/rap/tools/3.18</site>
+    <downloadPath>/rt/rap/tools/3.18/</downloadPath>
+  </feature>
+
+  <build name="3.18 M1" type="M"
+      shortname="M1"
+      status="completed"
+      publishDate="2021-07-16"
+      news="3.18/?build=M1"
+      runtimeZip="rap-3.18.0-M1-20210712-0740.zip"
+      runtime4Zip="rap-e4-3.18.0-M1-20210712-0740.zip"
+      toolsZip="rap-tools-3.18.0-M1-20210712-0740.zip"
+      />
+
+  <build name="3.18 M2" type="M"
+      shortname="M2"
+      status="planned"
+      publishDate="2021-08-06"
+      news="3.18/?build=M2"
+      runtimeZip=""
+      runtime4Zip=""
+      toolsZip=""
+      />
+
+  <build name="3.18 M3" type="M"
+      shortname="M3"
+      status="planned"
+      publishDate="2021-08-27"
+      news="3.18/?build=M3"
+      runtimeZip=""
+      runtime4Zip=""
+      toolsZip=""
+      />
+
+  <build name="3.18 RC1" type="RC"
+      shortname="RC1"
+      status="planned"
+      publishDate="2021-09-03"
+      news="3.18/?build=RC1"
+      runtimeZip=""
+      runtime4Zip=""
+      toolsZip=""
+      />
+
+  <build name="3.18 RC2" type="RC"
+      shortname="RC2"
+      status="planned"
+      publishDate="2021-09-10"
+      news="3.18/?build=RC2"
+      runtimeZip=""
+      runtime4Zip=""
+      toolsZip=""
+      />
+
+  <build name="3.18" type="R"
+      shortname="R"
+      status="planned"
+      publishDate="2021-09-15"
+      news="3.18/"
+      runtimeZip=""
+      runtime4Zip=""
+      toolsZip=""
+      />
+
+</builds>
diff --git a/_sidebar/arrivals.php b/_sidebar/arrivals.php
index 91f0994..0a19125 100644
--- a/_sidebar/arrivals.php
+++ b/_sidebar/arrivals.php
@@ -33,7 +33,18 @@
       </span>
       <span class="terminal-field">
         <span class="terminal-overlay"></span>
-        <span class="terminal-text">2021-07-16</span>
+        <span class="terminal-text terminal-arrived">ARRIVED</span>
+      </span>
+    </div>
+
+    <div class="terminal-row">
+      <span class="terminal-field">
+        <span class="terminal-overlay"></span>
+        <span class="terminal-text">RAP 3.18 M2</span>
+      </span>
+      <span class="terminal-field">
+        <span class="terminal-overlay"></span>
+        <span class="terminal-text">2021-08-06</span>
       </span>
     </div>
 
diff --git a/_sidebar/releases.php b/_sidebar/releases.php
index ff39f54..831c0db 100644
--- a/_sidebar/releases.php
+++ b/_sidebar/releases.php
@@ -5,6 +5,9 @@
   <div class="sideitemcontent">
     <ul>
       <li>
+        <a href="/rap/downloads/3.18/">RAP 3.18&emsp;2021-09</a>
+      </li>
+      <li>
         <a href="/rap/downloads/3.17/">RAP 3.17&emsp;2021-06</a>
       </li>
       <li>
diff --git a/developers-guide/DevGuideUtils.php b/developers-guide/DevGuideUtils.php
index b889f96..37020cb 100644
--- a/developers-guide/DevGuideUtils.php
+++ b/developers-guide/DevGuideUtils.php
@@ -3,7 +3,7 @@
 class DevGuideUtils {
 
   const CURRENT_VERSION = '3.17';
-  const MASTER_VERSION = '3.17';
+  const MASTER_VERSION = '3.18';
 
   public static $versions = array(
     '2.0' => array(
@@ -131,6 +131,12 @@
       'apiUrl' => 'http://download.eclipse.org/rt/rap/doc/3.17/guide/reference/',
       'tocPath' => 'guide/toc.xml',
       'topicPath' => 'guide/articles/'
+    ),
+    '3.18' => array(
+      'rootUrl' => 'http://download.eclipse.org/rt/rap/doc/3.18/',
+      'apiUrl' => 'http://download.eclipse.org/rt/rap/doc/3.18/guide/reference/',
+      'tocPath' => 'guide/toc.xml',
+      'topicPath' => 'guide/articles/'
     )
   );
 
diff --git a/downloads/3.18/index.php b/downloads/3.18/index.php
new file mode 100644
index 0000000..1cb147b
--- /dev/null
+++ b/downloads/3.18/index.php
@@ -0,0 +1,137 @@
+<?php
+
+  include( $_SERVER['DOCUMENT_ROOT'] . "/rap/_projectCommon.php" );
+  require_once( $_SERVER['DOCUMENT_ROOT'] . "/rap/_Builds.php" );
+
+  $builds = new Builds( "3.18" );
+
+  $title = "RAP - " . $builds->getVersion() . " Downloads";
+  $navPosition = array( "download", "downloads" );
+  printHeader( $title, $navPosition );
+
+  function getBuildTypeHeader( $type ) {
+    if( $type === "Release" ) {
+      return $type;
+    }
+    return $type . "s";
+  }
+
+?>
+
+<div id="midcolumn">
+
+  <h1>RAP <?= $builds->getVersion() ?></h1>
+
+  <p>
+    Release Date: <?= formatDate( $builds->findBuild( "R" )->getPublishDate() ); ?>
+<? if( $builds->getSimultaneousRelease() ) { ?>
+      - together with Eclipse <?= $builds->getSimultaneousRelease(); ?>
+<? } ?>
+    <br/>
+    <a href="/rap/noteworthy/<?= $builds->findBuild( "R" )->getNews() ?>">New &amp; Noteworthy</a>
+  </p>
+
+  <h2>Features</h2>
+
+  <h3>RAP (Runtime)</h3>
+
+  <p>
+    <?= $builds->getDescription( "runtime" ) ?>
+  </p>
+
+  <p>
+    Software Site:
+    <img src="/rap/images/site.gif" alt="site" />
+    <?= $builds->getUpdateSite( "runtime" ) ?>
+  </p>
+
+  <h3>RAP E4 (Runtime)</h3>
+
+  <p>
+    <?= $builds->getDescription( "runtime4" ) ?>
+  </p>
+
+  <p>
+    Software Site:
+    <img src="/rap/images/site.gif" alt="site" />
+    <?= $builds->getUpdateSite( "runtime4" ) ?>
+  </p>
+
+  <h3>RAP Tools</h3>
+
+  <p>
+    <?= $builds->getDescription( "tools" ) ?>
+  </p>
+
+  <p>
+    Software Site:
+    <img src="/rap/images/site.gif" alt="site" />
+    <?= $builds->getUpdateSite( "tools" ) ?>
+  </p>
+
+  <h2>Builds</h2>
+
+  <table class="builds">
+
+<? $lastType = NULL; ?>
+<? foreach( $builds->getPreviousBuilds( '' ) as $build ) { ?>
+<?   if( $lastType != $build->getType() ) { ?>
+
+      <tr><td colspan="3"><h3><?= getBuildTypeHeader( $build->getType() ) ?></h3></td></tr>
+
+<?   } ?>
+<?   $lastType = $build->getType(); ?>
+
+    <tr>
+      <td class="build-header">
+        <strong><?= $build->getName() ?></strong>
+      </td>
+      <td>
+        <?= formatDate( $build->getPublishDate() ) ?>
+      </td>
+
+<?   if( $build->isCompleted() ) { ?>
+
+      <td>
+        <a href="/rap/noteworthy/<?= $build->getNews() ?>">New &amp; Noteworthy</a>
+      </td>
+      <td>
+        <a href="<?= $build->getZipFileUrl( "runtime" ) ?>">
+          <img src="/rap/images/zip.gif" alt="zip" /> RAP
+        </a>
+      </td>
+      <td>
+        <a href="<?= $build->getZipFileUrl( "runtime4" ) ?>">
+          <img src="/rap/images/zip.gif" alt="zip" /> RAP E4
+        </a>
+      </td>
+      <td>
+        <a href="<?= $build->getZipFileUrl( "tools" ) ?>">
+          <img src="/rap/images/zip.gif" alt="zip" /> RAP Tools
+        </a>
+      </td>
+
+<?   } else { ?>
+
+      <td colspan="3">
+        <em>planned</em>
+      </td>
+
+<? } ?>
+
+    </tr>
+
+<? } ?>
+
+  </table>
+
+</div>
+
+<div id="rightcolumn">
+  <?php includeSidebar( "rap-feed.php" ) ?>
+  <?php includeSidebar( "contributors.php" ) ?>
+</div>
+
+<?php
+  printFooter();
+?>
diff --git a/downloads/index.php b/downloads/index.php
index 6ece60a..8889c16 100644
--- a/downloads/index.php
+++ b/downloads/index.php
@@ -10,7 +10,7 @@
   // --- TO BE CHANGED WITH EVERY RELEASE ---
 
   $releaseBuilds = new Builds( "3.17" );
-  $stableBuilds = new Builds( "3.17" );
+  $stableBuilds = new Builds( "3.18" );
 
   // ---
 
diff --git a/noteworthy/3.18/_news-M1.html b/noteworthy/3.18/_news-M1.html
new file mode 100644
index 0000000..715d490
--- /dev/null
+++ b/noteworthy/3.18/_news-M1.html
@@ -0,0 +1,9 @@
+<div>
+    <h2>Upgrade to Eclipse Jetty 10.0.6 in RAP Equinox target and in RAP Tools</h2>
+
+    <p>
+        The 2021-09 Simultaneous Release updated to Eclipse Jetty 10.0.6, and RAP has
+        been upgraded to the same version level. Further upgrades during the development
+        cycle are to be expected in the next milestones.
+    </p>
+</div>
diff --git a/noteworthy/3.18/_news-M2.html b/noteworthy/3.18/_news-M2.html
new file mode 100644
index 0000000..d58db9e
--- /dev/null
+++ b/noteworthy/3.18/_news-M2.html
@@ -0,0 +1,2 @@
+<div>
+</div>
diff --git a/noteworthy/3.18/_news-M3.html b/noteworthy/3.18/_news-M3.html
new file mode 100644
index 0000000..d58db9e
--- /dev/null
+++ b/noteworthy/3.18/_news-M3.html
@@ -0,0 +1,2 @@
+<div>
+</div>
diff --git a/noteworthy/3.18/_news-R.html b/noteworthy/3.18/_news-R.html
new file mode 100644
index 0000000..d58db9e
--- /dev/null
+++ b/noteworthy/3.18/_news-R.html
@@ -0,0 +1,2 @@
+<div>
+</div>
diff --git a/noteworthy/3.18/_news-RC1.html b/noteworthy/3.18/_news-RC1.html
new file mode 100644
index 0000000..d58db9e
--- /dev/null
+++ b/noteworthy/3.18/_news-RC1.html
@@ -0,0 +1,2 @@
+<div>
+</div>
diff --git a/noteworthy/3.18/_news-RC2.html b/noteworthy/3.18/_news-RC2.html
new file mode 100644
index 0000000..d58db9e
--- /dev/null
+++ b/noteworthy/3.18/_news-RC2.html
@@ -0,0 +1,2 @@
+<div>
+</div>
diff --git a/noteworthy/3.18/index.php b/noteworthy/3.18/index.php
new file mode 100644
index 0000000..9160b01
--- /dev/null
+++ b/noteworthy/3.18/index.php
@@ -0,0 +1,75 @@
+<?php
+
+  include( $_SERVER['DOCUMENT_ROOT'] . "/rap/_projectCommon.php" );
+  require_once( $_SERVER['DOCUMENT_ROOT'] . "/rap/_Builds.php" );
+
+  $buildName = isset( $_GET[ 'build' ] ) ? $_GET[ 'build' ] : "R";
+
+  $builds = new Builds( "3.18" );
+
+  $build = $builds->findBuild( $buildName );
+  if( !$build ) {
+    header( "HTTP/1.1 404 Not Found" );
+    exit( "Unknown build id" );
+  }
+
+  $PAGE_TITLE = "RAP " . $build->getName() . " - New and Noteworthy";
+  $PAGE_NAV_POSITION = array( "documentation", "noteworthy" );
+
+  printHeader();
+
+?>
+
+<div id="midcolumn">
+
+  <h1><?= $PAGE_TITLE ?></h1>
+
+  <p>
+    Here's a list of the most noteworthy things in the RAP
+    <?= $build->getName() ?> <?= strtolower( $build->getType() ) ?>
+<? if( $build->isCompleted() ) { ?>
+      which is available for <a href="http://www.eclipse.org/rap/downloads/">download</a>
+      since <?php echo formatDate( $build->getPublishDate() ) ?>.
+<? } else { ?>
+      which will be available for <a href="http://www.eclipse.org/rap/downloads/">download</a>
+      on <?php echo formatDate( $build->getPublishDate() ) ?>.
+      In the meantime, all changes described here are available in the most recent
+      <a href="http://www.eclipse.org/rap/downloads/">nightly build</a>.
+<? } ?>
+  </p>
+
+<? include( "_news-${buildName}.html" ); ?>
+
+  <h2>Bugfixes</h2>
+
+  <p>
+    <a href="<?= createBuglistUrl( $build->getTargetMilestones() ) ?>">This list</a>
+    shows all bugs that have been fixed for this <?php echo strtolower( $build->getType() ); ?>.
+  </p>
+
+<? if( $buildName !== "R" && substr( $buildName, 0, 2 ) !== "SR" ) { ?>
+  <h2>Previous Builds</h2>
+
+  <p>
+    The above features are just the ones that are new since the last milestone build.
+    Summaries for earlier builds:
+  </p>
+  <ul>
+<? foreach( $builds->getPreviousBuilds( $build->getShortName() ) as $prevBuild ) { ?>
+    <li>
+      <a href="./?build=<?php echo $prevBuild->getShortName(); ?>">News for RAP <?php echo $prevBuild->getName(); ?></a>
+    </li>
+<? } ?>
+  </ul>
+<? } ?>
+
+</div>
+
+<div id="rightcolumn">
+  <? includeSidebar( "migrationguide.php" ) ?>
+  <? includeSidebar( "releases.php" ) ?>
+</div>
+
+<?
+  printFooter();
+?>
diff --git a/noteworthy/index.php b/noteworthy/index.php
index d028ce2..06ee09d 100644
--- a/noteworthy/index.php
+++ b/noteworthy/index.php
@@ -1,5 +1,5 @@
 <?php
 
-  header( "Location: /rap/noteworthy/3.16/" );
+  header( "Location: /rap/noteworthy/3.17/" );
 
 ?>