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/12 14:26:05 UTC
[isis] 03/04: ISIS-1811: recreating helloworld archetype
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch release-2.0.0-M2-RC1
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 7d4ee2d89e4e0d22eef0b29f004fa15ec0c03bdb
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Sat Jan 12 14:15:39 2019 +0000
ISIS-1811: recreating helloworld archetype
---
example/archetype/helloworld/pom.xml | 10 +-
.../appended-resources/supplemental-models.xml | 26 ++
.../META-INF/maven/archetype-metadata.xml | 11 +-
.../src/main/resources/archetype-resources/pom.xml | 62 ++++-
.../org.apache.isis.core.commons.config.AppConfig | 1 +
.../application/HelloWorldAppManifest.java | 11 +-
.../application/isis-non-changing.properties | 4 +-
.../java/domainapp/application/menubars.layout.xml | 11 +-
.../java/domainapp/dom/impl/HelloWorldObjects.java | 20 +-
.../src/main/webapp/WEB-INF/isis.properties | 12 +-
.../src/main/webapp/WEB-INF/logging.properties | 6 +-
.../src/main/webapp/WEB-INF/web.xml | 296 +--------------------
.../src/main/webapp/about/index.html | 2 +-
.../resources/projects/basic/archetype.properties | 2 +-
14 files changed, 143 insertions(+), 331 deletions(-)
diff --git a/example/archetype/helloworld/pom.xml b/example/archetype/helloworld/pom.xml
index 6d735fe..6909e59 100644
--- a/example/archetype/helloworld/pom.xml
+++ b/example/archetype/helloworld/pom.xml
@@ -21,7 +21,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.isis.archetype</groupId>
<artifactId>helloworld-archetype</artifactId>
- <version>2.0.0-M1</version>
+ <version>2.0.0-M2</version>
<packaging>maven-archetype</packaging>
<name>helloworld-archetype</name>
<build>
@@ -67,10 +67,10 @@
<url>git@github.com:incodehq/incode-build.git/helloworld</url>
</scm>
<parent>
- <groupId>org.apache</groupId>
- <artifactId>apache</artifactId>
- <version>18</version>
- <relativePath/>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis</artifactId>
+ <version>2.0.0-M2</version>
+ <relativePath>../../../core/pom.xml</relativePath>
</parent>
<properties>
<archetype.test.skip>true</archetype.test.skip>
diff --git a/example/archetype/helloworld/src/main/appended-resources/supplemental-models.xml b/example/archetype/helloworld/src/main/appended-resources/supplemental-models.xml
new file mode 100644
index 0000000..01c58d8
--- /dev/null
+++ b/example/archetype/helloworld/src/main/appended-resources/supplemental-models.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<supplementalDataModels
+ xmlns="http://maven.apache.org/supplemental-model/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/supplemental-model/1.0.0
+ http://maven.apache.org/xsd/supplemental-model-1.0.0.xsd">
+
+</supplementalDataModels>
diff --git a/example/archetype/helloworld/src/main/resources/META-INF/maven/archetype-metadata.xml b/example/archetype/helloworld/src/main/resources/META-INF/maven/archetype-metadata.xml
index b171ac5..234a023 100644
--- a/example/archetype/helloworld/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/example/archetype/helloworld/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -30,6 +30,7 @@
<fileSet encoding="UTF-8">
<directory>src/main/java</directory>
<includes>
+ <include>**/*.AppConfig</include>
<include>**/*.png</include>
</includes>
</fileSet>
@@ -45,11 +46,7 @@
<directory>src/main/webapp</directory>
<includes>
<include>**/*.css</include>
- <include>**/*.ico</include>
- <include>**/*.gif</include>
<include>**/*.ini</include>
- <include>**/*.md</include>
- <include>**/*.ttf</include>
<include>**/*.png</include>
<include>**/*.js</include>
</includes>
@@ -61,6 +58,12 @@
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
+ <directory>.m2</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" encoding="UTF-8">
<directory/>
<includes>
<include>logging-dn-enhance.properties</include>
diff --git a/example/archetype/helloworld/src/main/resources/archetype-resources/pom.xml b/example/archetype/helloworld/src/main/resources/archetype-resources/pom.xml
index 378d84a..c536900 100644
--- a/example/archetype/helloworld/src/main/resources/archetype-resources/pom.xml
+++ b/example/archetype/helloworld/src/main/resources/archetype-resources/pom.xml
@@ -16,8 +16,7 @@
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
@@ -35,13 +34,29 @@
<packaging>war</packaging>
<properties>
- <revision>2.0.0-M1</revision>
+ <revision>2.0.0-M2</revision>
<isis.version>${revision}</isis.version>
<compiler-plugin.source>1.8</compiler-plugin.source>
<compiler-plugin.target>1.8</compiler-plugin.target>
<compiler-plugin.compilerArgument>-parameters</compiler-plugin.compilerArgument>
+ <!-- override incode-build -->
+ <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
+ <jetty-maven-plugin.version>9.4.12.v20180830</jetty-maven-plugin.version>
+
+ <!-- override incode-build (see dn5-xxx.version in isis-core-plugins-jdo-datanucleus-5) -->
+ <datanucleus-api-jdo.version>5.2.0-m2</datanucleus-api-jdo.version>
+ <datanucleus-core.version>5.2.0-m2</datanucleus-core.version>
+ <datanucleus-jodatime.version>5.2.0-m1</datanucleus-jodatime.version>
+ <hsqldb.version>2.4.1</hsqldb.version>
+
+ <!-- override incode-build -->
+ <maven-surefire-plugin.version>2.22.1</maven-surefire-plugin.version>
+ <maven-surefire-report-plugin.version>2.22.1</maven-surefire-report-plugin.version>
+
+ <failOnMissingWebXml>false</failOnMissingWebXml>
+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
@@ -51,6 +66,13 @@
<build>
<resources>
<resource>
+ <filtering>true</filtering>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </resource>
+ <resource>
<directory>src/main/java</directory>
<includes>
<include>**</include>
@@ -138,11 +160,44 @@
<artifactId>isis-core-applib</artifactId>
</dependency>
+
+ <!-- ISIS CORE PLUGINS -->
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-plugins-codegen-bytebuddy</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-plugins-discovery-reflections</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-plugins-jdo-datanucleus-5</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-plugins-eventbus-axon</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-plugins-jaxrs-resteasy-3</artifactId>
+ </dependency>
+
<!-- OTHER DEPENDENCIES -->
+<!--
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
</dependency>
+-->
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ </dependency>
<dependency>
<groupId>org.apache.isis.mavendeps</groupId>
@@ -250,5 +305,4 @@
</profile>
</profiles>
->>>>>>> release-1.17.0-RC3
</project>
diff --git a/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/META-INF/services/org.apache.isis.core.commons.config.AppConfig b/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/META-INF/services/org.apache.isis.core.commons.config.AppConfig
new file mode 100644
index 0000000..1756fe8
--- /dev/null
+++ b/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/META-INF/services/org.apache.isis.core.commons.config.AppConfig
@@ -0,0 +1 @@
+domainapp.application.HelloWorldAppManifest
\ No newline at end of file
diff --git a/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/application/HelloWorldAppManifest.java b/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/application/HelloWorldAppManifest.java
index 236536b..d5e5b38 100644
--- a/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/application/HelloWorldAppManifest.java
+++ b/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/application/HelloWorldAppManifest.java
@@ -22,13 +22,16 @@
package domainapp.application;
import org.apache.isis.applib.AppManifestAbstract2;
+import org.apache.isis.config.AppConfig;
+import org.apache.isis.config.IsisConfiguration;
import domainapp.dom.HelloWorldModule;
/**
* Bootstrap the application.
*/
-public class HelloWorldAppManifest extends AppManifestAbstract2 {
+@javax.ejb.Singleton // only if you want AppConfig to be managed by CDI (if available), otherwise not required
+public class HelloWorldAppManifest extends AppManifestAbstract2 implements AppConfig {
public static final Builder BUILDER = Builder
.forModule(new HelloWorldModule())
@@ -40,4 +43,10 @@ public class HelloWorldAppManifest extends AppManifestAbstract2 {
super(BUILDER);
}
+ // Implementing AppConfig, to tell the framework how to bootstrap the configuration.
+ @Override
+ public IsisConfiguration isisConfiguration () {
+ return IsisConfiguration.buildFromAppManifest(this);
+ }
+
}
diff --git a/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/application/isis-non-changing.properties b/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/application/isis-non-changing.properties
index 5e116c7..d1f5123 100644
--- a/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/application/isis-non-changing.properties
+++ b/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/application/isis-non-changing.properties
@@ -19,7 +19,7 @@ ${symbol_pound} specific language governing permissions and limitations
${symbol_pound} under the License.
-${symbol_pound} -- auto wired by plugins --
+${symbol_pound} -- auto wired by plugins --
${symbol_pound}isis.services.eventbus.implementation=guava
${symbol_pound}isis.services.eventbus.implementation=axon
@@ -45,7 +45,6 @@ isis.reflector.explicitAnnotations.action=true
isis.objects.editing=false
-
isis.viewer.wicket.application.name=Hello World App
isis.viewer.wicket.application.css=css/application.css
isis.viewer.wicket.application.js=scripts/application.js
@@ -61,7 +60,6 @@ isis.viewer.wicket.themes.showChooser=yes
isis.viewer.wicket.themes.enabled=Cosmo,Flatly,Darkly,Sandstone,United
-
isis.viewer.wicket.maxTitleLengthInStandaloneTables=0
isis.viewer.wicket.maxTitleLengthInParentedTables=0
diff --git a/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/application/menubars.layout.xml b/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/application/menubars.layout.xml
index f453cb5..0b18956 100644
--- a/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/application/menubars.layout.xml
+++ b/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/application/menubars.layout.xml
@@ -63,12 +63,12 @@
</mb3:serviceAction>
</mb3:section>
<mb3:section>
- <mb3:serviceAction objectType="isisApplib.MetaModelServicesMenu" id="downloadMetaModel">
- <cpt:named>Download Meta Model (CSV)</cpt:named>
- </mb3:serviceAction>
<mb3:serviceAction objectType="isisApplib.MetaModelServicesMenu" id="downloadMetaModelXml">
<cpt:named>Download Meta Model (XML)</cpt:named>
</mb3:serviceAction>
+ <mb3:serviceAction objectType="isisApplib.MetaModelServicesMenu" id="downloadMetaModelCsv">
+ <cpt:named>Download Meta Model (CSV)</cpt:named>
+ </mb3:serviceAction>
</mb3:section>
<mb3:section>
<mb3:serviceAction objectType="isisApplib.SwaggerServiceMenu" id="openSwaggerUi">
@@ -99,6 +99,9 @@
<mb3:serviceAction objectType="isisApplib.HsqlDbManagerMenu" id="hsqlDbManager">
<cpt:named>HSQL DB Manager</cpt:named>
</mb3:serviceAction>
+ <mb3:serviceAction objectType="isisApplib.H2ManagerMenu" id="openH2Console">
+ <cpt:named>H2 Console</cpt:named>
+ </mb3:serviceAction>
</mb3:section>
</mb3:menu>
</mb3:secondary>
@@ -106,7 +109,7 @@
<mb3:menu>
<mb3:named>Configuration Service Menu</mb3:named>
<mb3:section>
- <mb3:serviceAction objectType="isisApplib.ConfigurationServiceMenu" id="configuration">
+ <mb3:serviceAction objectType="isisApplib.ConfigurationMenu" id="configuration">
<cpt:named>Configuration</cpt:named>
</mb3:serviceAction>
</mb3:section>
diff --git a/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/dom/impl/HelloWorldObjects.java b/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/dom/impl/HelloWorldObjects.java
index 5b49fed..d305490 100644
--- a/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/dom/impl/HelloWorldObjects.java
+++ b/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/java/domainapp/dom/impl/HelloWorldObjects.java
@@ -26,16 +26,17 @@ import java.util.List;
import javax.jdo.JDOQLTypedQuery;
import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.MemberOrder;
import org.apache.isis.applib.annotation.NatureOfService;
-import org.apache.isis.applib.annotation.Parameter;
-import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.PromptStyle;
import org.apache.isis.applib.annotation.RestrictTo;
import org.apache.isis.applib.annotation.SemanticsOf;
import org.apache.isis.applib.services.jdosupport.IsisJdoSupport_v3_2;
import org.apache.isis.applib.services.repository.RepositoryService;
+import domainapp.dom.types.Name;
+
@DomainService(
nature = NatureOfService.VIEW_MENU_ONLY,
objectType = "${artifactId}.HelloWorldObjects"
@@ -43,20 +44,16 @@ import org.apache.isis.applib.services.repository.RepositoryService;
public class HelloWorldObjects {
@Action(semantics = SemanticsOf.NON_IDEMPOTENT)
- @MemberOrder(sequence = "1")
+ @ActionLayout(promptStyle = PromptStyle.DIALOG_MODAL)
public HelloWorldObject create(
- @Parameter(maxLength = 40)
- @ParameterLayout(named = "Name")
- final String name) {
+ @Name final String name) {
return repositoryService.persist(new HelloWorldObject(name));
}
@Action(semantics = SemanticsOf.SAFE)
- @MemberOrder(sequence = "2")
+ @ActionLayout(promptStyle = PromptStyle.DIALOG_SIDEBAR)
public List<HelloWorldObject> findByName(
- @Parameter(maxLength = 40)
- @ParameterLayout(named = "Name")
- final String name) {
+ @Name final String name) {
JDOQLTypedQuery<HelloWorldObject> q = isisJdoSupport.newTypesafeQuery(HelloWorldObject.class);
final QHelloWorldObject cand = QHelloWorldObject.candidate();
q = q.filter(
@@ -67,7 +64,6 @@ public class HelloWorldObjects {
}
@Action(semantics = SemanticsOf.SAFE, restrictTo = RestrictTo.PROTOTYPING)
- @MemberOrder(sequence = "3")
public List<HelloWorldObject> listAll() {
return repositoryService.allInstances(HelloWorldObject.class);
}
diff --git a/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/isis.properties b/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/isis.properties
index 1c54efb..0a970b9 100644
--- a/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/isis.properties
+++ b/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/isis.properties
@@ -47,9 +47,13 @@ ${symbol_pound} (also update the pom.xml to reference the appropriate JDBC drive
${symbol_pound}
${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pou [...]
-isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=org.hsqldb.jdbcDriver
-isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:hsqldb:mem:test
-isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=sa
-isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=
+${symbol_pound}isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=org.hsqldb.jdbcDriver
+${symbol_pound}isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:hsqldb:mem:test
+${symbol_pound}isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=sa
+${symbol_pound}isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=
+isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=org.h2.Driver
+isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:h2:mem:test
+isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=sa
+isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=
diff --git a/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/logging.properties b/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/logging.properties
index 9bb482d..430a370 100644
--- a/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/logging.properties
+++ b/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/logging.properties
@@ -117,8 +117,6 @@ log4j.logger.org.apache.isis.core.runtime.threadpool.ThreadPoolSupport=DEBUG,Thr
log4j.additivity.org.apache.isis.core.runtime.threadpool.ThreadPoolSupport=false
-
-
! turn on the internal log4j debugging flag so we can see what it is doing
${symbol_pound}log4j.debug=true
@@ -243,5 +241,5 @@ log4j.additivity.dom.simple.SimpleObject=false
${symbol_pound} ERROR to suppress the WARNings we get as of 1.15.0
-log4j.logger.org.apache.wicket.page.PartialPageUpdate=ERROR,Console
-log4j.additivity.org.apache.wicket.page.PartialPageUpdate=false
+log4j.logger.org.apache.wicket.page.XmlPartialPageUpdate=ERROR,Console
+log4j.additivity.org.apache.wicket.page.XmlPartialPageUpdate=false
diff --git a/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml b/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
index a807cb8..081a738 100644
--- a/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
+++ b/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml
@@ -31,302 +31,22 @@
<welcome-file>about/index.html</welcome-file>
</welcome-file-list>
- <!-- shiro security configuration -->
<listener>
- <listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
+ <listener-class>org.apache.isis.core.webapp.IsisWebAppContextListener</listener-class>
</listener>
- <filter>
- <filter-name>ShiroFilter</filter-name>
- <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>ShiroFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
-
-
- <!-- which configuration directory to read overloaded property files from -->
- <!--
- By default the framework will read configuration properties from the WEB-INF
- directory (where this web.xml file resides).
-
- If you want to read configuration files from some other external directory,
- and the location of that external directory is the same/standardized for all
- locations where you intend to deploy the WAR file, you can uncomment the
- 'isis.config.dir' context parameter, below, and set it to that standardized
- location, eg:
-
- <context-param>
- <param-name>isis.config.dir</param-name>
- <param-value>/usr/local/conf</param-value>
- </context-param>
-
- If however the location of the external directory changes from one deployment
- to another (eg system testing, UAT, production etc) then you should be
- able to override the context parameter through the servlet container's own
- (proprietary) configuration files.
-
- For example, if deploying to Tomcat, you can edit ${symbol_dollar}CATALINA_BASE/conf/context.xml,
- and add:
-
- <Parameter name="isis.config.dir"
- value="/usr/local/conf/systest"
- override="false"/>
-
- For more detail see: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html${symbol_pound}Context_Parameters
- -->
-
-
- <!--
- determines which additional configuration files to search for
- -->
- <context-param>
- <param-name>isis.viewers</param-name>
- <param-value>wicket,restfulobjects</param-value>
- </context-param>
-
-
-
- <!--
- for diagnostics
- -->
- <filter>
- <filter-name>IsisLogOnExceptionFilter</filter-name>
- <filter-class>org.apache.isis.core.webapp.diagnostics.IsisLogOnExceptionFilter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>IsisLogOnExceptionFilter</filter-name>
- <url-pattern>/wicket/*</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>IsisLogOnExceptionFilter</filter-name>
- <url-pattern>/restful/*</url-pattern>
- </filter-mapping>
-
-
-
- <!-- cache static resources for 1 day -->
- <filter>
- <filter-name>ResourceCachingFilter</filter-name>
- <filter-class>org.apache.isis.core.webapp.content.ResourceCachingFilter</filter-class>
- <init-param>
- <param-name>CacheTime</param-name>
- <param-value>86400</param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.css</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.png</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.jpg</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.jpeg</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.gif</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.svg</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.js</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.html</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.swf</url-pattern>
- </filter-mapping>
-
- <servlet>
- <servlet-name>Resource</servlet-name>
- <servlet-class>org.apache.isis.core.webapp.content.ResourceServlet</servlet-class>
- </servlet>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.css</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.png</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.jpg</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.jpeg</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.gif</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.svg</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.js</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.html</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.swf</url-pattern>
- </servlet-mapping>
-
-
<servlet>
- <servlet-name>WebjarsServlet</servlet-name>
- <servlet-class>org.webjars.servlet.WebjarsServlet</servlet-class>
- <init-param>
- <param-name>disableCache</param-name>
- <param-value>false</param-value>
- </init-param>
- <load-on-startup>2</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>WebjarsServlet</servlet-name>
- <url-pattern>/webjars/*</url-pattern>
- </servlet-mapping>
-
-
-
- <!--
- -
- - config specific to the wicket-viewer
- -
- -->
- <filter>
- <filter-name>WicketFilter</filter-name>
- <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
- <init-param>
- <param-name>applicationClassName</param-name>
- <param-value>org.apache.isis.viewer.wicket.viewer.IsisWicketApplication</param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <filter-name>WicketFilter</filter-name>
- <url-pattern>/wicket/*</url-pattern>
- </filter-mapping>
-
-
- <context-param>
- <param-name>configuration</param-name>
- <!--
- <param-value>deployment</param-value>
- -->
- <param-value>development</param-value>
- </context-param>
-
-
- <!--
- -
- - config specific to the restfulobjects-viewer
- -
- -->
-
- <!--
- THE FOLLOWING CONFIGURATION IS NOT REQUIRED IF THE WICKET VIEWER IS IN USE.
- IF THE WICKET VIEWER CONFIGURATION IS REMOVED, THEN UNCOMMENT
-
- <listener>
- <listener-class>org.apache.isis.core.webapp.IsisWebAppBootstrapper</listener-class>
- </listener>
-
- <context-param>
- <param-name>deploymentType</param-name>
- <param-value>SERVER_PROTOTYPE</param-value>
- </context-param>
-
- <context-param>
- <param-name>isis.viewers</param-name>
- <param-value>restfulobjects</param-value>
- </context-param>
- -->
-
- <!-- bootstrap the RestEasy framework -->
- <listener>
- <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
- </listener>
-
- <!-- used by RestEasy to determine the JAX-RS resources and other related configuration -->
- <context-param>
- <param-name>javax.ws.rs.Application</param-name>
- <param-value>org.apache.isis.viewer.restfulobjects.server.RestfulObjectsApplication</param-value>
- </context-param>
-
- <context-param>
- <param-name>resteasy.servlet.mapping.prefix</param-name>
- <param-value>/restful/</param-value>
- </context-param>
-
-
- <!-- authenticate user, set up an Isis session -->
- <filter>
- <filter-name>IsisSessionFilterForRestfulObjects</filter-name>
- <filter-class>org.apache.isis.core.webapp.IsisSessionFilter</filter-class>
- <!-- authentication required for REST -->
+ <servlet-name>H2Console</servlet-name>
+ <servlet-class>org.h2.server.web.WebServlet</servlet-class>
<init-param>
- <param-name>authenticationSessionStrategy</param-name>
- <param-value>org.apache.isis.viewer.restfulobjects.server.authentication.AuthenticationSessionStrategyBasicAuth</param-value>
+ <param-name>webAllowOthers</param-name>
+ <param-value>true</param-value>
</init-param>
- <init-param>
- <!-- what to do if no session was found... -->
- <param-name>whenNoSession</param-name>
- <!-- ... 401 and a basic authentication challenge if request originates from web browser -->
- <param-value>auto</param-value>
- </init-param>
- <init-param>
- <param-name>passThru</param-name>
- <param-value>/restful/swagger</param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <!-- this is mapped to the entire app; however the IsisSessionFilter will "notice" if the session filter has already been
- executed for the request pipeline, and if so will do nothing -->
- <filter-name>IsisSessionFilterForRestfulObjects</filter-name>
- <servlet-name>RestfulObjectsRestEasyDispatcher</servlet-name>
- </filter-mapping>
-
- <filter>
- <filter-name>IsisTransactionFilterForRestfulObjects</filter-name>
- <filter-class>org.apache.isis.viewer.restfulobjects.server.webapp.IsisTransactionFilterForRestfulObjects</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>IsisTransactionFilterForRestfulObjects</filter-name>
- <servlet-name>RestfulObjectsRestEasyDispatcher</servlet-name>
- </filter-mapping>
-
-
- <servlet>
- <servlet-name>RestfulObjectsRestEasyDispatcher</servlet-name>
- <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
+ <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
- <servlet-name>RestfulObjectsRestEasyDispatcher</servlet-name>
- <url-pattern>/restful/*</url-pattern>
+ <servlet-name>H2Console</servlet-name>
+ <url-pattern>/db/*</url-pattern>
</servlet-mapping>
-
</web-app>
diff --git a/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/webapp/about/index.html b/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/webapp/about/index.html
index f726b1c..fde61b5 100644
--- a/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/webapp/about/index.html
+++ b/example/archetype/helloworld/src/main/resources/archetype-resources/src/main/webapp/about/index.html
@@ -80,7 +80,7 @@ ${symbol_pound}wrapper {
<li>
<p>
<b>
- <a href="swagger-ui/index.html">swagger-ui/</a>
+ <a href="swagger-ui/index.template.html">swagger-ui/</a>
</b>
</p>
<p>
diff --git a/example/archetype/helloworld/src/test/resources/projects/basic/archetype.properties b/example/archetype/helloworld/src/test/resources/projects/basic/archetype.properties
index 25c6141..e5804d8 100644
--- a/example/archetype/helloworld/src/test/resources/projects/basic/archetype.properties
+++ b/example/archetype/helloworld/src/test/resources/projects/basic/archetype.properties
@@ -1,4 +1,4 @@
-#Wed Jan 02 10:09:45 GMT 2019
+#Sat Jan 12 14:15:35 GMT 2019
package=it.pkg
version=0.1-SNAPSHOT
groupId=archetype.it