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 2018/02/18 16:36:29 UTC

[isis] 04/31: ISIS-1813: recreating simpleapp archetype

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

danhaywood pushed a commit to branch release-1.16.1-RC2
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 4c39bdb4d6c3964e3cca2f266c51892a58afa18e
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Feb 14 09:30:58 2018 +0000

    ISIS-1813: recreating simpleapp archetype
---
 example/archetype/simpleapp/pom.xml                      |  9 ++++-----
 .../src/main/resources/archetype-resources/README.adoc   |  2 +-
 .../application/bdd/specglue/BootstrappingGlue.java      | 16 ++++++++++++++--
 .../specs/{RunBddSpecs.java => RunIntegBddSpecs.java}    |  2 +-
 .../domainapp/modules/simple/dom/impl/SimpleObject.java  |  3 ++-
 .../modules/simple/dom/impl/SimpleObject.layout.xml      |  6 +-----
 .../src/main/resources/archetype-resources/pom.xml       |  3 ++-
 .../test/resources/projects/basic/archetype.properties   |  2 +-
 8 files changed, 26 insertions(+), 17 deletions(-)

diff --git a/example/archetype/simpleapp/pom.xml b/example/archetype/simpleapp/pom.xml
index d6c8865..8a26db9 100644
--- a/example/archetype/simpleapp/pom.xml
+++ b/example/archetype/simpleapp/pom.xml
@@ -17,11 +17,11 @@
   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/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.apache.isis.archetype</groupId>
     <artifactId>simpleapp-archetype</artifactId>
-    <version>2.0.0-SNAPSHOT</version>
+    <version>1.16.1-SNAPSHOT</version>
     <packaging>maven-archetype</packaging>
     <name>simpleapp-archetype</name>
     <build>
@@ -65,12 +65,11 @@
         <connection>scm:git:git@github.com:incodehq/incode-build.git/simpleapp</connection>
         <developerConnection>scm:git:git@github.com:incodehq/incode-build.git/simpleapp</developerConnection>
         <url>git@github.com:incodehq/incode-build.git/simpleapp</url>
-      <tag>HEAD</tag>
-  </scm>
+    </scm>
     <parent>
         <groupId>org.apache.isis.core</groupId>
         <artifactId>isis</artifactId>
-        <version>1.16.1-SNAPSHOT</version>
+        <version>1.16.1</version>
         <relativePath>../../../core/pom.xml</relativePath>
     </parent>
     <properties>
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/README.adoc b/example/archetype/simpleapp/src/main/resources/archetype-resources/README.adoc
index d52423d..6b62aab 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/README.adoc
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/README.adoc
@@ -70,7 +70,7 @@ Extend/adapt these according to your own standards.
 +
 [source,bash]
 ----
-mvn -f pom-jdo-enhance-all.xml datanucleus:enhance
+mvn -pl module-simple datanucleus:enhance -o
 ----
 
 * To also generate the link:https://github.com/eirbjo/jetty-console[Jetty console], allowing the application to run as a standalone JAR: +
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/BootstrappingGlue.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/BootstrappingGlue.java
index 608334b..5b2364d 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/BootstrappingGlue.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/BootstrappingGlue.java
@@ -19,11 +19,23 @@ O *  Licensed to the Apache Software Foundation (ASF) under one or more
  */
 package domainapp.application.bdd.specglue;
 
-import org.apache.isis.core.specsupport.specs.CukeGlueBootstrappingAbstract;
+import org.apache.isis.core.runtime.headless.HeadlessWithBootstrappingAbstract;
 
+import cucumber.api.java.After;
+import cucumber.api.java.Before;
 import domainapp.application.DomainAppApplicationModule;
 
-public class BootstrappingGlue extends CukeGlueBootstrappingAbstract {
+public class BootstrappingGlue extends HeadlessWithBootstrappingAbstract {
+
+    @Before(order=100)
+    public void beforeScenario() {
+        super.bootstrapAndSetupIfRequired();
+    }
+
+    @After
+    public void afterScenario(cucumber.api.Scenario sc) {
+        super.tearDownAllModules();
+    }
 
     public BootstrappingGlue() {
         super(new DomainAppApplicationModule());
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/RunBddSpecs.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/RunIntegBddSpecs.java
similarity index 97%
rename from example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/RunBddSpecs.java
rename to example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/RunIntegBddSpecs.java
index bfa9c24..2ede811 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/RunBddSpecs.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/RunIntegBddSpecs.java
@@ -41,6 +41,6 @@ import cucumber.api.junit.Cucumber;
         strict = true,
         tags = { "~@backlog", "~@ignore" }
 )
-public class RunBddSpecs {
+public class RunIntegBddSpecs {
     // intentionally empty 
 }
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
index 3a7322b..8e7a2c3 100644
--- 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
@@ -27,6 +27,7 @@ import javax.jdo.annotations.VersionStrategy;
 import com.google.common.collect.ComparisonChain;
 
 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.DomainObject;
@@ -66,7 +67,7 @@ public class SimpleObject implements Comparable<SimpleObject> {
     private String notes;
 
 
-    @Action(semantics = SemanticsOf.IDEMPOTENT, command = CommandReification.ENABLED, publishing = Publishing.ENABLED)
+    @Action(semantics = SemanticsOf.IDEMPOTENT, command = CommandReification.ENABLED, publishing = Publishing.ENABLED, associateWith = "name")
     public SimpleObject updateName(
             @Parameter(maxLength = 40)
             @ParameterLayout(named = "Name")
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
index e45515f..c27d88d 100644
--- 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
@@ -37,11 +37,7 @@
                                 <c:action id="delete">
                                     <c:describedAs>Deletes this object from the persistent datastore</c:describedAs>
                                 </c:action>
-                                <c:property id="name" namedEscaped="true">
-                                    <c:action id="updateName">
-                                        <c:describedAs>Updates the object's name</c:describedAs>
-                                    </c:action>
-                                </c:property>
+                                <c:property id="name" namedEscaped="true"/>
                                 <c:property id="notes" namedEscaped="true" multiLine="10" hidden="ALL_TABLES"/>
                             </c:fieldSet>
                         </bs3:col>
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
index 2e0b0d2..ead8212 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
@@ -34,12 +34,13 @@
     <packaging>pom</packaging>
 
     <properties>
-        <isis.version>1.16.0</isis.version>
+        <isis.version>1.16.1</isis.version>
 
         <lombok.version>1.16.18</lombok.version>
 
         <compiler-plugin.source>1.8</compiler-plugin.source>
         <compiler-plugin.target>1.8</compiler-plugin.target>
+        <compiler-plugin.compilerArgument>-parameters</compiler-plugin.compilerArgument>
 
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
diff --git a/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties b/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties
index 4965284..83ad706 100644
--- a/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties
+++ b/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties
@@ -1,4 +1,4 @@
-#Thu Jan 04 18:50:01 GMT 2018
+#Wed Feb 14 09:30:44 GMT 2018
 package=it.pkg
 version=0.1-SNAPSHOT
 groupId=archetype.it

-- 
To stop receiving notification emails like this one, please contact
danhaywood@apache.org.