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 2016/11/28 11:20:42 UTC
[7/7] isis git commit: ISIS-1538: recreating simpleapp archetype
ISIS-1538: 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/d05bc761
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/d05bc761
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/d05bc761
Branch: refs/heads/maint-1.13.2
Commit: d05bc76150c62116dbfdf5d46b0517a1a612dc7b
Parents: 0aef520
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Mon Nov 28 11:15:19 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon Nov 28 11:15:19 2016 +0000
----------------------------------------------------------------------
.../META-INF/maven/archetype-metadata.xml | 6 +-
.../resources/archetype-resources/README.adoc | 194 +++++
.../archetype-resources/_checks/checkstyle.xml | 290 +++++++
.../archetype-resources/_checks/pmd.xml | 49 ++
.../application/translations.pot | 2 +-
.../module-simple/build.gradle | 72 ++
.../archetype-resources/module-simple/gradlew | 164 ++++
.../module-simple/gradlew.bat | 90 +++
.../module-simple/layouts.gradle | 49 ++
.../module-simple/liveReload.gradle | 56 ++
.../module-simple/logging-dn-enhance.properties | 44 +
.../module-simple/logging-integtest.properties | 114 +++
.../archetype-resources/module-simple/pom.xml | 136 ++++
.../src/main/java/META-INF/persistence.xml | 29 +
.../modules/simple/SimpleModuleManifest.java | 76 ++
.../simple/dom/SimpleModuleDomSubmodule.java | 33 +
.../modules/simple/dom/impl/SimpleObject.java | 236 ++++++
.../simple/dom/impl/SimpleObject.layout.xml | 69 ++
.../modules/simple/dom/impl/SimpleObject.png | Bin 0 -> 653 bytes
.../simple/dom/impl/SimpleObjectMenu.java | 80 ++
.../simple/dom/impl/SimpleObjectRepository.java | 61 ++
.../fixture/SimpleModuleFixtureSubmodule.java | 27 +
.../fixture/data/SimpleObjectMenu_create.java | 61 ++
.../fixture/scenario/RecreateSimpleObjects.java | 79 ++
.../fixture/teardown/SimpleModuleTearDown.java | 39 +
.../impl/SimpleObjectRepository_UnitTest.java | 129 +++
.../simple/dom/impl/SimpleObject_UnitTest.java | 52 ++
.../SimpleModuleIntegTestAbstract.java | 84 ++
.../tests/SimpleObjectMenu_IntegTest.java | 152 ++++
.../tests/SimpleObject_IntegTest.java | 156 ++++
.../module-simple/translations.pot | 414 ++++++++++
.../modules/checks/checkstyle.xml | 290 -------
.../modules/checks/pmd-rulesets/basic.xml | 810 -------------------
.../modules/checks/pmd-rulesets/imports.xml | 148 ----
.../checks/pmd-rulesets/rulesets.properties | 4 -
.../modules/checks/pmd-rulesets/unusedcode.xml | 128 ---
.../archetype-resources/modules/checks/pmd.xml | 49 --
.../modules/module-simple/build.gradle | 72 --
.../modules/module-simple/gradlew | 164 ----
.../modules/module-simple/gradlew.bat | 90 ---
.../modules/module-simple/layouts.gradle | 49 --
.../modules/module-simple/liveReload.gradle | 56 --
.../module-simple/logging-dn-enhance.properties | 44 -
.../module-simple/logging-integtest.properties | 114 ---
.../modules/module-simple/pom.xml | 137 ----
.../src/main/java/META-INF/persistence.xml | 29 -
.../modules/simple/SimpleModuleManifest.java | 76 --
.../simple/dom/SimpleModuleDomSubmodule.java | 33 -
.../modules/simple/dom/impl/SimpleObject.java | 236 ------
.../simple/dom/impl/SimpleObject.layout.xml | 69 --
.../modules/simple/dom/impl/SimpleObject.png | Bin 653 -> 0 bytes
.../simple/dom/impl/SimpleObjectMenu.java | 80 --
.../simple/dom/impl/SimpleObjectRepository.java | 61 --
.../fixture/SimpleModuleFixtureSubmodule.java | 27 -
.../fixture/data/SimpleObjectMenu_create.java | 61 --
.../fixture/scenario/RecreateSimpleObjects.java | 79 --
.../fixture/teardown/SimpleModuleTearDown.java | 39 -
.../impl/SimpleObjectRepository_UnitTest.java | 129 ---
.../simple/dom/impl/SimpleObject_UnitTest.java | 52 --
.../SimpleModuleIntegTestAbstract.java | 84 --
.../tests/SimpleObjectMenu_IntegTest.java | 152 ----
.../tests/SimpleObject_IntegTest.java | 156 ----
.../modules/module-simple/translations.pot | 414 ----------
.../archetype-resources/pom-jdo-enhance-all.xml | 4 +-
.../projects/basic/archetype.properties | 2 +-
65 files changed, 3042 insertions(+), 3939 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/META-INF/maven/archetype-metadata.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/META-INF/maven/archetype-metadata.xml b/example/archetype/simpleapp/src/main/resources/META-INF/maven/archetype-metadata.xml
index 9fa5ed6..4939f89 100644
--- a/example/archetype/simpleapp/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/example/archetype/simpleapp/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -20,10 +20,9 @@
<archetype-descriptor xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0" name="simpleapp" xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<fileSets>
<fileSet filtered="true" encoding="UTF-8">
- <directory>modules/checks</directory>
+ <directory>_checks</directory>
<includes>
<include>**/*.xml</include>
- <include>**/*.properties</include>
</includes>
</fileSet>
<fileSet filtered="true" encoding="UTF-8">
@@ -37,11 +36,12 @@
<includes>
<include>.gitattributes</include>
<include>.gitignore</include>
+ <include>README.adoc</include>
</includes>
</fileSet>
</fileSets>
<modules>
- <module name="${rootArtifactId}-module-simple" id="${rootArtifactId}-module-simple" dir="modules/module-simple">
+ <module name="${rootArtifactId}-module-simple" id="${rootArtifactId}-module-simple" dir="module-simple">
<fileSets>
<fileSet filtered="true" encoding="UTF-8">
<directory>src/main/java</directory>
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/README.adoc
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/README.adoc b/example/archetype/simpleapp/src/main/resources/archetype-resources/README.adoc
new file mode 100644
index 0000000..bd1f923
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/README.adoc
@@ -0,0 +1,194 @@
+= SimpleApp
+
+This application was generated by the link:http://isis.apache.org[Apache Isis] link:http://isis.apache.org/guides/ugfun.html#_ugfun_getting-started_simpleapp-archetype[simpleapp archetype].
+It is intended as a starting point for developing your own applications.
+
+== Quick start
+
+Build using:
+
+[source,bash]
+----
+mvn clean install
+----
+
+Run using:
+
+[source,bash]
+----
+mvn -pl webapp jetty:run
+----
+
+Login using:
+
+* username: `sven`
+* password: `pass`
+
+The app runs with HSQLDB running in-memory, with sample data set up using link:https://isis.apache.org/guides/ugtst.html#_ugtst_fixture-scripts[fixture scripts].
+
+
+
+== Application Structure
+
+The following table explains the contents of each of the directories:
+
+[width="100%",options="header,footer", cols="2a,4a"]
+|====================
+|Directory
+|Description
+
+|`application`
+|Defines application-level classes such as menus and the ``AppManifest`` (which defines the modules that make up the application).
+It also holds application-wide integration tests/BDD specs.
+
+|`module-simple`
+|Holds the "simple" module, consisting of the `SimpleObject` entity and supporting repository, along with module-specific unit- and integration tests.
+Also runs `isis:validate` goal for the domain objects within the module. +
+
+[TIP]
+====
+Larger applications should consist of multiple modules; each such module can be copied from this starter module.
+====
+
+|`webapp`
+|Assembles the application into a webapp (comprising both the Wicket viewer and Restful Objects viewer) and runs the `isis:swagger` goal.
+
+|`_checks`
+|Checkstyle and PMD rule sets for static analysis.
+
+[TIP]
+====
+Extend/adapt these according to your own standards.
+====
+
+
+|====================
+
+== More advanced use cases
+
+* To enhance all JDO entities prior to running: +
++
+[source,bash]
+----
+mvn -f pom-jdo-enhance-all.xml datanucleus:enhance
+----
+
+* To also generate the link:https://github.com/eirbjo/jetty-console[Jetty console], allowing the application to run as a standalone JAR: +
++
+[source,bash]
+----
+mvn package -Ddanhaywood-mavenmixin-jettyconsole
+----
++
+This can then be run using: +
++
+[source,bash]
+----
+cd webapp/target && java -jar simpleapp-webapp-xxx-jetty-console.war
+----
++
+Add additional flags, eg ``--headless`` or ``--port 9999``, if required.
+
+
+* To also generate source and javadoc JARs:
++
+[source,bash]
+----
+mvn clean package -Ddanhaywood-mavenmixin-sourceandjavadoc
+----
++
+[NOTE]
+====
+This is configured only for the `module-simple` module.
+====
+
+* To create the website (for the `module-simple` module) with source/javadoc and static analysis:
++
+[source,bash]
+----
+mvn -pl module-simple site -Ddanhaywood-mavenmixin-sourceandjavadoc -Ddanhaywood-mavenmixin-staticanalysis
+----
++
+[NOTE]
+====
+This is intended to run only for the `module-simple` module, and will generate a website under`target/site/index.html`.
+====
+
+
+
+* To disable the running of unit tests: +
++
+[source,bash]
+----
+mvn -DskipUTs
+----
++
+[TIP]
+====
+By default, output of unit tests are in `target/surefire-unittest-reports` (in the ``module-simple`` modules).
+====
+
+* To disable the running of integration tests: +
++
+[source,bash]
+----
+mvn -DskipITs
+----
++
+[TIP]
+====
+By default, output of integration tests are in `target/surefire-integtest-reports` (in the ``application`` and ``module-simple`` modules).
+====
+
+* To disable the running of BDD specs: +
++
+[source,bash]
+----
+mvn -DskipBSs
+----
++
+[TIP]
+====
+By default, output of integration tests are in `target/surefire-integbddspecs-reports` (in the ``application`` module).
+====
+
+* To disable the running of all tests and BDD specs: +
++
+[source,bash]
+----
+mvn -DskipTests
+----
+
+* To disable the running of the `isis:validate goal: +
++
+[source,bash]
+----
+mvn -Dskip.danhaywood-mavenmixin-isisvalidate
+----
+
+
+* To disable the generation of cucumber reports: +
++
+[source,bash]
+----
+mvn -Dskip.danhaywood-mavenmixin-cucumberreporting
+----
++
+[TIP]
+====
+By default, cucumber reports are generated at `target/cucumber-html-reports/overview-features.html` (in the ``application`` module).
+====
+
+* To disable the running of the `isis:swagger` goal:
++
+[source,bash]
+----
+mvn -Dskip.danhaywood-mavenmixin-isisswagger
+----
++
+[TIP]
+====
+By default, Swagger spec files are generated at `target/generated-resources/isis-swagger` (in the ``webapp`` module).
+====
+
+
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/_checks/checkstyle.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/_checks/checkstyle.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/_checks/checkstyle.xml
new file mode 100644
index 0000000..1d57a99
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/_checks/checkstyle.xml
@@ -0,0 +1,290 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.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.
+-->
+<!DOCTYPE module PUBLIC
+ "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+ "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<!--
+
+ Checkstyle configuration that checks the sun coding conventions from:
+
+ - the Java Language Specification at
+ http://java.sun.com/docs/books/jls/second_edition/html/index.html
+
+ - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
+
+ - the Javadoc guidelines at
+ http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
+
+ - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
+
+ - some best practices
+
+ Checkstyle is very configurable. Be sure to read the documentation at
+ http://checkstyle.sf.net (or in your downloaded distribution).
+
+ Most Checks are configurable, be sure to consult the documentation.
+
+ To completely disable a check, just comment it out or delete it from the file.
+
+ Finally, it is worth reading the documentation.
+
+-->
+
+<module name="Checker">
+
+ <!-- Checks that a package.html file exists for each package. -->
+ <!-- See http://checkstyle.sf.net/config_javadoc.html${symbol_pound}PackageHtml -->
+ <module name="JavadocPackage"/>
+ <!--
+ -->
+
+ <!-- Checks whether files end with a new line. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html${symbol_pound}NewlineAtEndOfFile -->
+ <!--
+ <module name="NewlineAtEndOfFile"/>
+ -->
+
+ <!-- Checks that property files contain the same keys. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html${symbol_pound}Translation -->
+ <module name="Translation"/>
+
+ <!--
+ eg:
+ //CHECKSTYLE.OFF: IllegalCatch - Much more readable than catching 7 exceptions
+ catch (Exception e)
+ //CHECKSTYLE.ON: IllegalCatch
+ -->
+ <module name="SuppressionCommentFilter">
+ <property name="offCommentFormat" value="CHECKSTYLE.OFF${symbol_escape}: ([${symbol_escape}w${symbol_escape}|]+)"/>
+ <property name="onCommentFormat" value="CHECKSTYLE.ON${symbol_escape}: ([${symbol_escape}w${symbol_escape}|]+)"/>
+ <property name="checkFormat" value="${symbol_dollar}1"/>
+ </module>
+
+ <!--
+ eg:
+ // CHECKSTYLE IGNORE check FOR NEXT 1 LINES
+ public void onClick(View view) { ... } -->
+ <module name="SuppressWithNearbyCommentFilter">
+ <property name="commentFormat" value="CHECKSTYLE.IGNORE (${symbol_escape}w+) FOR NEXT (${symbol_escape}d+) LINES"/>
+ <property name="checkFormat" value="${symbol_dollar}1"/>
+ <property name="influenceFormat" value="${symbol_dollar}2"/>
+ </module>
+
+ <module name="TreeWalker">
+
+ <property name="cacheFile" value="${symbol_dollar}{checkstyle.cache.file}"/>
+
+ <!-- not available in eclipse-cs
+ <module name="JavadocDeprecated"/>
+ -->
+ <module name="MissingOverride"/>
+
+ <!-- ************************************************************** -->
+ <!-- Checks that are different from the sun coding conventions ones -->
+ <!-- ************************************************************** -->
+ <property name="tabWidth" value="4"/>
+ <module name="LeftCurly">
+ <property name="option" value="eol"/>
+ </module>
+ <module name="RightCurly">
+ <property name="option" value="same"/>
+ </module>
+ <module name="MemberName">
+ <property name="format" value="^[a-z]([a-zA-Z0-9])*${symbol_dollar}"/>
+ </module>
+ <module name="StaticVariableName">
+ <property name="format" value="^[A-Z](_?[A-Z0-9])*${symbol_dollar}"/>
+ </module>
+ <module name="MethodName">
+ <property name="format" value="[a-z](_?[a-zA-Z0-9]+)*${symbol_dollar}"/>
+ </module>
+ <module name="ParameterName">
+ <property name="format" value="[a-z]([a-zA-Z0-9]+)*${symbol_dollar}"/>
+ </module>
+ <module name="LocalVariableName">
+ <property name="format" value="[a-z]([a-zA-Z0-9]+)*${symbol_dollar}"/>
+ </module>
+
+ <!-- ************************************************************** -->
+ <!-- Default Sun coding conventions checks -->
+ <!-- ************************************************************** -->
+
+ <!-- Checks for Javadoc comments. -->
+ <!-- See http://checkstyle.sf.net/config_javadoc.html -->
+
+ <!-- TODO: instate at some point (though only for public methods
+ <module name="JavadocType"/>
+ -->
+ <!--
+ <module name="JavadocMethod"/>
+ <module name="JavadocVariable"/>
+ -->
+
+
+ <!-- Checks for Naming Conventions. -->
+ <!-- See http://checkstyle.sf.net/config_naming.html -->
+ <module name="ConstantName"/>
+ <module name="PackageName"/>
+ <module name="TypeName"/>
+ <module name="LocalFinalVariableName"/>
+
+
+ <!-- Checks for Headers -->
+ <!-- See http://checkstyle.sf.net/config_header.html -->
+ <!--
+ <module name="Header">
+ -->
+ <!-- The follow property value demonstrates the ability -->
+ <!-- to have access to ANT properties. In this case it uses -->
+ <!-- the ${symbol_dollar}{basedir} property to allow Checkstyle to be run -->
+ <!-- from any directory within a project. -->
+ <!--
+ <property name="headerFile" value="${symbol_dollar}{checkstyle.header.file}"/>
+ </module>
+ -->
+
+ <!-- Following interprets the header file as regular expressions. -->
+ <!-- <module name="RegexpHeader"/> -->
+
+
+ <!-- Checks for imports -->
+ <!-- See http://checkstyle.sf.net/config_import.html -->
+ <module name="AvoidStarImport"/>
+ <module name="IllegalImport"/>
+ <module name="RedundantImport"/>
+ <module name="UnusedImports"/>
+
+
+ <!-- Checks for blocks. You know, those {}'s -->
+ <!-- See http://checkstyle.sf.net/config_blocks.html -->
+ <module name="EmptyBlock"/>
+ <module name="NeedBraces"/>
+ <!--
+ <module name="AvoidNestedBlocks"/>
+ -->
+
+
+ <!-- Checks for common coding problems -->
+ <!-- See http://checkstyle.sf.net/config_coding.html -->
+ <module name="EmptyStatement"/>
+ <module name="MagicNumber"/>
+ <module name="MissingSwitchDefault"/>
+ <module name="RedundantThrows"/>
+ <module name="SimplifyBooleanExpression"/>
+ <module name="SimplifyBooleanReturn"/>
+
+ <!-- not supported in maven
+ <module name="DoubleCheckedLocking"/>
+ -->
+ <!--
+ <module name="AvoidInlineConditionals"/>
+ <module name="EqualsHashCode"/>
+ <module name="HiddenField"/>
+ <module name="IllegalInstantiation"/>
+ <module name="InnerAssignment"/>
+ -->
+
+ <!-- Checks for class design -->
+ <!-- See http://checkstyle.sf.net/config_design.html -->
+ <!--
+
+ <module name="VisibilityModifier"/>
+ -->
+ <!-- too many violations...
+ <module name="DesignForExtension"/>
+ -->
+ <module name="FinalClass"/>
+ <module name="HideUtilityClassConstructor"/>
+ <module name="InterfaceIsType"/>
+
+
+ <module name="CyclomaticComplexity">
+ <property name="max" value="12"/>
+ </module>
+ <module name="NPathComplexity">
+ <property name="max" value="160"/>
+ </module>
+
+ <!-- Miscellaneous other checks. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html -->
+ <!--
+ <module name="ArrayTypeStyle"/>
+ <module name="GenericIllegalRegexp">
+ <property name="format" value="${symbol_escape}s+${symbol_dollar}"/>
+ <property name="message" value="Line has trailing spaces."/>
+ </module>
+ -->
+ <!-- removed; we detect these in other ways.
+ <module name="TodoComment"/>
+ -->
+ <module name="UpperEll"/>
+ <module name="FinalParameters"/>
+
+ <!-- Checks for whitespace -->
+ <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+ <!--
+ <module name="NoWhitespaceAfter"/>
+ <module name="NoWhitespaceBefore"/>
+ <module name="OperatorWrap"/>
+ <module name="ParenPad"/>
+ <module name="WhitespaceAfter"/>
+ <module name="WhitespaceAround"/>
+ <module name="TabCharacter"/>
+ -->
+ <module name="EmptyForIteratorPad"/>
+
+
+ <!-- Modifier Checks -->
+ <!-- See http://checkstyle.sf.net/config_modifiers.html -->
+ <!--
+ <module name="ModifierOrder"/>
+ <module name="RedundantModifier"/>
+ -->
+
+ <!-- Checks for Size Violations. -->
+ <!-- See http://checkstyle.sf.net/config_sizes.html -->
+ <module name="LineLength">
+ <property name="max" value="120"/>
+ </module>
+ <module name="MethodLength">
+ <property name="max" value="30"/>
+ </module>
+ <module name="ParameterNumber">
+ <property name="max" value="6"/>
+ </module>
+
+ </module>
+
+
+
+ <module name="FileLength">
+ <property name="max" value="1500"/>
+ </module>
+
+ <module name="FileTabCharacter">
+ <property name="eachLine" value="true"/>
+ <property name="fileExtensions" value="java,xml"/>
+ </module>
+
+</module>
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/_checks/pmd.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/_checks/pmd.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/_checks/pmd.xml
new file mode 100644
index 0000000..7f2e381
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/_checks/pmd.xml
@@ -0,0 +1,49 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?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.
+-->
+<ruleset name="Maven Ruleset"
+ xmlns="http://pmd.sf.net/ruleset/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+ xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+
+ <!--
+ Customized PMD ruleset for Maven, see [0] for more information
+ [0] http://pmd.sourceforge.net/howtomakearuleset.html
+ -->
+
+ <description>
+ This ruleset checks the code for discouraged programming constructs.
+ </description>
+
+ <rule ref="rulesets/java/basic.xml">
+ <exclude name="EmptyCatchBlock"/>
+ </rule>
+ <rule ref="rulesets/java/basic.xml/EmptyCatchBlock">
+ <properties>
+ <property name="allowCommentedBlocks" value="true"/>
+ </properties>
+ </rule>
+
+ <rule ref="rulesets/java/unusedcode.xml"/>
+ <rule ref="rulesets/java/imports.xml"/>
+</ruleset>
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/application/translations.pot
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/translations.pot b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/translations.pot
index 381e4ba..ea72a21 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/translations.pot
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/translations.pot
@@ -23,7 +23,7 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
-"POT-Creation-Date: 2016-11-24 14:44:27+\n"
+"POT-Creation-Date: 2016-11-28 10:03:12+\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/build.gradle
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/build.gradle b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/build.gradle
new file mode 100644
index 0000000..6bfc911
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/build.gradle
@@ -0,0 +1,72 @@
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// this gradle script compiles and enhances the dom classes.
+//
+// The script is intended to be used in conjunction with IntelliJ IDEA, to remove the necessity to run the DataNucleus
+// enhancer immediately before running the app, and therefore reduce the turn-around time. The script is run as
+// in the background as a daemon while editing/developing; whenever a change is made to any source code, gradle will
+// automatically compile *and* enhance the code.
+//
+// To use, just type:
+//
+// gradle -t --offline &
+//
+// It is also necessary to disable the IntelliJ's automatic building of the 'dom' project. This is done using:
+//
+// File > Settings > Build, Execution, Deployment > Compiler > Excludes
+//
+// and then exclude the .../dom/src/main/java directory
+//
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+defaultTasks 'compileJava', 'copyClasses'
+
+apply plugin: 'java'
+apply plugin: 'tangram.tools'
+
+sourceCompatibility = 1.8
+targetCompatibility = 1.8
+version = (new XmlParser()).parse('pom.xml').parent.version.text()
+
+buildscript {
+ repositories {
+ maven { url "http://oss.jfrog.org/artifactory/oss-snapshot-local" }
+ jcenter()
+ }
+ dependencies {
+ classpath 'tangram:gradle-plugin:1.1.2'
+ }
+}
+repositories {
+ mavenLocal()
+ maven { url "http://oss.jfrog.org/artifactory/oss-snapshot-local" }
+ jcenter()
+}
+dependencies {
+ compile group: 'org.apache.isis.core', name: 'isis-core-applib', version: '1.14.0-SNAPSHOT'
+}
+task copyClasses << {
+ copy {
+ from 'build/classes/main'
+ into 'target/classes'
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/gradlew
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/gradlew b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/gradlew
new file mode 100644
index 0000000..27309d9
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/gradlew
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/gradlew.bat
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/gradlew.bat b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/gradlew.bat
new file mode 100644
index 0000000..832fdb6
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/layouts.gradle
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/layouts.gradle b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/layouts.gradle
new file mode 100644
index 0000000..f5fa30d
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/layouts.gradle
@@ -0,0 +1,49 @@
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// This gradle script copies over .layout.xml files from src to target directory.
+//
+// This script is intended to be used while the app is running (in prototype mode), reducing the turn-around time
+// when updating the layout.
+//
+// The framework will automatically notice any changes to .layout.xml files, but these are read from the classpath
+// (under target/classes), not the source path. Using IntelliJ (say) these can be copied over manually by invoking
+// Run > Reload Changed Classes, and then refreshing the browser.
+//
+// This script instead is intended to be run in the background as a daemon; whenever a change
+// is made to any .layout.xml file, gradle will automatically copy over the file to the target directory.
+//
+// The script is run using:
+//
+// gradle -t -b layouts.gradle --offline &
+//
+// To reduce turn-around time further, also use the liveReload.gradle script (to automatically refresh the browser).
+//
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+defaultTasks 'copyLayouts'
+
+task copyLayouts(type:Copy) {
+ from 'src/main/java'
+ into 'target/classes'
+ include '**/*.layout.xml'
+}
+
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/liveReload.gradle
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/liveReload.gradle b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/liveReload.gradle
new file mode 100644
index 0000000..adb0ab1
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/liveReload.gradle
@@ -0,0 +1,56 @@
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// This gradle script sets up livereload, configured so that any updates to the dom module's classpath will
+// trigger the browser to reload the page. In particular, this relates to the .layout.xml files which define the
+// grid layout of domain objects.
+//
+// As a prerequisite, the app needs to configured to load the livereload.js script. This can be done by adding the
+// following configuration property (to viewer_wicket.properties, isis.properties or the AppManifest, as you prefer):
+//
+// isis.viewer.wicket.liveReloadUrl=http://localhost:35729/livereload.js?snipver=1
+//
+// This gradle script is run using:
+//
+// gradle -t -b livereload.gradle --offline &
+//
+// To reduce turn-around time further, also use the layouts.gradle script (to automatically copy over the layout.xml
+// files to the classpath).
+//
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+defaultTasks 'liveReload'
+
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath 'org.kordamp.gradle:livereload-gradle-plugin:0.2.1'
+ }
+}
+
+apply plugin: 'org.kordamp.gradle.livereload'
+
+liveReload {
+ docRoot new File('target/classes').canonicalPath
+}
+
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/logging-dn-enhance.properties
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/logging-dn-enhance.properties b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/logging-dn-enhance.properties
new file mode 100644
index 0000000..2040d89
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/logging-dn-enhance.properties
@@ -0,0 +1,44 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+${symbol_pound} Licensed to the Apache Software Foundation (ASF) under one
+${symbol_pound} or more contributor license agreements. See the NOTICE file
+${symbol_pound} distributed with this work for additional information
+${symbol_pound} regarding copyright ownership. The ASF licenses this file
+${symbol_pound} to you under the Apache License, Version 2.0 (the
+${symbol_pound} "License"); you may not use this file except in compliance
+${symbol_pound} with the License. You may obtain a copy of the License at
+${symbol_pound}
+${symbol_pound} http://www.apache.org/licenses/LICENSE-2.0
+${symbol_pound}
+${symbol_pound} Unless required by applicable law or agreed to in writing,
+${symbol_pound} software distributed under the License is distributed on an
+${symbol_pound} "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+${symbol_pound} KIND, either express or implied. See the License for the
+${symbol_pound} specific language governing permissions and limitations
+${symbol_pound} under the License.
+
+${symbol_pound} LOG4J Configuration
+${symbol_pound} ===================
+
+${symbol_pound} Basic logging goes to "datanucleus.log"
+log4j.appender.A1=org.apache.log4j.FileAppender
+log4j.appender.A1.File=datanucleus.log
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} (%t) %-5p [%c] - %m%n
+${symbol_pound}log4j.appender.A1.Threshold=INFO
+
+${symbol_pound} Categories
+${symbol_pound} Each category can be set to a "level", and to direct to an appender
+
+${symbol_pound} Default to DEBUG level for all DataNucleus categories
+log4j.logger.DataNucleus = DEBUG, A1
+
+log4j.category.com.mchange.v2.c3p0=INFO, A1
+log4j.category.com.mchange.v2.resourcepool=INFO, A1
+log4j.category.org.logicalcobwebs.proxool=INFO,A1
+
+
+${symbol_pound} Hbase libs logging
+log4j.category.org.apache.hadoop=INFO,A1
+log4j.category.org.apache.zookeeper=INFO,A1
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/logging-integtest.properties
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/logging-integtest.properties b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/logging-integtest.properties
new file mode 100644
index 0000000..088bbe4
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/logging-integtest.properties
@@ -0,0 +1,114 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+${symbol_pound} Licensed to the Apache Software Foundation (ASF) under one
+${symbol_pound} or more contributor license agreements. See the NOTICE file
+${symbol_pound} distributed with this work for additional information
+${symbol_pound} regarding copyright ownership. The ASF licenses this file
+${symbol_pound} to you under the Apache License, Version 2.0 (the
+${symbol_pound} "License"); you may not use this file except in compliance
+${symbol_pound} with the License. You may obtain a copy of the License at
+${symbol_pound}
+${symbol_pound} http://www.apache.org/licenses/LICENSE-2.0
+${symbol_pound}
+${symbol_pound} Unless required by applicable law or agreed to in writing,
+${symbol_pound} software distributed under the License is distributed on an
+${symbol_pound} "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+${symbol_pound} KIND, either express or implied. See the License for the
+${symbol_pound} specific language governing permissions and limitations
+${symbol_pound} under the License.
+
+
+${symbol_pound}
+${symbol_pound} Isis uses log4j is used to provide system logging
+${symbol_pound}
+log4j.rootCategory=INFO, Console
+
+${symbol_pound} The console appender
+log4j.appender.Console=org.apache.log4j.ConsoleAppender
+log4j.appender.Console.target=System.out
+log4j.appender.Console.layout=org.apache.log4j.PatternLayout
+log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} [%-20c{1} %-10t %-5p] %m%n
+
+log4j.appender.File=org.apache.log4j.RollingFileAppender
+log4j.appender.File.file=isis.log
+log4j.appender.File.append=false
+log4j.appender.File.layout=org.apache.log4j.PatternLayout
+log4j.appender.File.layout.ConversionPattern=%d [%-20c{1} %-10t %-5p] %m%n
+
+log4j.appender.translations-po=org.apache.log4j.FileAppender
+log4j.appender.translations-po.File=./translations.pot
+log4j.appender.translations-po.Append=false
+log4j.appender.translations-po.layout=org.apache.log4j.PatternLayout
+log4j.appender.translations-po.layout.ConversionPattern=%m%n
+
+! turn on the internal log4j debugging flag so we can see what it is doing
+${symbol_pound}log4j.debug=true
+
+
+${symbol_pound} DataNucleus
+${symbol_pound} the first two log the DML and DDL (if set to DEBUG)
+log4j.logger.DataNucleus.Datastore.Native=WARN, Console
+log4j.logger.DataNucleus.Datastore.Schema=DEBUG, Console
+${symbol_pound} the remainder can probably be left to WARN
+log4j.logger.DataNucleus.Persistence=WARN, Console
+log4j.logger.DataNucleus.Transaction=WARN, Console
+log4j.logger.DataNucleus.Connection=WARN, Console
+log4j.logger.DataNucleus.Query=WARN, Console
+log4j.logger.DataNucleus.Cache=WARN, Console
+log4j.logger.DataNucleus.MetaData=WARN, Console
+log4j.logger.DataNucleus.Datastore=WARN, Console
+log4j.logger.DataNucleus.Datastore.Persist=WARN, Console
+log4j.logger.DataNucleus.Datastore.Retrieve=WARN, Console
+log4j.logger.DataNucleus.General=WARN, Console
+log4j.logger.DataNucleus.Lifecycle=WARN, Console
+log4j.logger.DataNucleus.ValueGeneration=WARN, Console
+log4j.logger.DataNucleus.Enhancer=WARN, Console
+log4j.logger.DataNucleus.SchemaTool=ERROR, Console
+log4j.logger.DataNucleus.JDO=WARN, Console
+log4j.logger.DataNucleus.JPA=ERROR, Console
+log4j.logger.DataNucleus.JCA=WARN, Console
+log4j.logger.DataNucleus.IDE=ERROR, Console
+
+log4j.additivity.DataNucleus.Datastore.Native=false
+log4j.additivity.DataNucleus.Datastore.Schema=false
+log4j.additivity.DataNucleus.Datastore.Persistence=false
+log4j.additivity.DataNucleus.Datastore.Transaction=false
+log4j.additivity.DataNucleus.Datastore.Connection=false
+log4j.additivity.DataNucleus.Datastore.Query=false
+log4j.additivity.DataNucleus.Datastore.Cache=false
+log4j.additivity.DataNucleus.Datastore.MetaData=false
+log4j.additivity.DataNucleus.Datastore.Datastore=false
+log4j.additivity.DataNucleus.Datastore.Datastore.Persist=false
+log4j.additivity.DataNucleus.Datastore.Datastore.Retrieve=false
+log4j.additivity.DataNucleus.Datastore.General=false
+log4j.additivity.DataNucleus.Datastore.Lifecycle=false
+log4j.additivity.DataNucleus.Datastore.ValueGeneration=false
+log4j.additivity.DataNucleus.Datastore.Enhancer=false
+log4j.additivity.DataNucleus.Datastore.SchemaTool=false
+log4j.additivity.DataNucleus.Datastore.JDO=false
+log4j.additivity.DataNucleus.Datastore.JPA=false
+log4j.additivity.DataNucleus.Datastore.JCA=false
+log4j.additivity.DataNucleus.Datastore.IDE=false
+
+
+
+
+${symbol_pound} if using log4jdbc-remix as JDBC driver
+${symbol_pound}log4j.logger.jdbc.sqlonly=DEBUG, sql, Console
+${symbol_pound}log4j.additivity.jdbc.sqlonly=false
+${symbol_pound}log4j.logger.jdbc.resultsettable=DEBUG, jdbc, Console
+${symbol_pound}log4j.additivity.jdbc.resultsettable=false
+
+${symbol_pound}log4j.logger.jdbc.audit=WARN,jdbc, Console
+${symbol_pound}log4j.additivity.jdbc.audit=false
+${symbol_pound}log4j.logger.jdbc.resultset=WARN,jdbc
+${symbol_pound}log4j.additivity.jdbc.resultset=false
+${symbol_pound}log4j.logger.jdbc.sqltiming=WARN,sqltiming
+${symbol_pound}log4j.additivity.jdbc.sqltiming=false
+${symbol_pound}log4j.logger.jdbc.connection=FATAL,connection
+${symbol_pound}log4j.additivity.jdbc.connection=false
+
+
+log4j.logger.org.apache.isis.core.runtime.services.i18n.po.PoWriter=INFO,translations-po
+log4j.additivity.org.apache.isis.core.runtime.services.i18n.po.PoWriter=false
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/pom.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/pom.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/pom.xml
new file mode 100644
index 0000000..e53a5a1
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/pom.xml
@@ -0,0 +1,136 @@
+<?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.
+--><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>
+ <groupId>${groupId}</groupId>
+ <artifactId>${rootArtifactId}</artifactId>
+ <version>${version}</version>
+ </parent>
+
+ <artifactId>${artifactId}</artifactId>
+ <name>SimpleApp Simple Module</name>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ <resource>
+ <directory>src/main/java</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ </testResource>
+ <testResource>
+ <directory>src/test/java</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <groupId>com.github.odavid.maven.plugins</groupId>
+ <artifactId>mixin-maven-plugin</artifactId>
+ <version>0.1-alpha-39</version>
+ <extensions>true</extensions>
+ <configuration>
+ <mixins>
+ <mixin>
+ <groupId>com.danhaywood.mavenmixin</groupId>
+ <artifactId>standard</artifactId>
+ <version>0.0.1</version>
+ </mixin>
+ <mixin>
+ <groupId>com.danhaywood.mavenmixin</groupId>
+ <artifactId>enforcerrelaxed</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </mixin>
+ <mixin>
+ <groupId>com.danhaywood.mavenmixin</groupId>
+ <artifactId>datanucleusenhance</artifactId>
+ <version>0.0.2</version>
+ </mixin>
+ <mixin>
+ <groupId>com.danhaywood.mavenmixin</groupId>
+ <artifactId>isisvalidate</artifactId>
+ <version>0.0.1</version>
+ </mixin>
+ <mixin>
+ <groupId>com.danhaywood.mavenmixin</groupId>
+ <artifactId>surefire</artifactId>
+ <version>0.0.2</version>
+ </mixin>
+ <mixin>
+ <groupId>com.danhaywood.mavenmixin</groupId>
+ <artifactId>sourceandjavadoc</artifactId>
+ <version>0.0.1</version>
+ </mixin>
+ <mixin>
+ <groupId>com.danhaywood.mavenmixin</groupId>
+ <artifactId>staticanalysis</artifactId>
+ <version>0.0.1</version>
+ </mixin>
+ </mixins>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <properties>
+ <danhaywood-mavenmixin-isisvalidate>domainapp.modules.simple.SimpleModuleManifest</danhaywood-mavenmixin-isisvalidate>
+ <danhaywood-mavenmixin-staticanalysis.checkstyle.configLocation>${project.parent.basedir}/_checks/checkstyle.xml</danhaywood-mavenmixin-staticanalysis.checkstyle.configLocation>
+ <danhaywood-mavenmixin-staticanalysis.pmd.ruleset>${project.parent.basedir}/_checks/pmd.xml</danhaywood-mavenmixin-staticanalysis.pmd.ruleset>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-applib</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>com.danhaywood.mavendeps</groupId>
+ <artifactId>isistesting</artifactId>
+ <version>0.0.2</version>
+ <type>pom</type>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ </dependency>
+
+ </dependencies>
+
+</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/META-INF/persistence.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/META-INF/persistence.xml
new file mode 100644
index 0000000..c5d8e78
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/META-INF/persistence.xml
@@ -0,0 +1,29 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?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.
+-->
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
+
+ <persistence-unit name="simple">
+ </persistence-unit>
+</persistence>
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/SimpleModuleManifest.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/SimpleModuleManifest.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/SimpleModuleManifest.java
new file mode 100644
index 0000000..3be4554
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/SimpleModuleManifest.java
@@ -0,0 +1,76 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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 domainapp.modules.simple;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.isis.applib.AppManifest;
+import org.apache.isis.applib.fixturescripts.FixtureScript;
+
+import domainapp.modules.simple.dom.SimpleModuleDomSubmodule;
+import domainapp.modules.simple.fixture.SimpleModuleFixtureSubmodule;
+
+/**
+ * Used by <code>isis-maven-plugin</code> (build-time validation of the module) and also by module-level integration tests.
+ */
+public class SimpleModuleManifest implements AppManifest {
+
+ @Override
+ public List<Class<?>> getModules() {
+ return Arrays.<Class<?>>asList(
+ SimpleModuleDomSubmodule.class,
+ SimpleModuleFixtureSubmodule.class
+ );
+ }
+
+ @Override
+ public List<Class<?>> getAdditionalServices() {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public String getAuthenticationMechanism() {
+ return null;
+ }
+
+ @Override
+ public String getAuthorizationMechanism() {
+ return null;
+ }
+
+ @Override
+ public List<Class<? extends FixtureScript>> getFixtures() {
+ return null;
+ }
+
+ /**
+ * No overrides.
+ */
+ @Override
+ public Map<String, String> getConfigurationProperties() {
+ return null;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/SimpleModuleDomSubmodule.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/SimpleModuleDomSubmodule.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/SimpleModuleDomSubmodule.java
new file mode 100644
index 0000000..db8172d
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/SimpleModuleDomSubmodule.java
@@ -0,0 +1,33 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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 domainapp.modules.simple.dom;
+
+public final class SimpleModuleDomSubmodule {
+
+ public static class PropertyDomainEvent<S,T>
+ extends org.apache.isis.applib.services.eventbus.PropertyDomainEvent<S,T> {}
+ public static class CollectionDomainEvent<S,T>
+ extends org.apache.isis.applib.services.eventbus.CollectionDomainEvent<S,T> {}
+ public static class ActionDomainEvent<S> extends
+ org.apache.isis.applib.services.eventbus.ActionDomainEvent<S> {}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.java
new file mode 100644
index 0000000..3d05da7
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.java
@@ -0,0 +1,236 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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 domainapp.modules.simple.dom.impl;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.VersionStrategy;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.Auditing;
+import org.apache.isis.applib.annotation.CommandReification;
+import org.apache.isis.applib.annotation.Contributed;
+import org.apache.isis.applib.annotation.DomainObject;
+import org.apache.isis.applib.annotation.Editing;
+import org.apache.isis.applib.annotation.Mixin;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.Publishing;
+import org.apache.isis.applib.annotation.SemanticsOf;
+import org.apache.isis.applib.services.i18n.TranslatableString;
+import org.apache.isis.applib.services.message.MessageService;
+import org.apache.isis.applib.services.repository.RepositoryService;
+import org.apache.isis.applib.services.title.TitleService;
+import org.apache.isis.applib.util.ObjectContracts;
+
+import domainapp.modules.simple.dom.SimpleModuleDomSubmodule;
+import lombok.Getter;
+import lombok.Setter;
+
+@javax.jdo.annotations.PersistenceCapable(
+ identityType=IdentityType.DATASTORE,
+ schema = "simple",
+ table = "SimpleObject"
+)
+@javax.jdo.annotations.DatastoreIdentity(
+ strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY,
+ column="id")
+@javax.jdo.annotations.Version(
+ strategy= VersionStrategy.DATE_TIME,
+ column="version")
+@javax.jdo.annotations.Queries({
+ @javax.jdo.annotations.Query(
+ name = "findByName", language = "JDOQL",
+ value = "SELECT "
+ + "FROM domainapp.modules.simple.dom.impl.SimpleObject "
+ + "WHERE name.indexOf(:name) >= 0 ")
+})
+@javax.jdo.annotations.Unique(name="SimpleObject_name_UNQ", members = {"name"})
+@DomainObject(
+ objectType = "simple.SimpleObject",
+ auditing = Auditing.ENABLED,
+ publishing = Publishing.ENABLED
+)
+public class SimpleObject implements Comparable<SimpleObject> {
+
+ //region > title
+ public TranslatableString title() {
+ return TranslatableString.tr("Object: {name}", "name", getName());
+ }
+ //endregion
+
+ //region > constructor
+ public SimpleObject(final String name) {
+ setName(name);
+ }
+ //endregion
+
+ //region > name (read-only property)
+ public static class NameType {
+ private NameType() {
+ }
+
+ public static class Meta {
+ public static final int MAX_LEN = 40;
+
+ private Meta() {
+ }
+ }
+
+ public static class PropertyDomainEvent
+ extends SimpleModuleDomSubmodule.PropertyDomainEvent<SimpleObject, String> { }
+ }
+
+
+ @javax.jdo.annotations.Column(allowsNull = "false", length = NameType.Meta.MAX_LEN)
+ @Property(
+ editing = Editing.DISABLED,
+ domainEvent = NameType.PropertyDomainEvent.class
+ )
+ @Getter @Setter
+ private String name;
+
+ // endregion
+
+ //region > notes (editable property)
+ public static class NotesType {
+ private NotesType() {
+ }
+
+ public static class Meta {
+ public static final int MAX_LEN = 4000;
+
+ private Meta() {
+ }
+ }
+
+ public static class PropertyDomainEvent
+ extends SimpleModuleDomSubmodule.PropertyDomainEvent<SimpleObject, String> { }
+ }
+
+
+ @javax.jdo.annotations.Column(
+ allowsNull = "true",
+ length = NotesType.Meta.MAX_LEN
+ )
+ @Property(
+ command = CommandReification.ENABLED,
+ publishing = Publishing.ENABLED,
+ domainEvent = NotesType.PropertyDomainEvent.class
+ )
+ @Getter @Setter
+ private String notes;
+ //endregion
+
+ //region > updateName (action)
+ @Mixin
+ public static class _updateName {
+
+ public static class ActionDomainEvent extends SimpleModuleDomSubmodule.ActionDomainEvent<SimpleObject> {
+ }
+
+ private final SimpleObject simpleObject;
+
+ public _updateName(final SimpleObject simpleObject) {
+ this.simpleObject = simpleObject;
+ }
+
+ @Action(
+ command = CommandReification.ENABLED,
+ publishing = Publishing.ENABLED,
+ semantics = SemanticsOf.IDEMPOTENT,
+ domainEvent = ActionDomainEvent.class
+ )
+ @ActionLayout(
+ contributed = Contributed.AS_ACTION
+ )
+ public SimpleObject ${symbol_dollar}${symbol_dollar}(
+ @Parameter(maxLength = SimpleObject.NameType.Meta.MAX_LEN)
+ @ParameterLayout(named = "Name")
+ final String name) {
+ simpleObject.setName(name);
+ return simpleObject;
+ }
+
+ public String default0${symbol_dollar}${symbol_dollar}() {
+ return simpleObject.getName();
+ }
+
+ public TranslatableString validate0${symbol_dollar}${symbol_dollar}(final String name) {
+ return name != null && name.contains("!") ? TranslatableString.tr("Exclamation mark is not allowed") : null;
+ }
+
+ }
+ //endregion
+
+ //region > delete (action)
+ @Mixin
+ public static class _delete {
+
+ public static class ActionDomainEvent extends SimpleModuleDomSubmodule.ActionDomainEvent<SimpleObject> {
+ }
+
+ private final SimpleObject simpleObject;
+ public _delete(final SimpleObject simpleObject) {
+ this.simpleObject = simpleObject;
+ }
+
+ @Action(
+ domainEvent = ActionDomainEvent.class,
+ semantics = SemanticsOf.NON_IDEMPOTENT_ARE_YOU_SURE
+ )
+ @ActionLayout(
+ contributed = Contributed.AS_ACTION
+ )
+ public void ${symbol_dollar}${symbol_dollar}() {
+ final String title = titleService.titleOf(simpleObject);
+ messageService.informUser(String.format("'%s' deleted", title));
+ repositoryService.remove(simpleObject);
+ }
+
+ @javax.inject.Inject
+ RepositoryService repositoryService;
+
+ @javax.inject.Inject
+ TitleService titleService;
+
+ @javax.inject.Inject
+ MessageService messageService;
+ }
+
+ //endregion
+
+ //region > toString, compareTo
+ @Override
+ public String toString() {
+ return ObjectContracts.toString(this, "name");
+ }
+
+ @Override
+ public int compareTo(final SimpleObject other) {
+ return ObjectContracts.compare(this, other, "name");
+ }
+
+ //endregion
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.layout.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.layout.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.layout.xml
new file mode 100644
index 0000000..963c3e3
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.layout.xml
@@ -0,0 +1,69 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+ 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.
+-->
+<bs3:grid xsi:schemaLocation="http://isis.apache.org/applib/layout/component http://isis.apache.org/applib/layout/component/component.xsd http://isis.apache.org/applib/layout/grid/bootstrap3 http://isis.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd" xmlns:c="http://isis.apache.org/applib/layout/component" xmlns:bs3="http://isis.apache.org/applib/layout/grid/bootstrap3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <bs3:row>
+ <bs3:col span="12" unreferencedActions="true">
+ <c:domainObject bookmarking="AS_ROOT"/>
+ </bs3:col>
+ </bs3:row>
+ <bs3:row>
+ <bs3:col span="6">
+ <bs3:tabGroup>
+ <bs3:tab name="General">
+ <bs3:row>
+ <bs3:col span="12">
+ <c:fieldSet name="Name">
+ <c:action id="delete"/>
+ <c:property id="name" namedEscaped="true">
+ <c:action id="updateName"/>
+ </c:property>
+ <c:property id="notes" namedEscaped="true" multiLine="10" hidden="ALL_TABLES"/>
+ </c:fieldSet>
+ </bs3:col>
+ </bs3:row>
+ </bs3:tab>
+ <bs3:tab name="Metadata">
+ <bs3:row>
+ <bs3:col span="12">
+ <c:fieldSet name="Metadata"/>
+ </bs3:col>
+ </bs3:row>
+ </bs3:tab>
+ <bs3:tab name="Other">
+ <bs3:row>
+ <bs3:col span="12">
+ <c:fieldSet name="Other" unreferencedProperties="true"/>
+ </bs3:col>
+ </bs3:row>
+ </bs3:tab>
+ </bs3:tabGroup>
+ <bs3:tabGroup>
+ </bs3:tabGroup>
+ </bs3:col>
+ <bs3:col span="6">
+ <bs3:tabGroup unreferencedCollections="true">
+ </bs3:tabGroup>
+ </bs3:col>
+ </bs3:row>
+</bs3:grid>
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.png
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.png b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.png
new file mode 100644
index 0000000..0bd6f57
Binary files /dev/null and b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.png differ
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjectMenu.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjectMenu.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjectMenu.java
new file mode 100644
index 0000000..07d9399
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjectMenu.java
@@ -0,0 +1,80 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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 domainapp.modules.simple.dom.impl;
+
+import java.util.List;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.BookmarkPolicy;
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.DomainServiceLayout;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.NatureOfService;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.SemanticsOf;
+import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
+
+@DomainService(
+ nature = NatureOfService.VIEW_MENU_ONLY,
+ repositoryFor = SimpleObject.class
+)
+@DomainServiceLayout(
+ named = "Simple Objects",
+ menuOrder = "10"
+)
+public class SimpleObjectMenu {
+
+
+ @Action(semantics = SemanticsOf.SAFE)
+ @ActionLayout(bookmarking = BookmarkPolicy.AS_ROOT)
+ @MemberOrder(sequence = "1")
+ public List<SimpleObject> listAll() {
+ return simpleObjectRepository.listAll();
+ }
+
+
+ @Action(semantics = SemanticsOf.SAFE)
+ @ActionLayout(bookmarking = BookmarkPolicy.AS_ROOT)
+ @MemberOrder(sequence = "2")
+ public List<SimpleObject> findByName(
+ @ParameterLayout(named="Name")
+ final String name
+ ) {
+ return simpleObjectRepository.findByName(name);
+ }
+
+
+ public static class CreateDomainEvent extends ActionDomainEvent<SimpleObjectMenu> {}
+ @Action(domainEvent = CreateDomainEvent.class)
+ @MemberOrder(sequence = "3")
+ public SimpleObject create(
+ @ParameterLayout(named="Name")
+ final String name) {
+ return simpleObjectRepository.create(name);
+ }
+
+
+ @javax.inject.Inject
+ SimpleObjectRepository simpleObjectRepository;
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjectRepository.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjectRepository.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjectRepository.java
new file mode 100644
index 0000000..c6ee82b
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObjectRepository.java
@@ -0,0 +1,61 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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 domainapp.modules.simple.dom.impl;
+
+import java.util.List;
+
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.NatureOfService;
+import org.apache.isis.applib.query.QueryDefault;
+import org.apache.isis.applib.services.registry.ServiceRegistry2;
+import org.apache.isis.applib.services.repository.RepositoryService;
+
+@DomainService(
+ nature = NatureOfService.DOMAIN,
+ repositoryFor = SimpleObject.class
+)
+public class SimpleObjectRepository {
+
+ public List<SimpleObject> listAll() {
+ return repositoryService.allInstances(SimpleObject.class);
+ }
+
+ public List<SimpleObject> findByName(final String name) {
+ return repositoryService.allMatches(
+ new QueryDefault<>(
+ SimpleObject.class,
+ "findByName",
+ "name", name));
+ }
+
+ public SimpleObject create(final String name) {
+ final SimpleObject object = new SimpleObject(name);
+ serviceRegistry.injectServicesInto(object);
+ repositoryService.persist(object);
+ return object;
+ }
+
+ @javax.inject.Inject
+ RepositoryService repositoryService;
+ @javax.inject.Inject
+ ServiceRegistry2 serviceRegistry;
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/d05bc761/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleModuleFixtureSubmodule.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleModuleFixtureSubmodule.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleModuleFixtureSubmodule.java
new file mode 100644
index 0000000..098b18a
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/SimpleModuleFixtureSubmodule.java
@@ -0,0 +1,27 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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 domainapp.modules.simple.fixture;
+
+public final class SimpleModuleFixtureSubmodule {
+
+
+}