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 2015/08/14 13:25:55 UTC

[1/4] isis git commit: ISIS-848: updating documentation for appManifest. Also...

Repository: isis
Updated Branches:
  refs/heads/master f461f53ea -> db8bad6c8


ISIS-848: updating documentation for appManifest.  Also...

... deprecating/excluding some cmdline args that are incomplete/highly obscure.
... updating the docs for WebServer flags, and some of the docs for web.xml.


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/56604143
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/56604143
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/56604143

Branch: refs/heads/master
Commit: 566041436430728b6a622e77b994dc268dbb18d3
Parents: f461f53
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Aug 14 11:50:02 2015 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Aug 14 11:50:02 2015 +0100

----------------------------------------------------------------------
 .../src/main/asciidoc/documentation.adoc        |  10 +-
 .../_rg_classes_AppManifest-bootstrapping.adoc  |   5 +-
 .../src/main/asciidoc/guides/_rg_web-xml.adoc   |  45 +++----
 .../guides/_ug_deployment_cmd-line.adoc         | 133 +++++++++----------
 .../asciidoc/guides/_ug_deployment_tomcat.adoc  |  12 +-
 adocs/template/document.html.erb                |   2 +-
 .../isis/core/runtime/runner/IsisRunner.java    |  21 ++-
 .../runtime/runner/opts/OptionHandlerDebug.java |   8 +-
 .../runner/opts/OptionHandlerDiagnostics.java   |   8 +-
 .../runner/opts/OptionHandlerNoSplash.java      |  10 +-
 .../runtime/runner/opts/OptionHandlerQuiet.java |   8 +-
 .../runner/opts/OptionHandlerReflector.java     |  10 +-
 .../runner/opts/OptionHandlerVerbose.java       |   8 +-
 .../apache/isis/core/webserver/WebServer.java   |  15 ++-
 .../internal/OptionHandlerAddress.java          |   4 +
 .../internal/OptionHandlerResourceBase.java     |   4 +
 16 files changed, 164 insertions(+), 139 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/56604143/adocs/documentation/src/main/asciidoc/documentation.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/documentation.adoc b/adocs/documentation/src/main/asciidoc/documentation.adoc
index d15c2f3..5431f14 100644
--- a/adocs/documentation/src/main/asciidoc/documentation.adoc
+++ b/adocs/documentation/src/main/asciidoc/documentation.adoc
@@ -16,6 +16,11 @@ pass:[</p></div>]
 pass:[<br/>]
 
 
+
+
+[.documentation-page]
+--
+
 [cols="1a,1a,1a",frame="none"]
 |===
 
@@ -129,13 +134,10 @@ including:
 * link:migration-notes.html[Migration Notes]
 
 
-
-
-
 |====
 
 
-
+--
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/56604143/adocs/documentation/src/main/asciidoc/guides/_rg_classes_AppManifest-bootstrapping.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_classes_AppManifest-bootstrapping.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_AppManifest-bootstrapping.adoc
index 72380e1..bb1f850 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_classes_AppManifest-bootstrapping.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_AppManifest-bootstrapping.adoc
@@ -239,12 +239,11 @@ The first (programmatic) approach takes precedence over the second approach (con
 
 [TIP]
 ====
-If you use the `org.apache.isis.WebServer` class to launch your application from the xref:ug.adoc#_ug_deployment_cmd-line[command line], then should be aware that arbitrary configuration properties can be specified as system properties.  In particular, therefore, you can override the `isis.appManifest` configuration property:
+If you use the `org.apache.isis.WebServer` class to launch your application from the xref:ug.adoc#_ug_deployment_cmd-line[command line], then note that you can specify the `AppManifest` using the `-m` (or `--manifest`) flag:
 
 [source,ini]
 ----
-java -Disis.appManifest=com.mycompany.myapp.MyAppAppManifestWithFixtures \
-     org.apache.isis.WebServer
+java org.apache.isis.WebServer -m com.mycompany.myapp.MyAppAppManifestWithFixtures
 ----
 
 ====

http://git-wip-us.apache.org/repos/asf/isis/blob/56604143/adocs/documentation/src/main/asciidoc/guides/_rg_web-xml.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_web-xml.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_web-xml.adoc
index 93d09ce..b32535a 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_rg_web-xml.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_web-xml.adoc
@@ -48,9 +48,9 @@ Servlet context listeners are used to perform initialization on application star
 
 === `EnvironmentLoaderListener` (Shiro)
 
-NOTE: WIP
+Bootstrap listener to startup and shutdown the web application's Shiro `WebEnvironment` at startup and shutdown respectively.
 
-definition:
+Its definition is:
 
 [source,xml]
 ----
@@ -65,9 +65,7 @@ definition:
 
 The `IsisWebAppBootstrapper` servlet context listener bootstraps the shared (global) metadata for the Apache Isis framework.  This listener is not required (indeed must not be configured) if the Wicket viewer is in use.
 
-NOTE: WIP
-
-definition:
+Its definition is:
 
 [source,xml]
 ----
@@ -76,7 +74,7 @@ definition:
 </listener>
 ----
 
-context parameters:
+Its context parameters are:
 
 [source,xml]
 ----
@@ -95,9 +93,7 @@ context parameters:
 
 The `ResteasyBootstrap` servlet context listener initializes the RestEasy runtime, specifying that classes (namely, those specified in Isis' `RestfulObjectsApplication`) to be exposed as REST resources.  It is required if the Restful Objects viewer is to be deployed.
 
-NOTE: WIP
-
-definition:
+Its definition is:
 
 [source,xml]
 ----
@@ -127,15 +123,14 @@ There are two relevant context parameters:
 [[_rg_web-xml_servlets]]
 == Servlets
 
-NOTE: WIP
+Servlets process HTTP requests and return corresponding responses.
 
 
 === `HttpServletDispatcher` (RestEasy)
 
-NOTE: WIP
-
+This servlet is provided by the RestEasy framework, and does the dispatching to the resources defined by Apache Isis' `RestfulObjectsApplication` (see above).
 
-definition:
+Its definition is:
 
 [source,xml]
 ----
@@ -145,7 +140,7 @@ definition:
 </servlet>
 ----
 
-mapping:
+Its mapping is:
 
 [source,xml]
 ----
@@ -160,7 +155,7 @@ mapping:
 
 NOTE: WIP
 
-definition
+Its definition is:
 
 [source,xml]
 ----
@@ -170,7 +165,7 @@ definition
 </servlet>
 ----
 
-mapping:
+Its mapping is:
 
 [source,xml]
 ----
@@ -216,7 +211,7 @@ The order in which filters appear in `web.xml` matters: first to last they defin
 
 NOTE: WIP
 
-definition:
+Its definition is:
 
 [source,xml]
 ----
@@ -226,7 +221,7 @@ definition:
 </filter>
 ----
 
-mapping:
+Its mapping is:
 
 [source,xml]
 ----
@@ -241,7 +236,7 @@ mapping:
 
 NOTE: WIP
 
-definition:
+Its definition is:
 
 [source,xml]
 ----
@@ -252,7 +247,7 @@ definition:
 ----
 
 
-mapping:
+Its mapping is:
 
 [source,xml]
 ----
@@ -272,7 +267,7 @@ mapping:
 
 NOTE: WIP
 
-definition:
+Its definition is:
 
 [source,xml]
 ----
@@ -287,7 +282,7 @@ definition:
 ----
 <1> cache time, in seconds
 
-mapping:
+Its mapping is:
 
 [source,xml]
 ----
@@ -327,7 +322,7 @@ mapping:
 NOTE: WIP
 
 
-definition:
+Its definition is:
 
 [source,xml]
 ----
@@ -342,7 +337,7 @@ definition:
 ----
 <1> specify the application (subclass of `IsisWicketApplication`) to use
 
-mapping:
+Its mapping is:
 
 [source,xml]
 ----
@@ -417,7 +412,7 @@ This filter should be mapped to the `servlet-name` for the RestEasy `HttpServlet
 
 NOTE: WIP
 
-definition:
+Its definition is:
 
 [source,xml]
 ----

http://git-wip-us.apache.org/repos/asf/isis/blob/56604143/adocs/documentation/src/main/asciidoc/guides/_ug_deployment_cmd-line.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ug_deployment_cmd-line.adoc b/adocs/documentation/src/main/asciidoc/guides/_ug_deployment_cmd-line.adoc
index 110cd21..6d8e362 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ug_deployment_cmd-line.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ug_deployment_cmd-line.adoc
@@ -1,124 +1,113 @@
 [[_ug_deployment_cmd-line]]
-= Command Line
+= Command Line (`WebServer`)
 :Notice: 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.
 :_basedir: ../
 :_imagesdir: images/
 
-NOTE: TODO
 
 
-== `WebServer` class
+As well as deploying an Apache Isis application into a servlet container, it is also possible to invoke from the command line using the `org.apache.isis.WebServer` utility class.  This is especially useful while developing and testing, but may also suit some deployment scenarios (eg running as a standalone EXE within a Docker container, for example).  Internally the `WebServer` spins up a Jetty servlet container.
 
-The `org.apache.isis.WebServer` utility class provides a `main(String[])` method so that an Apache Isis application can be run from within the IDE or command line, without the need to package the app as a WAR file and deploying to a servlet container.  Internally the class it uses jetty to programmatically bootstrap the app.
-
-The utility class also supports a number of command line arguments:
+The class also supports a number of command line arguments:
 
 .Command line args for `org.apache.isis.Webserver`
-[cols="1,1,1,2", options="header"]
+[cols="1a,2a,2a,4a", options="header"]
 |===
 | Flag 
 | Long format
-| Values (default)
+| Values +
+(default)
 | Description
 
-|-t
-|--type
-|`server_prototype`,`server` +
+|`-t`
+|`--type`
+|`server_prototype`, `server` +
 (`server`)
 |Deployment type
 
-|-f
-|--fixture
-|
-|
 
-|-u
-|--user
-|
-|
+|`-m`
+|`--manifest`
+|FQCN
+|Fully qualified class name of the xref:rg.adoc#_rg_classes_super_manpage-AppManifest[`AppManifest`] to use to bootstrap the system. +
 
-|-p
-|--password
-|
-|
+This flag sets/overrides the `isis.appManifest` configuration property to the specified class name.
 
-|-D
-|
-|
-|Additional property, in form `-Dxxx=yyy`
 
-|-h
-|--help
-|
-|
+|`-f`
+|`--fixture`
+|FQCN
+|Fully qualified class name of the fixture (extending xref:rg.adoc#_rg_classes_super_manpage-FixtureScript[`FixtureScript`]) to be run to setup data. +
 
+This flag sets/overrides the `isis.fixtures` configuration property to the specified class name, and also sets the `isis.persistor.datanucleus.install-fixtures` configuration property to `true` to instruct the JDO/DataNucleus objectstore to actually load in the fixtures. +
 
-|===
+It is also possible to specify the fixture class name using either the `$IsisFixture` or `$IsisFixtures` environment variable (case insensitive).
 
+|`-p`
+|`--port`
+|(8080)
+|The port number to listen on. +
 
+This flag sets/overrides the `isis.embedded-web-server.port` configuration property.
 
-The utility class also supports a number of other flags, but their usage is extremely rare (and some may be removed in the future):
 
-.Command line args for `org.apache.isis.Webserver`
-[cols="1,1,1,2", options="header"]
-|===
-| Flag
-| Long format
-| Values (default)
-| Description
 
+|`-c`
+|`--config`
+|filename
+|configuration file containing additional configuration properties
 
-|-l
-|--reflector
-|FQCN
-|Implementing `ObjectReflectorInstaller`
 
-|-c
-|--config
-|
-|
 
-|-s
-|--nosplash
-|
+|`-D`
 |
+|xxx=yyy
+|Specify additional arbitrary configuration properties.  This can be specified multiple times. +
 
-|
-|--diagnostics
-|
-|
+Further discussion below.
 
+|`-v`
+|`--version`
 |
-|--version
-|
-|
+|Prints the version, then quits
 
-|
-|--debug
-|
-|
 
-|
-|--verbose
-|
-|
 
+|`-h`
+|`--help`
 |
-|--quiet
-|
-|
+|Prints a usage message, then quits
 
 
 |===
 
 
+Note that the `-D` argument is *not* a system property, it is parsed by `WebServer` itself.  That said, it is _also_ possible to specify system properties, and these will also be processed in the exact same way. +
+
+Said another way, properties can be specified either as application arguments:
+
+[source,ini]
+----
+java org.apache.isis.WebServer -Dxxx=yyy -Daaa=bbb
+----
+
+or as system properties:
+
+[source,ini]
+----
+java -Dxxx=yyy -Daaa=bbb org.apache.isis.WebServer
+----
+
+
 
-== `Dummy` class
 
-`org.apache.isis.Dummy`
 
 
-This dummy class provides a single empty `main(String[])` method.  It was introduced as a convenience for developers using Eclipse in combination with the DataNucleus plugin; if used as a launch target then it allow the entities to be enhanced withouth the running an app.
+[TIP]
+.The `Dummy` class
+====
+The framework also provides the `org.apache.isis.Dummy` class, which consists of a single empty `main(String[])` method.  It was introduced as a convenience for developers using Eclipse in combination with the DataNucleus plugin; if used as a launch target then it allow the entities to be enhanced withouth the running an app.
+====
 
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/56604143/adocs/documentation/src/main/asciidoc/guides/_ug_deployment_tomcat.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ug_deployment_tomcat.adoc b/adocs/documentation/src/main/asciidoc/guides/_ug_deployment_tomcat.adoc
index 1728cfe..9885f25 100644
--- a/adocs/documentation/src/main/asciidoc/guides/_ug_deployment_tomcat.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/_ug_deployment_tomcat.adoc
@@ -5,28 +5,22 @@
 :_imagesdir: images/
 
 
-NOTE: TODO
+Some pointers when deploying to Tomcat (or any other servlet container).
 
 == Externalized Configuration
 
-NOTE: TODO
+See the guidance xref:ug.adoc#_ug_deployment_externalized-configuration[below].
 
 
 == JVM Args
 
-NOTE: TODO
-
-
-for the `WrapperFactory` (uses link:http://www.javassist.org[Javassist])
-
-using:
+The xref:rg.adoc#_rg_services-api_manpage-WrapperFactory[`WrapperFactory`] uses link:http://www.javassist.org[Javassist] to create on-the-fly classes acting as a proxy.  The cost of these proxies can be mitigated using:
 
 [source,ini]
 ----
 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC
 ----
 
-You can hint the JVM to unload dynamically created classes which ClassLoaders are still around.
 
 
 == Using a JNDI Datasource

http://git-wip-us.apache.org/repos/asf/isis/blob/56604143/adocs/template/document.html.erb
----------------------------------------------------------------------
diff --git a/adocs/template/document.html.erb b/adocs/template/document.html.erb
index a400e0f..86aa8cc 100644
--- a/adocs/template/document.html.erb
+++ b/adocs/template/document.html.erb
@@ -154,7 +154,7 @@
             margin-top: 30px;
         }
 
-        div#doc-content table.frame-all {
+        div.documentation-page table.frame-all {
             border-left: none;
             border-right: none;
         }

http://git-wip-us.apache.org/repos/asf/isis/blob/56604143/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/IsisRunner.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/IsisRunner.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/IsisRunner.java
index 9a5bd26..29f560e 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/IsisRunner.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/IsisRunner.java
@@ -225,19 +225,28 @@ public class IsisRunner {
         addOptionHandler(optionHandlerDeploymentType);
         addOptionHandler(new OptionHandlerConfiguration());
 
-        addOptionHandler(new OptionHandlerReflector(installerLookup));
+        // intention is to delete this: better to use isis.reflector.facets.include and isis.reflector.facets.exclude properties
+        // addOptionHandler(new OptionHandlerReflector(installerLookup));
 
         addOptionHandler(new OptionHandlerAppManifest());
         addOptionHandler(new OptionHandlerFixture());
-        addOptionHandler(new OptionHandlerNoSplash());
+
+        // no-op
+        //addOptionHandler(new OptionHandlerNoSplash());
+
         addOptionHandler(new OptionHandlerAdditionalProperty());
         addOptionHandler(new OptionHandlerFixtureFromEnvironmentVariable());
         addOptionHandler(new OptionHandlerSystemProperties());
 
-        addOptionHandler(new OptionHandlerDebug());
-        addOptionHandler(new OptionHandlerDiagnostics());
-        addOptionHandler(new OptionHandlerQuiet());
-        addOptionHandler(new OptionHandlerVerbose());
+        // no-op
+        // addOptionHandler(new OptionHandlerDebug());
+
+        // no-op
+        // addOptionHandler(new OptionHandlerDiagnostics());
+        // no-op
+        // addOptionHandler(new OptionHandlerQuiet());
+        // no-op
+        // addOptionHandler(new OptionHandlerVerbose());
 
         addOptionHandler(new OptionHandlerHelp());
         addOptionHandler(new OptionHandlerVersion());

http://git-wip-us.apache.org/repos/asf/isis/blob/56604143/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerDebug.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerDebug.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerDebug.java
index e9a8709..bda880c 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerDebug.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerDebug.java
@@ -19,8 +19,6 @@
 
 package org.apache.isis.core.runtime.runner.opts;
 
-import static org.apache.isis.core.runtime.runner.Constants.DEBUG_OPT;
-
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.Options;
 
@@ -28,6 +26,12 @@ import org.apache.isis.core.commons.config.IsisConfigurationBuilder;
 import org.apache.isis.core.runtime.optionhandler.BootPrinter;
 import org.apache.isis.core.runtime.optionhandler.OptionHandlerAbstract;
 
+import static org.apache.isis.core.runtime.runner.Constants.DEBUG_OPT;
+
+/**
+ * @deprecated - this seems to be a no-op; it is no longer registered in IsisRunner/IsisWebServer
+ */
+@Deprecated
 public class OptionHandlerDebug extends OptionHandlerAbstract {
 
     public OptionHandlerDebug() {

http://git-wip-us.apache.org/repos/asf/isis/blob/56604143/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerDiagnostics.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerDiagnostics.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerDiagnostics.java
index 8285792..87ee3a2 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerDiagnostics.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerDiagnostics.java
@@ -19,8 +19,6 @@
 
 package org.apache.isis.core.runtime.runner.opts;
 
-import static org.apache.isis.core.runtime.runner.Constants.DIAGNOSTICS_OPT;
-
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.Options;
 
@@ -29,6 +27,12 @@ import org.apache.isis.core.runtime.optionhandler.BootPrinter;
 import org.apache.isis.core.runtime.optionhandler.OptionHandlerAbstract;
 import org.apache.isis.core.runtime.runner.Constants;
 
+import static org.apache.isis.core.runtime.runner.Constants.DIAGNOSTICS_OPT;
+
+/**
+ * @deprecated - this seems to be a no-op; it is no longer registered in IsisRunner/IsisWebServer
+ */
+@Deprecated
 public class OptionHandlerDiagnostics extends OptionHandlerAbstract {
 
     public OptionHandlerDiagnostics() {

http://git-wip-us.apache.org/repos/asf/isis/blob/56604143/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerNoSplash.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerNoSplash.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerNoSplash.java
index ca2f737..9ae4849 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerNoSplash.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerNoSplash.java
@@ -19,9 +19,6 @@
 
 package org.apache.isis.core.runtime.runner.opts;
 
-import static org.apache.isis.core.runtime.runner.Constants.NO_SPLASH_LONG_OPT;
-import static org.apache.isis.core.runtime.runner.Constants.NO_SPLASH_OPT;
-
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.Options;
 
@@ -30,6 +27,13 @@ import org.apache.isis.core.runtime.optionhandler.BootPrinter;
 import org.apache.isis.core.runtime.optionhandler.OptionHandlerAbstract;
 import org.apache.isis.core.runtime.system.SystemConstants;
 
+import static org.apache.isis.core.runtime.runner.Constants.NO_SPLASH_LONG_OPT;
+import static org.apache.isis.core.runtime.runner.Constants.NO_SPLASH_OPT;
+
+/**
+ * @deprecated - this seems to be a no-op; it is no longer registered in IsisRunner/IsisWebServer
+ */
+@Deprecated
 public class OptionHandlerNoSplash extends OptionHandlerAbstract {
 
     private boolean noSplash;

http://git-wip-us.apache.org/repos/asf/isis/blob/56604143/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerQuiet.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerQuiet.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerQuiet.java
index a030073..1c71102 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerQuiet.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerQuiet.java
@@ -19,8 +19,6 @@
 
 package org.apache.isis.core.runtime.runner.opts;
 
-import static org.apache.isis.core.runtime.runner.Constants.QUIET_OPT;
-
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.Options;
 
@@ -28,6 +26,12 @@ import org.apache.isis.core.commons.config.IsisConfigurationBuilder;
 import org.apache.isis.core.runtime.optionhandler.BootPrinter;
 import org.apache.isis.core.runtime.optionhandler.OptionHandlerAbstract;
 
+import static org.apache.isis.core.runtime.runner.Constants.QUIET_OPT;
+
+/**
+ * @deprecated - this seems to be a no-op; it is no longer registered in IsisRunner/IsisWebServer
+ */
+@Deprecated
 public class OptionHandlerQuiet extends OptionHandlerAbstract {
 
     public OptionHandlerQuiet() {

http://git-wip-us.apache.org/repos/asf/isis/blob/56604143/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerReflector.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerReflector.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerReflector.java
index ca793e4..80066fd 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerReflector.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerReflector.java
@@ -19,9 +19,6 @@
 
 package org.apache.isis.core.runtime.runner.opts;
 
-import static org.apache.isis.core.runtime.runner.Constants.REFLECTOR_LONG_OPT;
-import static org.apache.isis.core.runtime.runner.Constants.REFLECTOR_OPT;
-
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.OptionBuilder;
@@ -35,6 +32,13 @@ import org.apache.isis.core.runtime.optionhandler.OptionHandlerAbstract;
 import org.apache.isis.core.runtime.runner.Constants;
 import org.apache.isis.core.runtime.system.SystemConstants;
 
+import static org.apache.isis.core.runtime.runner.Constants.REFLECTOR_LONG_OPT;
+import static org.apache.isis.core.runtime.runner.Constants.REFLECTOR_OPT;
+
+/**
+ * @deprecated - far better to use `isis.reflector.facets.include` and `isis.reflector.facets.exclude`; no longer registered in IsisRunner/IsisWebServer
+ */
+@Deprecated
 public class OptionHandlerReflector extends OptionHandlerAbstract {
 
     private final InstallerRepository installerRepository;

http://git-wip-us.apache.org/repos/asf/isis/blob/56604143/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerVerbose.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerVerbose.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerVerbose.java
index 3c33ec7..c2c5da1 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerVerbose.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/runner/opts/OptionHandlerVerbose.java
@@ -19,8 +19,6 @@
 
 package org.apache.isis.core.runtime.runner.opts;
 
-import static org.apache.isis.core.runtime.runner.Constants.VERBOSE_OPT;
-
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.Options;
 
@@ -28,6 +26,12 @@ import org.apache.isis.core.commons.config.IsisConfigurationBuilder;
 import org.apache.isis.core.runtime.optionhandler.BootPrinter;
 import org.apache.isis.core.runtime.optionhandler.OptionHandlerAbstract;
 
+import static org.apache.isis.core.runtime.runner.Constants.VERBOSE_OPT;
+
+/**
+ * @deprecated - this seems to be a no-op; it is no longer registered in IsisRunner/IsisWebServer
+ */
+@Deprecated
 public class OptionHandlerVerbose extends OptionHandlerAbstract {
 
     public OptionHandlerVerbose() {

http://git-wip-us.apache.org/repos/asf/isis/blob/56604143/core/webserver/src/main/java/org/apache/isis/core/webserver/WebServer.java
----------------------------------------------------------------------
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
index 98faa5f..d2e3482 100644
--- 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
@@ -33,10 +33,8 @@ import org.apache.isis.core.commons.config.IsisConfigurationBuilderDefault;
 import org.apache.isis.core.commons.lang.ArrayExtensions;
 import org.apache.isis.core.runtime.runner.Constants;
 import org.apache.isis.core.runtime.runner.IsisRunner;
-import org.apache.isis.core.webserver.internal.OptionHandlerAddress;
 import org.apache.isis.core.webserver.internal.OptionHandlerDeploymentTypeWebServer;
 import org.apache.isis.core.webserver.internal.OptionHandlerPort;
-import org.apache.isis.core.webserver.internal.OptionHandlerResourceBase;
 import org.apache.isis.core.webserver.internal.OptionHandlerStartupMode;
 
 public class WebServer {
@@ -111,11 +109,18 @@ public class WebServer {
     }
 
     private void addOptionHandlersAndValidators(IsisRunner runner) {
+
         // adjustments
         runner.addOptionHandler(new OptionHandlerPort());
-        runner.addOptionHandler(new OptionHandlerAddress());
-        runner.addOptionHandler(new OptionHandlerResourceBase());
-        runner.addOptionHandler(new OptionHandlerStartupMode());
+
+        // unused
+        // runner.addOptionHandler(new OptionHandlerAddress());
+
+        // too obscure
+        // runner.addOptionHandler(new OptionHandlerResourceBase());
+
+        // REVIEW: clashes with -a flag.
+        //runner.addOptionHandler(new OptionHandlerStartupMode());
     }
 
     public void stop() {

http://git-wip-us.apache.org/repos/asf/isis/blob/56604143/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerAddress.java
----------------------------------------------------------------------
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
index c11ecec..ef1512e 100644
--- 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
@@ -32,6 +32,10 @@ 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";

http://git-wip-us.apache.org/repos/asf/isis/blob/56604143/core/webserver/src/main/java/org/apache/isis/core/webserver/internal/OptionHandlerResourceBase.java
----------------------------------------------------------------------
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
index c7b6952..5000fd1 100644
--- 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
@@ -29,6 +29,10 @@ 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";


[3/4] isis git commit: ISIS-848: a couple of additional fixes from the tidy-up of defunct cmd lines of WebServer.

Posted by da...@apache.org.
ISIS-848: a couple of additional fixes from the tidy-up of defunct cmd lines of WebServer.


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/8f461506
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/8f461506
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/8f461506

Branch: refs/heads/master
Commit: 8f4615067cb51dac3695d3f4ec28273dff4414ec
Parents: c2e7852
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Aug 14 12:24:20 2015 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Aug 14 12:24:20 2015 +0100

----------------------------------------------------------------------
 .../core/runtime/system/SystemConstants.java    | 32 +++++++++++++++++++-
 .../apache/isis/core/webserver/WebServer.java   | 15 ++-------
 2 files changed, 33 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/8f461506/core/runtime/src/main/java/org/apache/isis/core/runtime/system/SystemConstants.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/SystemConstants.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/SystemConstants.java
index b64b746..83e209e 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/SystemConstants.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/SystemConstants.java
@@ -41,18 +41,25 @@ public final class SystemConstants {
      * <p>
      * Use {@link DeploymentType#lookup(String)} to decode.
      */
-
     public static final String DEPLOYMENT_TYPE_KEY = ConfigurationConstants.ROOT + "deploymentType";
+
+
     /**
      * Key used to lookup {@link SpecificationLoaderSpi specification Loader} in
      * {@link IsisConfiguration}, and root for any
      * {@link ObjectReflectorInstaller reflector}-specific configuration keys.
+     *
+     * @deprecated
      */
+    @Deprecated
     public final static String REFLECTOR_KEY = ConfigurationConstants.ROOT + ObjectReflectorInstaller.TYPE;
     
     /**
      * Default for {@link #REFLECTOR_KEY}
+     *
+     * @deprecated
      */
+    @Deprecated
     public static final String REFLECTOR_DEFAULT = "java";
 
 
@@ -61,10 +68,24 @@ public final class SystemConstants {
      * {@link IsisConfiguration}, and root for any
      * {@link PersistenceMechanismInstaller persistor}-specific configuration
      * keys.
+     *
+     * @deprecated
      */
+    @Deprecated
     public final static String OBJECT_PERSISTOR_INSTALLER_KEY = ConfigurationConstants.ROOT + PersistenceMechanismInstaller.TYPE;
 
+    /**
+     *
+     * @deprecated
+     */
+    @Deprecated
     public static final String OBJECT_PERSISTOR_KEY = OBJECT_PERSISTOR_INSTALLER_KEY;
+
+    /**
+     *
+     * @deprecated
+     */
+    @Deprecated
     public static final String OBJECT_PERSISTOR_DEFAULT = "datanucleus";
 
 
@@ -128,13 +149,19 @@ public final class SystemConstants {
     /**
      * Key by which requested user (eg via command line) is made available in
      * {@link IsisConfiguration} .
+     *
+     * @deprecated
      */
+    @Deprecated
     public final static String USER_KEY = ConfigurationConstants.ROOT + "user";
 
     /**
      * Key by which requested password (eg via command line) is made available
      * in {@link IsisConfiguration}.
+     *
+     * @deprecated
      */
+    @Deprecated
     public final static String PASSWORD_KEY = ConfigurationConstants.ROOT + "password";
 
     /**
@@ -143,7 +170,10 @@ public final class SystemConstants {
      * 
      * <p>
      * Use {@link Splash#valueOf(String)} to decode.
+     *
+     * @deprecated
      */
+    @Deprecated
     public static final String NOSPLASH_KEY = ConfigurationConstants.ROOT + "nosplash";
 
     public static final String LOCALE_KEY = ConfigurationConstants.ROOT + "locale";

http://git-wip-us.apache.org/repos/asf/isis/blob/8f461506/core/webserver/src/main/java/org/apache/isis/core/webserver/WebServer.java
----------------------------------------------------------------------
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
index d2e3482..5fd37a0 100644
--- 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
@@ -31,11 +31,9 @@ import org.eclipse.jetty.webapp.WebAppContext;
 
 import org.apache.isis.core.commons.config.IsisConfigurationBuilderDefault;
 import org.apache.isis.core.commons.lang.ArrayExtensions;
-import org.apache.isis.core.runtime.runner.Constants;
 import org.apache.isis.core.runtime.runner.IsisRunner;
 import org.apache.isis.core.webserver.internal.OptionHandlerDeploymentTypeWebServer;
 import org.apache.isis.core.webserver.internal.OptionHandlerPort;
-import org.apache.isis.core.webserver.internal.OptionHandlerStartupMode;
 
 public class WebServer {
 
@@ -68,7 +66,8 @@ public class WebServer {
     public static void main(final String[] args) {
 //        System.out.println("press any key to start...");
 //        readLine();
-        new WebServer().run(ArrayExtensions.append(args, "--" + Constants.NO_SPLASH_LONG_OPT));
+//        final String[] args2 = ArrayExtensions.append(args, "--" + Constants.NO_SPLASH_LONG_OPT);
+        new WebServer().run(args);
     }
 
     private static void readLine() {
@@ -83,16 +82,6 @@ public class WebServer {
         }
     }
 
-    /**
-     * Originally introduced to allow the WebServer to be used by tests.
-     */
-    public void run(final int port) {
-        String[] args = new String[0];
-        args = OptionHandlerStartupMode.appendArg(args, StartupMode.BACKGROUND);
-        args = OptionHandlerPort.appendArg(args, port);
-        run(args);
-    }
-
     public void run(final String[] args) {
         final IsisRunner runner = new IsisRunner(args, new OptionHandlerDeploymentTypeWebServer());
         addOptionHandlersAndValidators(runner);


[4/4] isis git commit: ISIS-1052: recreating simpleapp archetype

Posted by da...@apache.org.
ISIS-1052: recreating simpleapp archetype


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/db8bad6c
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/db8bad6c
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/db8bad6c

Branch: refs/heads/master
Commit: db8bad6c839575e85aadcc92bc5688cb2049153c
Parents: 8f46150
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Aug 14 12:25:14 2015 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Aug 14 12:25:14 2015 +0100

----------------------------------------------------------------------
 .../simpleapp/src/main/resources/archetype-resources/pom.xml   | 6 +++---
 .../src/main/resources/archetype-resources/webapp/pom.xml      | 5 ++---
 .../src/test/resources/projects/basic/archetype.properties     | 2 +-
 3 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/db8bad6c/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
index 7b122fc..8d93813 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
@@ -182,9 +182,9 @@
                 </plugin>
 
                 <plugin>
-                    <groupId>org.mortbay.jetty</groupId>
-                    <artifactId>maven-jetty-plugin</artifactId>
-                    <version>6.1.26</version>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-maven-plugin</artifactId>
+                    <version>9.3.2.v20150730</version>
                 </plugin>
 
                 <plugin>

http://git-wip-us.apache.org/repos/asf/isis/blob/db8bad6c/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/pom.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/pom.xml
index b265693..93a332c 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/pom.xml
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/pom.xml
@@ -39,8 +39,8 @@
     <build>
         <plugins>
             <plugin>
-                <groupId>org.mortbay.jetty</groupId>
-                <artifactId>maven-jetty-plugin</artifactId>
+                <groupId>org.eclipse.jetty</groupId>
+                <artifactId>jetty-maven-plugin</artifactId>
             </plugin>
 
             <!-- mvn package -->
@@ -167,7 +167,6 @@
             <optional>true</optional>
         </dependency>
 
-
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-servlet_3.0_spec</artifactId>

http://git-wip-us.apache.org/repos/asf/isis/blob/db8bad6c/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties b/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties
index 91afb8b..72c89da 100644
--- a/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties
+++ b/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties
@@ -1,4 +1,4 @@
-#Tue Aug 11 23:02:09 BST 2015
+#Fri Aug 14 12:25:04 BST 2015
 package=it.pkg
 version=0.1-SNAPSHOT
 groupId=archetype.it


[2/4] isis git commit: ISIS-1052: upgrading simpleapp to use jetty-maven-plugin ...

Posted by da...@apache.org.
ISIS-1052: upgrading simpleapp to use jetty-maven-plugin ...

... rather than the abandoned maven-jetty-plugin


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/c2e7852e
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/c2e7852e
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/c2e7852e

Branch: refs/heads/master
Commit: c2e7852e0588b8895867ef723fbf4b32a5821d06
Parents: 5660414
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri Aug 14 12:02:06 2015 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri Aug 14 12:02:06 2015 +0100

----------------------------------------------------------------------
 example/application/simpleapp/pom.xml        | 6 +++---
 example/application/simpleapp/webapp/pom.xml | 5 ++---
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/c2e7852e/example/application/simpleapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/pom.xml b/example/application/simpleapp/pom.xml
index 16cead4..b6da9a8 100644
--- a/example/application/simpleapp/pom.xml
+++ b/example/application/simpleapp/pom.xml
@@ -186,9 +186,9 @@
                 </plugin>
 
                 <plugin>
-                    <groupId>org.mortbay.jetty</groupId>
-                    <artifactId>maven-jetty-plugin</artifactId>
-                    <version>6.1.26</version>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-maven-plugin</artifactId>
+                    <version>9.3.2.v20150730</version>
                 </plugin>
 
                 <plugin>

http://git-wip-us.apache.org/repos/asf/isis/blob/c2e7852e/example/application/simpleapp/webapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/pom.xml b/example/application/simpleapp/webapp/pom.xml
index 4826684..6cfb656 100644
--- a/example/application/simpleapp/webapp/pom.xml
+++ b/example/application/simpleapp/webapp/pom.xml
@@ -40,8 +40,8 @@
     <build>
         <plugins>
             <plugin>
-                <groupId>org.mortbay.jetty</groupId>
-                <artifactId>maven-jetty-plugin</artifactId>
+                <groupId>org.eclipse.jetty</groupId>
+                <artifactId>jetty-maven-plugin</artifactId>
             </plugin>
 
             <!-- mvn package -->
@@ -176,7 +176,6 @@
             <optional>true</optional>
         </dependency>
 
-
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-servlet_3.0_spec</artifactId>