You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2019/01/04 13:13:23 UTC

[isis] 01/11: ISIS-2067: removes WebServer

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch v2
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 8287d3b2ddcb02bd41bfe54e76f7a52eee97bded
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jan 4 10:05:11 2019 +0000

    ISIS-2067: removes WebServer
---
 .../guides/cgcom/_cgcom_cutting-a-release.adoc     |  10 -
 .../guides/dg/_dg_hints-and-tips_enhance-only.adoc |   2 +-
 .../main/asciidoc/guides/dg/_dg_ide_intellij.adoc  |  12 +-
 .../guides/rgcfg/_rgcfg_deployment-types.adoc      |   4 +
 .../_rgcms_classes_AppManifest-bootstrapping.adoc  |  18 +-
 .../rgsvc/_rgsvc_integration-api_EmailService.adoc |   4 +-
 ...gbtb_deployment_externalized-configuration.adoc |   6 -
 ...ugfun_getting-started_helloworld-archetype.adoc |   8 +-
 ..._ugfun_getting-started_simpleapp-archetype.adoc |   8 +-
 .../src/main/java/org/apache/isis/WebServer.java   |  28 ---
 .../org/apache/isis/core/webserver/WebServer.java  | 225 ---------------------
 .../isis/core/webserver/WebServerConstants.java    |  46 -----
 .../isis/core/webserver/WebServerException.java    |  30 ---
 .../webserver/config/WebServerConfigBuilder.java   | 111 ----------
 .../webserver/internal/OptionHandlerAddress.java   |  64 ------
 .../core/webserver/internal/OptionHandlerPort.java |  69 -------
 .../internal/OptionHandlerResourceBase.java        |  61 ------
 .../internal/OptionHandlerStartupMode.java         |  65 ------
 18 files changed, 21 insertions(+), 750 deletions(-)

diff --git a/adocs/documentation/src/main/asciidoc/guides/cgcom/_cgcom_cutting-a-release.adoc b/adocs/documentation/src/main/asciidoc/guides/cgcom/_cgcom_cutting-a-release.adoc
index 2cd88ec..2e5c63b 100644
--- a/adocs/documentation/src/main/asciidoc/guides/cgcom/_cgcom_cutting-a-release.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/cgcom/_cgcom_cutting-a-release.adoc
@@ -351,11 +351,6 @@ Double check that the app:
 mvn clean install
 ----
 
-* can be run from an IDE
-** mainClass=`org.apache.isis.WebServer`
-** args=`-m domainapp.application.manifest.DomainAppAppManifestWithFixtures`
-** run before: `mvn -pl module-simple datanucleus:enhance -o` in the root module
-
 * can be run using the mvn jetty plugin:
 +
 [source,bash,subs="attributes+"]
@@ -604,11 +599,6 @@ Check that the app:
 mvn clean install
 ----
 
-* can be run from an IDE
-** mainClass=`org.apache.isis.WebServer`
-** args=`-m domainapp.application.HelloWorldAppManifest`
-** run before: `mvn datanucleus:enhance -o` in the root module
-
 * can be run using the mvn jetty plugin:
 +
 [source,bash]
diff --git a/adocs/documentation/src/main/asciidoc/guides/dg/_dg_hints-and-tips_enhance-only.adoc b/adocs/documentation/src/main/asciidoc/guides/dg/_dg_hints-and-tips_enhance-only.adoc
index aa6bff9..2431cad 100644
--- a/adocs/documentation/src/main/asciidoc/guides/dg/_dg_hints-and-tips_enhance-only.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/dg/_dg_hints-and-tips_enhance-only.adoc
@@ -11,7 +11,7 @@ From the Apache Isis mailing list is:
 
 Yes, you can; here's one way:
 
-* Duplicate your run configuration for running the webapp
+* Create Duplicate your run configuration for running the webapp
 ** the one where the main class is `org.apache.isis.WebServer`
 ** there's a button for this on the run configurations dialog.
 * then, on your copy change the main class to `org.apache.isis.Dummy`
diff --git a/adocs/documentation/src/main/asciidoc/guides/dg/_dg_ide_intellij.adoc b/adocs/documentation/src/main/asciidoc/guides/dg/_dg_ide_intellij.adoc
index 1d78e97..c623003 100644
--- a/adocs/documentation/src/main/asciidoc/guides/dg/_dg_ide_intellij.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/dg/_dg_ide_intellij.adoc
@@ -272,16 +272,10 @@ Let's see how to run both the app and the tests.
 [[__dg_ide_intellij_running_the-app]]
 === Running the App
 
-Once you've imported your Apache Isis application, we should run it.  We do this by creating a Run configuration, using `Run > Edit Configurations`.
+Once you've imported your Apache Isis application, we should run it.
+We do this by creating a Run configuration, using `Run > Edit Configurations`.
 
-Set up the details as follows:
-
-.IntelliJ Running the App - Run Configuration
-image::{_imagesdir}intellij-idea/110-running-the-app/010-run-configuration.png[width="600px",link="{_imagesdir}intellij-idea/110-running-the-app/010-run-configuration.png"]
-
-We specify the `Main class` to be `org.apache.isis.WebServer`; this is a wrapper around Jetty.  It's possible to pass program arguments to this (eg to automatically install fixtures), but for now leave this blank.
-
-Also note that `Use classpath of module` is the webapp module for your app, and that the `working directory` is `$MODULE_DIR$`.
+TODO: describe how to run using `mvn jetty:run`
 
 Next, and most importantly, configure the DataNucleus enhancer to run for your `dom` goal.  This can be done by defining a Maven goal to run before the app:
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgcfg/_rgcfg_deployment-types.adoc b/adocs/documentation/src/main/asciidoc/guides/rgcfg/_rgcfg_deployment-types.adoc
index 42d3c64..2db6671 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgcfg/_rgcfg_deployment-types.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgcfg/_rgcfg_deployment-types.adoc
@@ -5,6 +5,8 @@
 :_imagesdir: images/
 
 
+TODO: 2.0: This is out of date.  Instead we set system property or environment vars, as per `IsisSystemEnvironment`.  This is also pluggable.
+
 Apache Isis distinguishes between the application being run in development mode vs running in production mode.  The framework calls this the "deployment type" (corresponding internally to the `DeploymentType` class).
 
 (For mostly historical reasons) development mode is actually called `SERVER_PROTOTYPE`, while production mode is called just `SERVER`.  (There is also a deprecated mode called `SERVER_EXPLORATION`; for all intents and purposes this can considered as an alias of `SERVER_PROTOTYPE`).
@@ -96,6 +98,8 @@ In this case the deployment type is specified through an Apache Isis-specific co
 
 == Overriding the deployment type
 
+TODO: 2.0: see env var or system properties, as per `IsisSystemEnvironment`.
+
 If bootstrapping the application using Apache Isis' xref:../ugbtb/ugbtb.adoc#_ugbtb_deployment_cmd-line[`org.apache.isis.WebServer`] then it is possible to override the deployment type using the `-t` (or `--type`) flag.
 
 For example:
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_AppManifest-bootstrapping.adoc b/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_AppManifest-bootstrapping.adoc
index c034e0b..bb98769 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_AppManifest-bootstrapping.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgcms/_rgcms_classes_AppManifest-bootstrapping.adoc
@@ -15,7 +15,7 @@ The framework-provided `AppManifestAbstract2` and `AppManifestAbstract2.Builder`
 The app manifest can then be used both to bootstrap the application "proper", or for integration tests.
 ====
 
-
+TODO: v2: these two versions of `AppManifestAbstract` and `AppManifestAbstract2` will be unified.
 
 [[__rgcms_classes_AppManifest-bootstrapping_api]]
 == API
@@ -210,9 +210,9 @@ This will allow the architectural layering of the overall application to be enfo
 
 What then remains is to update the bootstrapping code itself.
 
-There are several different contexts in which the framework needs to be bootstrapped:
+There are a couple of contexts in which the framework needs to be bootstrapped:
 
-* the first is as a "regular" webapp (using the xref:../ugvw/ugvw.adoc#[Wicket viewer]).
+* the normal situation is as a "regular" webapp (using the xref:../ugvw/ugvw.adoc#[Wicket viewer]).
 Here the `AppManifest` just needs to be specified as a configuration property, usually done using the `WEB-INF/isis.properties` configuration file: +
 +
 [source,ini]
@@ -220,17 +220,7 @@ Here the `AppManifest` just needs to be specified as a configuration property, u
 isis.appManifest=domainapp.app.MyAppAppManifest
 ----
 
-* the second is also as a webapp, but from within the context of the IDE. +
-+
-Here, it's common to use the `org.apache.isis.WebServer` class to launch your application from the xref:../ugbtb/ugbtb.adoc#_ugbtb_deployment_cmd-line[command line].
-This allows the `AppManifest` to be specified using the `-m` (or `--manifest`) flag: +
-+
-[source,ini]
-----
-java org.apache.isis.WebServer -m com.mycompany.myapp.MyAppAppManifestWithFixtures
-----
-
-* the third case is within an integration test. +
+* the other main use-case is within an integration test. +
 +
 The code to boostrap an integration test is shown in the xref:../ugtst/ugtst.adoc#_ugtst_integ-test-support_bootstrapping[testing guide], but once again an `AppManifest` is required.
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_integration-api_EmailService.adoc b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_integration-api_EmailService.adoc
index f26aa1e..3e7e9ae 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_integration-api_EmailService.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgsvc/_rgsvc_integration-api_EmailService.adoc
@@ -179,7 +179,9 @@ and these properties may optionally be configured (each has a default to use gma
 
 These configuration properties can be specified either in `isis.properties` or in an xref:../ugbtb/ugbtb.adoc#_ugbtb_deployment_externalized-configuration[external configuration file], or programmatically using the xref:../rgcms/rgcms.adoc#_rgcms_classes_AppManifest-bootstrapping[`AppManifest`].
 
-If prototyping (that is, running the app using `org.apache.isis.WebServer`), the configuration properties can also be specified as system properties.
+TODO-v2: confirm this is the case.
+
+Configuration properties can also be specified as system properties.
 For example, if you create a test email account on gmail, you can configure the service using:
 
 [source,ini]
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugbtb/_ugbtb_deployment_externalized-configuration.adoc b/adocs/documentation/src/main/asciidoc/guides/ugbtb/_ugbtb_deployment_externalized-configuration.adoc
index 71ab4ec..52fd13b 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugbtb/_ugbtb_deployment_externalized-configuration.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugbtb/_ugbtb_deployment_externalized-configuration.adoc
@@ -62,12 +62,6 @@ Most (if not all) servlet containers will provide a means to define context para
 
 
 
-[NOTE]
-====
-Note that running the app using Apache Isis' `org.apache.isis.WebServer` bootstrapper does not use externalized Apache Isis configuration.
-====
-
-
 
 
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_getting-started_helloworld-archetype.adoc b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_getting-started_helloworld-archetype.adoc
index da402f9..7b0b0b1 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_getting-started_helloworld-archetype.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_getting-started_helloworld-archetype.adoc
@@ -353,15 +353,13 @@ The default configuration does not require any configuration of the servlet cont
 
 Most of the time, though, you'll probably want to run the app from within your IDE.
 The mechanics of doing this will vary by IDE; see the xref:../dg/dg.adoc#_dg_ide[Developers' Guide] for details of setting up Eclipse or IntelliJ IDEA.
-Basically, though, it amounts to running `org.apache.isis.WebServer`, and ensuring that the xref:../dg/dg.adoc#_dg_hints-and-tips_datanucleus-enhancer[DataNucleus enhancer] has properly processed all domain entities.
+One easy way to do this is to use maven to run `jetty:run`.
+This can also be combined with `datanucleus:enhance` to ensure that the xref:../dg/dg.adoc#_dg_hints-and-tips_datanucleus-enhancer[DataNucleus enhancer] has properly processed all domain entities.
 
 Here's what the setup looks like in IntelliJ IDEA:
 
-image::{_imagesdir}getting-started/helloworld.png[width="600px",link="{_imagesdir}getting-started/helloworld.png"]
+TODO-v2: update this images; should basically show `mvn datanucleus:enhance jetty:run -o`
 
-with the maven goal to run the DataNucleus enhancer (discussed in more detail xref:../dg/dg.adoc#_dg_hints-and-tips_datanucleus-enhancer[here]) before launch defined as:
-
-image::{_imagesdir}getting-started/helloworld-before-launch.png[width="600px",link="{_imagesdir}getting-started/helloworld-before-launch.png"]
 
 
 
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_getting-started_simpleapp-archetype.adoc b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_getting-started_simpleapp-archetype.adoc
index f7abdca..af5ce22 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_getting-started_simpleapp-archetype.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugfun/_ugfun_getting-started_simpleapp-archetype.adoc
@@ -615,15 +615,13 @@ Once more, see link:https://github.com/danhaywood/java-mavenmixin-docker#how-to-
 
 Most of the time, though, you'll probably want to run the app from within your IDE.
 The mechanics of doing this will vary by IDE; see the xref:../dg/dg.adoc#_dg_ide[Developers' Guide] for details of setting up Eclipse or IntelliJ IDEA.
-Basically, though, it amounts to running `org.apache.isis.WebServer`, and ensuring that the xref:../dg/dg.adoc#_dg_hints-and-tips_datanucleus-enhancer[DataNucleus enhancer] has properly processed all domain entities.
+One way to do this is to run through Maven with `jetty:run`.
+It is important though to ensure that the xref:../dg/dg.adoc#_dg_hints-and-tips_datanucleus-enhancer[DataNucleus enhancer] has properly processed all domain entities.
 
 Here's what the setup looks like in IntelliJ IDEA:
 
-image::{_imagesdir}getting-started/simpleapp-webapp.png[width="600px",link="{_imagesdir}getting-started/simpleapp-webapp.png"]
+TODO-v2: update these images.  Basically need to run "mvn datanucleus:enhance" as a pre-goal in the module-simple module, then "mvn jetty:run" in the webapp module.
 
-with the maven goal to run the DataNucleus enhancer (discussed in more detail xref:../dg/dg.adoc#_dg_hints-and-tips_datanucleus-enhancer[here]) before launch defined as:
-
-image::{_imagesdir}getting-started/simpleapp-webapp-before-launch.png[width="600px",link="{_imagesdir}getting-started/simpleapp-webapp-before-launch.png"]
 
 
 
diff --git a/core/webserver/src/main/java/org/apache/isis/WebServer.java b/core/webserver/src/main/java/org/apache/isis/WebServer.java
deleted file mode 100644
index 2d563254..0000000
--- a/core/webserver/src/main/java/org/apache/isis/WebServer.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis;
-
-public class WebServer {
-
-    public static void main(final String[] args) {
-        org.apache.isis.core.webserver.WebServer.main(args);
-    }
-
-}
diff --git a/core/webserver/src/main/java/org/apache/isis/core/webserver/WebServer.java b/core/webserver/src/main/java/org/apache/isis/core/webserver/WebServer.java
deleted file mode 100644
index 964fbe6..0000000
--- a/core/webserver/src/main/java/org/apache/isis/core/webserver/WebServer.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.webserver;
-
-import java.io.File;
-import java.net.URI;
-import java.util.Formatter;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.ServerConnector;
-import org.eclipse.jetty.webapp.WebAppContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.isis.commons.internal.collections._Lists;
-import org.apache.isis.config.ConfigurationConstants;
-import org.apache.isis.config.IsisConfiguration;
-import org.apache.isis.core.commons.exceptions.IsisException;
-import org.apache.isis.core.commons.lang.ArrayExtensions;
-import org.apache.isis.core.commons.lang.ObjectExtensions;
-import org.apache.isis.core.runtime.logging.IsisLoggingConfigurer;
-import org.apache.isis.core.runtime.optionhandler.OptionHandler;
-import org.apache.isis.core.runtime.runner.opts.OptionHandlerAdditionalProperty;
-import org.apache.isis.core.runtime.runner.opts.OptionHandlerAppManifest;
-import org.apache.isis.core.runtime.runner.opts.OptionHandlerConfiguration;
-import org.apache.isis.core.runtime.runner.opts.OptionHandlerFixture;
-import org.apache.isis.core.runtime.runner.opts.OptionHandlerFixtureFromEnvironmentVariable;
-import org.apache.isis.core.runtime.runner.opts.OptionHandlerHelp;
-import org.apache.isis.core.runtime.runner.opts.OptionHandlerSystemProperties;
-import org.apache.isis.core.webserver.config.WebServerConfigBuilder;
-import org.apache.isis.core.webserver.internal.OptionHandlerPort;
-import org.apache.isis.core.webserver.internal.OptionHandlerStartupMode;
-
-import static org.apache.isis.core.webserver.WebServerConstants.EMBEDDED_WEB_SERVER_PORT_DEFAULT;
-import static org.apache.isis.core.webserver.WebServerConstants.EMBEDDED_WEB_SERVER_PORT_KEY;
-import static org.apache.isis.core.webserver.WebServerConstants.EMBEDDED_WEB_SERVER_RESOURCE_BASE_DEFAULT;
-import static org.apache.isis.core.webserver.WebServerConstants.EMBEDDED_WEB_SERVER_RESOURCE_BASE_KEY;
-import static org.apache.isis.core.webserver.WebServerConstants.EMBEDDED_WEB_SERVER_STARTUP_MODE_DEFAULT;
-import static org.apache.isis.core.webserver.WebServerConstants.EMBEDDED_WEB_SERVER_STARTUP_MODE_KEY;
-
-public class WebServer {
-
-    private static final Logger LOG = LoggerFactory.getLogger(WebServer.class);
-    private static final String SRC_MAIN_WEBAPP = "src/main/webapp";
-
-    public enum StartupMode {
-        FOREGROUND, BACKGROUND;
-
-        public static StartupMode lookup(final String value) {
-            if (value == null) {
-                return null;
-            }
-            try {
-                return valueOf(value.toUpperCase());
-            } catch (final Exception e) {
-                return null;
-            }
-        }
-
-        public boolean isForeground() {
-            return this == FOREGROUND;
-        }
-        public boolean isBackground() {
-            return this == BACKGROUND;
-        }
-    }
-
-
-    private Server jettyServer;
-
-    public static void main(final String[] args) {
-        new WebServer().run(args);
-    }
-
-    public void run(final int port) {
-        String[] args = new String[0];
-        args = OptionHandlerStartupMode.appendArg(args, StartupMode.BACKGROUND);
-        args = OptionHandlerPort.appendArg(args, port);
-        run(args);
-    }
-
-    private final IsisLoggingConfigurer loggingConfigurer = new IsisLoggingConfigurer();
-
-    public void run(final String[] args) {
-
-        // setup logging immediately
-        loggingConfigurer.configureLogging(guessConfigDirectory(), args);
-
-        // set up the configuration
-        final WebServerConfigBuilder webServerConfigBuilder = new WebServerConfigBuilder();  
-        if(!webServerConfigBuilder.parseAndPrimeWith(standardHandlers(), args)) {
-            return;
-        }
-
-        final IsisConfiguration configuration = webServerConfigBuilder.build();
-        
-        // create and start
-        jettyServer = createJettyServerAndBindConfig(configuration);
-        
-        final String startupModeStr = configuration.getString(
-                EMBEDDED_WEB_SERVER_STARTUP_MODE_KEY, EMBEDDED_WEB_SERVER_STARTUP_MODE_DEFAULT);
-        final StartupMode startupMode = StartupMode.lookup(startupModeStr);
-
-        start(jettyServer, startupMode);
-    }
-
-    private static List<OptionHandler> standardHandlers() {
-        return _Lists.of(
-                new OptionHandlerConfiguration(),
-                new OptionHandlerFixture(),
-                new OptionHandlerAppManifest(),
-                new OptionHandlerAdditionalProperty(),
-                new OptionHandlerFixtureFromEnvironmentVariable(),
-                new OptionHandlerSystemProperties(),
-                new OptionHandlerHelp(),
-                new OptionHandlerPort()
-                );
-    }
-
-    // REVIEW: hacky...
-    private static String guessConfigDirectory() {
-        return new File(ConfigurationConstants.WEBINF_FULL_DIRECTORY).exists() ?
-                ConfigurationConstants.WEBINF_FULL_DIRECTORY :
-                    ConfigurationConstants.DEFAULT_CONFIG_DIRECTORY;
-    }
-
-    private Server createJettyServerAndBindConfig(IsisConfiguration configuration) {
-
-        final int port = configuration.getInteger(
-                EMBEDDED_WEB_SERVER_PORT_KEY, EMBEDDED_WEB_SERVER_PORT_DEFAULT);
-        final String webappContextPath = configuration.getString(
-                EMBEDDED_WEB_SERVER_RESOURCE_BASE_KEY, EMBEDDED_WEB_SERVER_RESOURCE_BASE_DEFAULT);
-
-        LOG.info("Running Jetty on port '{}' to serve the web application", port);
-
-        final Server jettyServer = new Server(port);
-        final WebAppContext context = new WebAppContext(SRC_MAIN_WEBAPP, webappContextPath);
-        jettyServer.setHandler(context);
-
-        return jettyServer;
-    }
-
-    private static void start(final Server jettyServer, final StartupMode startupMode) {
-        long start = System.currentTimeMillis();
-        try {
-            jettyServer.start();
-            LOG.info("Started the application in {}ms", System.currentTimeMillis() - start);
-            if (startupMode.isForeground()) {
-                System.in.read();
-                System.out.println(">>> STOPPING EMBEDDED JETTY SERVER");
-                jettyServer.stop();
-                jettyServer.join();
-            }
-        } catch (final Exception ex) {
-            throw new IsisException("Unable to start Jetty server", ex);
-        }
-    }
-
-    @SuppressWarnings("unused")
-    private void copyDeploymentTypeIntoInitParams(final WebAppContext context) {
-        Map<String, String> initParams = context.getInitParams();
-        Map<String, String> convertedInitParams = ObjectExtensions.asT(initParams);
-        initParams.clear();
-        initParams.putAll(convertedInitParams);
-    }
-
-    public void stop() {
-        if (jettyServer == null) {
-            return;
-        }
-        try {
-            jettyServer.stop();
-        } catch (final Exception e) {
-            e.printStackTrace(System.err);
-        }
-    }
-
-    public URI getBase() {
-        return URI.create(baseFor(jettyServer));
-    }
-
-    private String baseFor(final Server jettyServer) {
-        final ServerConnector connector = (ServerConnector) jettyServer.getConnectors()[0];
-        final String scheme = "http";
-        final String host = ArrayExtensions.coalesce(connector.getHost(), "localhost");
-        final int port = connector.getPort();
-
-        final WebAppContext handler = (WebAppContext) jettyServer.getHandler();
-        final String contextPath = handler.getContextPath();
-
-        final StringBuilder buf = new StringBuilder();
-
-        try(final Formatter formatter = new Formatter(buf)) {
-            formatter.format("%s://%s:%d/%s", scheme, host, port, contextPath);
-        }
-
-        return appendSlashIfRequired(buf).toString();
-    }
-
-    private static StringBuilder appendSlashIfRequired(final StringBuilder buf) {
-        if (buf.charAt(buf.length() - 1) != '/') {
-            buf.append('/');
-        }
-        return buf;
-    }
-}
diff --git a/core/webserver/src/main/java/org/apache/isis/core/webserver/WebServerConstants.java b/core/webserver/src/main/java/org/apache/isis/core/webserver/WebServerConstants.java
deleted file mode 100644
index 47e1cb9..0000000
--- a/core/webserver/src/main/java/org/apache/isis/core/webserver/WebServerConstants.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.webserver;
-
-import org.apache.isis.config.ConfigurationConstants;
-import org.apache.isis.core.webserver.WebServer.StartupMode;
-
-public final class WebServerConstants {
-
-    private static final String ROOT = ConfigurationConstants.ROOT + "embedded-web-server" + ".";
-
-    public static final String EMBEDDED_WEB_SERVER_PORT_KEY = ROOT + "port";
-    public static final int EMBEDDED_WEB_SERVER_PORT_DEFAULT = 8080;
-
-    public static final String EMBEDDED_WEB_SERVER_ADDRESS_KEY = ROOT + "address";
-    public static final String EMBEDDED_WEB_SERVER_ADDRESS_DEFAULT = "localhost";
-
-    public static final String EMBEDDED_WEB_SERVER_RESOURCE_BASE_KEY = ROOT + "webapp";
-    public static final String EMBEDDED_WEB_SERVER_RESOURCE_BASE_DEFAULT = ""; // or
-    // "webapp"
-    // ??
-
-    public static final String EMBEDDED_WEB_SERVER_STARTUP_MODE_KEY = ROOT + "startupMode";
-    public static final String EMBEDDED_WEB_SERVER_STARTUP_MODE_DEFAULT = StartupMode.FOREGROUND.name();
-
-    private WebServerConstants() {
-    }
-
-}
diff --git a/core/webserver/src/main/java/org/apache/isis/core/webserver/WebServerException.java b/core/webserver/src/main/java/org/apache/isis/core/webserver/WebServerException.java
deleted file mode 100644
index f07b890..0000000
--- a/core/webserver/src/main/java/org/apache/isis/core/webserver/WebServerException.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.webserver;
-
-public class WebServerException extends RuntimeException {
-
-    private static final long serialVersionUID = 1L;
-
-    public WebServerException(final String message, final Throwable cause) {
-        super(message, cause);
-    }
-
-}
diff --git a/core/webserver/src/main/java/org/apache/isis/core/webserver/config/WebServerConfigBuilder.java b/core/webserver/src/main/java/org/apache/isis/core/webserver/config/WebServerConfigBuilder.java
deleted file mode 100644
index 4dac010..0000000
--- a/core/webserver/src/main/java/org/apache/isis/core/webserver/config/WebServerConfigBuilder.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.core.webserver.config;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.CommandLineParser;
-import org.apache.commons.cli.DefaultParser;
-import org.apache.commons.cli.Options;
-import org.apache.commons.cli.ParseException;
-
-import org.apache.isis.commons.internal.collections._Lists;
-import org.apache.isis.config.ConfigurationConstants;
-import org.apache.isis.config.IsisConfiguration;
-import org.apache.isis.config.internal._Config;
-import org.apache.isis.config.resource.ResourceStreamSource;
-import org.apache.isis.config.resource.ResourceStreamSourceContextLoaderClassPath;
-import org.apache.isis.config.resource.ResourceStreamSourceFileSystem;
-import org.apache.isis.core.runtime.optionhandler.BootPrinter;
-import org.apache.isis.core.runtime.optionhandler.OptionHandler;
-
-import static org.apache.isis.config.internal._Config.acceptBuilder;
-
-public class WebServerConfigBuilder {
-    
-    public WebServerConfigBuilder() {
-        acceptBuilder(builder->{
-            builder.addResourceStreamSources(resourceStreamSources());    
-        });
-    }
-
-    public boolean parseAndPrimeWith(final List<OptionHandler> optionHandlers, final String[] args) {
-
-        // add options (ie cmd line flags)
-        final Options options = new Options();
-        for (final OptionHandler optionHandler : optionHandlers) {
-            optionHandler.addOption(options);
-        }
-
-        // parse options from the cmd line
-        final boolean parsedOk = parseAndPrimeWith(options, optionHandlers, args);
-
-        if(parsedOk) {
-            
-            acceptBuilder(builder->{
-                
-                for (final OptionHandler optionHandler : optionHandlers) {
-                    builder.primeWith(optionHandler);
-                }
-                
-            });
-            
-        }
-
-        return parsedOk;
-    }
-
-    private boolean parseAndPrimeWith(final Options options, final List<OptionHandler> optionHandlers, final String[] args) {
-        final BootPrinter printer = new BootPrinter(getClass());
-        final CommandLineParser parser = new DefaultParser();
-        try {
-            final CommandLine commandLine = parser.parse(options, args);
-            for (final OptionHandler optionHandler : optionHandlers) {
-                if (!optionHandler.handle(commandLine, printer, options)) {
-                    return false;
-                }
-            }
-        } catch (final ParseException e) {
-            printer.printErrorMessage(e.getMessage());
-            printer.printHelp(options);
-            return false;
-        }
-        return true;
-    }
-    
-    /**
-     * Set of locations to search for config files.
-     */
-    private static List<ResourceStreamSource> resourceStreamSources() {
-        final List<ResourceStreamSource> rssList = _Lists.newArrayList();
-        rssList.addAll(Arrays.asList(
-                ResourceStreamSourceFileSystem.create(ConfigurationConstants.DEFAULT_CONFIG_DIRECTORY),
-                ResourceStreamSourceFileSystem.create(ConfigurationConstants.WEBINF_FULL_DIRECTORY),
-                ResourceStreamSourceContextLoaderClassPath.create(),
-                ResourceStreamSourceContextLoaderClassPath.create(ConfigurationConstants.WEBINF_DIRECTORY)));
-        return rssList;
-    }
-
-    public IsisConfiguration build() {
-        return _Config.getConfiguration();
-    }
-    
-}
diff --git a/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerAddress.java b/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerAddress.java
deleted file mode 100644
index 4eb6543..0000000
--- a/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerAddress.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-/**
- *
- */
-package org.apache.isis.core.webserver.internal;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.Option;
-import org.apache.commons.cli.OptionBuilder;
-import org.apache.commons.cli.Options;
-
-import org.apache.isis.config.builder.IsisConfigurationBuilder;
-import org.apache.isis.core.runtime.optionhandler.BootPrinter;
-import org.apache.isis.core.runtime.optionhandler.OptionHandler;
-import org.apache.isis.core.webserver.WebServerConstants;
-
-/**
- * @deprecated - never completed (unused)
- */
-@Deprecated
-public final class OptionHandlerAddress implements OptionHandler {
-    private String address;
-    static final String ADDRESS_OPT = "a";
-    static final String ADDRESS_LONG_OPT = "address";
-
-    @Override
-    @SuppressWarnings("static-access")
-    public void addOption(final Options options) {
-        final Option option = OptionBuilder.withArgName("address").hasArg().withLongOpt(OptionHandlerAddress.ADDRESS_LONG_OPT).withDescription("address to listen on").create(OptionHandlerAddress.ADDRESS_OPT);
-        options.addOption(option);
-    }
-
-    @Override
-    public boolean handle(final CommandLine commandLine, final BootPrinter bootPrinter, final Options options) {
-        address = commandLine.getOptionValue(OptionHandlerAddress.ADDRESS_OPT);
-        return true;
-    }
-
-    @Override
-    public void prime(final IsisConfigurationBuilder isisConfigurationBuilder) {
-        if (address == null) {
-            return;
-        }
-        isisConfigurationBuilder.add(WebServerConstants.EMBEDDED_WEB_SERVER_ADDRESS_KEY, address);
-    }
-}
\ No newline at end of file
diff --git a/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerPort.java b/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerPort.java
deleted file mode 100644
index a5f1621..0000000
--- a/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerPort.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-/**
- *
- */
-package org.apache.isis.core.webserver.internal;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.Option;
-import org.apache.commons.cli.OptionBuilder;
-import org.apache.commons.cli.Options;
-
-import org.apache.isis.config.builder.IsisConfigurationBuilder;
-import org.apache.isis.core.commons.lang.ArrayExtensions;
-import org.apache.isis.core.runtime.optionhandler.BootPrinter;
-import org.apache.isis.core.runtime.optionhandler.OptionHandler;
-import org.apache.isis.core.webserver.WebServerConstants;
-
-public final class OptionHandlerPort implements OptionHandler {
-    private Integer port;
-    static final String PORT_LONG_OPT = "port";
-    static final String PORT_OPT = "p";
-
-    public static String[] appendArg(final String[] args, final int port) {
-        return ArrayExtensions.append(args, "--" + PORT_LONG_OPT, "" + port);
-    }
-
-    @Override
-    @SuppressWarnings("static-access")
-    public void addOption(final Options options) {
-        OptionBuilder.withArgName("port");
-        final Option option = OptionBuilder.hasArg().withLongOpt(OptionHandlerPort.PORT_LONG_OPT).withDescription("port to listen on").create(OptionHandlerPort.PORT_OPT);
-        options.addOption(option);
-    }
-
-    @Override
-    public boolean handle(final CommandLine commandLine, final BootPrinter bootPrinter, final Options options) {
-        final String portStr = commandLine.getOptionValue(OptionHandlerPort.PORT_OPT);
-        if (portStr != null) {
-            port = Integer.parseInt(portStr);
-        }
-        return true;
-    }
-
-    @Override
-    public void prime(final IsisConfigurationBuilder isisConfigurationBuilder) {
-        if (port == null) {
-            return;
-        }
-        isisConfigurationBuilder.add(WebServerConstants.EMBEDDED_WEB_SERVER_PORT_KEY, "" + port);
-    }
-}
\ No newline at end of file
diff --git a/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerResourceBase.java b/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerResourceBase.java
deleted file mode 100644
index 5cca083..0000000
--- a/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerResourceBase.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.webserver.internal;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.Option;
-import org.apache.commons.cli.OptionBuilder;
-import org.apache.commons.cli.Options;
-
-import org.apache.isis.config.builder.IsisConfigurationBuilder;
-import org.apache.isis.core.runtime.optionhandler.BootPrinter;
-import org.apache.isis.core.runtime.optionhandler.OptionHandler;
-import org.apache.isis.core.webserver.WebServerConstants;
-
-/**
- * @deprecated  - although was used, is too obscure.
- */
-@Deprecated
-public final class OptionHandlerResourceBase implements OptionHandler {
-    private String resourceBase;
-    static final String RESOURCE_BASE_LONG_OPT = "webapp";
-    static final String RESOURCE_BASE_OPT = "w";
-
-    @Override
-    @SuppressWarnings("static-access")
-    public void addOption(final Options options) {
-        final Option option = OptionBuilder.withArgName("webapp directory").hasArg().withLongOpt(OptionHandlerResourceBase.RESOURCE_BASE_LONG_OPT).withDescription("directory holding webapp").create(OptionHandlerResourceBase.RESOURCE_BASE_OPT);
-        options.addOption(option);
-    }
-
-    @Override
-    public boolean handle(final CommandLine commandLine, final BootPrinter bootPrinter, final Options options) {
-        resourceBase = commandLine.getOptionValue(OptionHandlerResourceBase.RESOURCE_BASE_OPT, resourceBase);
-        return true;
-    }
-
-    @Override
-    public void prime(final IsisConfigurationBuilder isisConfigurationBuilder) {
-        if (resourceBase == null) {
-            return;
-        }
-        isisConfigurationBuilder.add(WebServerConstants.EMBEDDED_WEB_SERVER_RESOURCE_BASE_KEY, resourceBase);
-    }
-}
\ No newline at end of file
diff --git a/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerStartupMode.java b/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerStartupMode.java
deleted file mode 100644
index 4d59837..0000000
--- a/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerStartupMode.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.webserver.internal;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.Option;
-import org.apache.commons.cli.OptionBuilder;
-import org.apache.commons.cli.Options;
-
-import org.apache.isis.config.builder.IsisConfigurationBuilder;
-import org.apache.isis.core.commons.lang.ArrayExtensions;
-import org.apache.isis.core.runtime.optionhandler.BootPrinter;
-import org.apache.isis.core.runtime.optionhandler.OptionHandler;
-import org.apache.isis.core.webserver.WebServer.StartupMode;
-import org.apache.isis.core.webserver.WebServerConstants;
-
-public final class OptionHandlerStartupMode implements OptionHandler {
-
-    static final String STARTUP_MODE_LONG_OPT = "startup";
-    static final String STARTUP_MODE_BASE_OPT = "a";
-
-    public static String[] appendArg(final String[] args, final StartupMode startupMode) {
-        return ArrayExtensions.append(args, "--" + STARTUP_MODE_LONG_OPT, "" + startupMode.name());
-    }
-
-    private StartupMode startupMode;
-
-    @Override
-    @SuppressWarnings("static-access")
-    public void addOption(final Options options) {
-        final Option option = OptionBuilder.withArgName("startup mode").hasArg().withLongOpt(OptionHandlerStartupMode.STARTUP_MODE_LONG_OPT).withDescription("start in foreground (sync) or background (async)").create(OptionHandlerStartupMode.STARTUP_MODE_BASE_OPT);
-        options.addOption(option);
-    }
-
-    @Override
-    public boolean handle(final CommandLine commandLine, final BootPrinter bootPrinter, final Options options) {
-        startupMode = StartupMode.lookup(commandLine.getOptionValue(OptionHandlerStartupMode.STARTUP_MODE_BASE_OPT));
-        return true;
-    }
-
-    @Override
-    public void prime(final IsisConfigurationBuilder isisConfigurationBuilder) {
-        if (startupMode != null) {
-            isisConfigurationBuilder.add(WebServerConstants.EMBEDDED_WEB_SERVER_STARTUP_MODE_KEY, startupMode.name());
-        }
-    }
-
-}
\ No newline at end of file