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 2017/01/03 19:07:13 UTC
[1/6] isis git commit: ISIS-1559: updates README for simpleapp,
describiing how to use a docker image
Repository: isis
Updated Branches:
refs/heads/maint-1.13.3 e2f0a9f58 -> b05ed58ed
ISIS-1559: updates README for simpleapp, describiing how to use a docker image
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/0eebd25a
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/0eebd25a
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/0eebd25a
Branch: refs/heads/maint-1.13.3
Commit: 0eebd25aa516eb43685a2bfa02f989f35dbd30a3
Parents: b47edb6
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Dec 29 17:00:13 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Dec 29 17:00:13 2016 +0000
----------------------------------------------------------------------
example/application/simpleapp/README.adoc | 9 +++++++++
1 file changed, 9 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/0eebd25a/example/application/simpleapp/README.adoc
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/README.adoc b/example/application/simpleapp/README.adoc
index e61edec..4f9b95d 100644
--- a/example/application/simpleapp/README.adoc
+++ b/example/application/simpleapp/README.adoc
@@ -230,3 +230,12 @@ mvn deploy -Dmavenmixin-docker
+
This once again assumes that the `${docker-plugin.imageName}` property has been defined, _and_ also that docker registry credentials have been specified in `~/.m2/settings.xml`.
See link:https://github.com/danhaywood/java-mavenmixin-docker#how-to-configure[mavenmixin-docker] for further details.
+
+* To run a docker image previously packaged/uploaded: +
++
+[source,bash]
+----
+docker run -d -p 8080:8080 mycompany/myapp
+----
++
+See link:https://github.com/danhaywood/java-mavenmixin-docker#how-to-consume[mavenmixin-docker] for further details on how to consume docker images.
[6/6] isis git commit: Merge branch 'release-1.13.2.1-RC1' into
maint-1.13.3
Posted by da...@apache.org.
Merge branch 'release-1.13.2.1-RC1' into maint-1.13.3
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/b05ed58e
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/b05ed58e
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/b05ed58e
Branch: refs/heads/maint-1.13.3
Commit: b05ed58ed2f23b29ba28ed2b39d902c201ceaa4b
Parents: e2f0a9f 1538333
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue Jan 3 19:06:33 2017 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue Jan 3 19:06:33 2017 +0000
----------------------------------------------------------------------
example/application/simpleapp/README.adoc | 23 ++-
.../META-INF/maven/archetype-metadata.xml | 6 +
.../resources/archetype-resources/README.adoc | 59 +++++-
.../archetype-resources/application/pom.xml | 7 +-
...nAppFixtureScriptsSpecificationProvider.java | 6 +-
.../fixture/scenarios/DomainAppDemo.java | 28 +--
.../fixture/teardown/DomainAppTearDown.java | 5 -
.../DomainAppAppManifestWithFixtures.java | 4 +-
.../services/homepage/HomePageViewModel.java | 9 -
.../bdd/specglue/BootstrappingGlue.java | 2 -
.../bdd/specglue/CatalogOfFixturesGlue.java | 6 +-
.../bdd/specglue/SimpleObjectGlue.java | 53 ------
.../application/bdd/specs/RunIntegBddSpecs.java | 5 +-
.../SimpleObjectSpec_listAllAndCreate.feature | 2 +-
.../application/integtests/Smoke_IntegTest.java | 4 +-
.../simple/dom/SimpleModuleDomSubmodule.java | 2 +-
.../modules/simple/dom/impl/SimpleObject.java | 180 +++++--------------
.../fixture/SimpleModuleFixtureSubmodule.java | 3 +-
.../fixture/data/SimpleObjectMenu_create.java | 61 -------
.../fixture/scenario/CreateSimpleObjects.java | 84 +++++++++
.../fixture/scenario/RecreateSimpleObjects.java | 79 --------
.../tests/SimpleObjectMenu_IntegTest.java | 8 +-
.../tests/SimpleObject_IntegTest.java | 10 +-
.../simple/specglue/SimpleObjectMenuGlue.java | 56 ++++++
.../main/resources/archetype-resources/pom.xml | 18 ++
.../archetype-resources/webapp/pom.xml | 16 +-
.../src/main/webapp/WEB-INF/translations-en.po | 2 +-
.../src/main/webapp/WEB-INF/translations-es.po | 2 +-
.../src/main/webapp/WEB-INF/translations-nl.po | 2 +-
.../src/main/webapp/WEB-INF/translations.po | 2 +-
.../projects/basic/archetype.properties | 2 +-
31 files changed, 334 insertions(+), 412 deletions(-)
----------------------------------------------------------------------
[5/6] isis git commit: [maven-release-plugin] prepare for next
development iteration
Posted by da...@apache.org.
[maven-release-plugin] prepare for next development iteration
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/1538333c
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/1538333c
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/1538333c
Branch: refs/heads/maint-1.13.3
Commit: 1538333c26c0512cf375b21e4c5c2e94b52bbd6f
Parents: 4a649bd
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sat Dec 31 15:10:14 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sat Dec 31 15:10:14 2016 +0000
----------------------------------------------------------------------
example/archetype/simpleapp/pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/1538333c/example/archetype/simpleapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/pom.xml b/example/archetype/simpleapp/pom.xml
index 02a24d4..ba53779 100644
--- a/example/archetype/simpleapp/pom.xml
+++ b/example/archetype/simpleapp/pom.xml
@@ -21,7 +21,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.isis.archetype</groupId>
<artifactId>simpleapp-archetype</artifactId>
- <version>1.13.2.1</version>
+ <version>1.14.0-SNAPSHOT</version>
<packaging>maven-archetype</packaging>
<name>simpleapp-archetype</name>
<build>
@@ -45,7 +45,7 @@
<connection>scm:git:git@github.com:danhaywood/java-mavenmixin-standard.git</connection>
<developerConnection>scm:git:git@github.com:danhaywood/java-mavenmixin-standard.git</developerConnection>
<url>git@github.com:danhaywood/java-mavenmixin-standard.git</url>
- <tag>simpleapp-archetype-1.13.2.1</tag>
+ <tag>HEAD</tag>
</scm>
<parent>
<groupId>org.apache.isis.core</groupId>
[4/6] isis git commit: [maven-release-plugin] prepare release
simpleapp-archetype-1.13.2.1
Posted by da...@apache.org.
[maven-release-plugin] prepare release simpleapp-archetype-1.13.2.1
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/4a649bdb
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/4a649bdb
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/4a649bdb
Branch: refs/heads/maint-1.13.3
Commit: 4a649bdb8c69d13fee603096733e25f07b276329
Parents: 2931909
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sat Dec 31 15:10:11 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sat Dec 31 15:10:11 2016 +0000
----------------------------------------------------------------------
example/archetype/simpleapp/pom.xml | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/4a649bdb/example/archetype/simpleapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/pom.xml b/example/archetype/simpleapp/pom.xml
index 2c971a4..02a24d4 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" 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">
+<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">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.isis.archetype</groupId>
<artifactId>simpleapp-archetype</artifactId>
- <version>1.14.0-SNAPSHOT</version>
+ <version>1.13.2.1</version>
<packaging>maven-archetype</packaging>
<name>simpleapp-archetype</name>
<build>
@@ -45,7 +45,8 @@
<connection>scm:git:git@github.com:danhaywood/java-mavenmixin-standard.git</connection>
<developerConnection>scm:git:git@github.com:danhaywood/java-mavenmixin-standard.git</developerConnection>
<url>git@github.com:danhaywood/java-mavenmixin-standard.git</url>
- </scm>
+ <tag>simpleapp-archetype-1.13.2.1</tag>
+ </scm>
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
[2/6] isis git commit: ISIS-1559: minor edits to README of simpleapp
Posted by da...@apache.org.
ISIS-1559: minor edits to README of simpleapp
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/acec89a5
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/acec89a5
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/acec89a5
Branch: refs/heads/maint-1.13.3
Commit: acec89a5b2d0d26a6613fbe8d8bc4b6e527f9c6d
Parents: 0eebd25
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sat Dec 31 14:50:13 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sat Dec 31 14:54:25 2016 +0000
----------------------------------------------------------------------
example/application/simpleapp/README.adoc | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/acec89a5/example/application/simpleapp/README.adoc
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/README.adoc b/example/application/simpleapp/README.adoc
index 4f9b95d..0849274 100644
--- a/example/application/simpleapp/README.adoc
+++ b/example/application/simpleapp/README.adoc
@@ -77,7 +77,7 @@ mvn -f pom-jdo-enhance-all.xml datanucleus:enhance
+
[source,bash]
----
-mvn package -Dmavenmixin-jettyconsole
+mvn install -Dmavenmixin-jettyconsole
----
+
This can then be run using: +
@@ -87,7 +87,7 @@ This can then be run using: +
cd webapp/target && java -jar simpleapp-webapp-xxx-jetty-console.war
----
+
-Add additional flags, eg ``--headless`` or ``--port 9999``, if required.
+Add additional arguments ``--headless`` or ``--port 9999``, if required.
+
It can also be run using: +
+
@@ -130,7 +130,6 @@ This is intended to run only for the `module-simple` module, and will generate a
====
-
* To disable the running of unit tests: +
+
[source,bash]
@@ -174,7 +173,7 @@ By default, output of integration tests are in `target/surefire-integbddspecs-r
mvn -DskipTests
----
-* To disable the running of the `isis:validate goal: +
+* To disable the running of the `isis:validate` goal: +
+
[source,bash]
----
@@ -220,22 +219,25 @@ Alternatively it can be specified on the command line using a system property, e
----
mvn package -Dmavenmixin-docker -Ddocker-plugin.imageName=mycompany/myapp
----
++
+The packaged image can be viewed using `docker images`.
-* To upload the application as a docker image to link:https://hub.docker.com[docker hub]: +
+* To run a docker image previously packaged: +
+
[source,bash]
----
-mvn deploy -Dmavenmixin-docker
+docker run -d -p 8080:8080 mycompany/myapp
----
+
-This once again assumes that the `${docker-plugin.imageName}` property has been defined, _and_ also that docker registry credentials have been specified in `~/.m2/settings.xml`.
-See link:https://github.com/danhaywood/java-mavenmixin-docker#how-to-configure[mavenmixin-docker] for further details.
+See link:https://github.com/danhaywood/java-mavenmixin-docker#how-to-consume[mavenmixin-docker] for further details on how to run docker images.
-* To run a docker image previously packaged/uploaded: +
+* To upload the application as a docker image to link:https://hub.docker.com[docker hub] (or some other docker registry): +
+
[source,bash]
----
-docker run -d -p 8080:8080 mycompany/myapp
+mvn deploy -Dmavenmixin-docker
----
+
-See link:https://github.com/danhaywood/java-mavenmixin-docker#how-to-consume[mavenmixin-docker] for further details on how to consume docker images.
+This assumes that the `${docker-plugin.imageName}` property has been defined, _and_ also that docker registry credentials have been specified in `~/.m2/settings.xml`.
+See link:https://github.com/danhaywood/java-mavenmixin-docker#how-to-configure[mavenmixin-docker] for further details.
+
[3/6] isis git commit: ISIS-1560: recreating simpleapp archetype
Posted by da...@apache.org.
ISIS-1560: 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/2931909d
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/2931909d
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/2931909d
Branch: refs/heads/maint-1.13.3
Commit: 2931909d7bf33979151c114820ff90785f8b2017
Parents: acec89a
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sat Dec 31 15:01:00 2016 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sat Dec 31 15:01:00 2016 +0000
----------------------------------------------------------------------
example/archetype/simpleapp/pom.xml | 5 +-
.../META-INF/maven/archetype-metadata.xml | 6 +
.../resources/archetype-resources/README.adoc | 59 +++++-
.../archetype-resources/application/pom.xml | 7 +-
...nAppFixtureScriptsSpecificationProvider.java | 6 +-
.../fixture/scenarios/DomainAppDemo.java | 28 +--
.../fixture/teardown/DomainAppTearDown.java | 5 -
.../DomainAppAppManifestWithFixtures.java | 4 +-
.../services/homepage/HomePageViewModel.java | 9 -
.../bdd/specglue/BootstrappingGlue.java | 2 -
.../bdd/specglue/CatalogOfFixturesGlue.java | 6 +-
.../bdd/specglue/SimpleObjectGlue.java | 53 ------
.../application/bdd/specs/RunIntegBddSpecs.java | 5 +-
.../SimpleObjectSpec_listAllAndCreate.feature | 2 +-
.../application/integtests/Smoke_IntegTest.java | 4 +-
.../simple/dom/SimpleModuleDomSubmodule.java | 2 +-
.../modules/simple/dom/impl/SimpleObject.java | 180 +++++--------------
.../fixture/SimpleModuleFixtureSubmodule.java | 3 +-
.../fixture/data/SimpleObjectMenu_create.java | 61 -------
.../fixture/scenario/CreateSimpleObjects.java | 84 +++++++++
.../fixture/scenario/RecreateSimpleObjects.java | 79 --------
.../tests/SimpleObjectMenu_IntegTest.java | 8 +-
.../tests/SimpleObject_IntegTest.java | 10 +-
.../simple/specglue/SimpleObjectMenuGlue.java | 56 ++++++
.../main/resources/archetype-resources/pom.xml | 18 ++
.../archetype-resources/webapp/pom.xml | 16 +-
.../src/main/webapp/WEB-INF/translations-en.po | 2 +-
.../src/main/webapp/WEB-INF/translations-es.po | 2 +-
.../src/main/webapp/WEB-INF/translations-nl.po | 2 +-
.../src/main/webapp/WEB-INF/translations.po | 2 +-
.../projects/basic/archetype.properties | 2 +-
31 files changed, 319 insertions(+), 409 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/pom.xml b/example/archetype/simpleapp/pom.xml
index ba53779..2c971a4 100644
--- a/example/archetype/simpleapp/pom.xml
+++ b/example/archetype/simpleapp/pom.xml
@@ -17,7 +17,7 @@
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>
@@ -45,8 +45,7 @@
<connection>scm:git:git@github.com:danhaywood/java-mavenmixin-standard.git</connection>
<developerConnection>scm:git:git@github.com:danhaywood/java-mavenmixin-standard.git</developerConnection>
<url>git@github.com:danhaywood/java-mavenmixin-standard.git</url>
- <tag>HEAD</tag>
- </scm>
+ </scm>
<parent>
<groupId>org.apache.isis.core</groupId>
<artifactId>isis</artifactId>
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/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 7779836..60a0ce5 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
@@ -168,6 +168,12 @@
</includes>
</fileSet>
<fileSet encoding="UTF-8">
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>**/*.</include>
+ </includes>
+ </fileSet>
+ <fileSet encoding="UTF-8">
<directory>src/main/jettyconsole</directory>
<includes>
<include>**/*.png</include>
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/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
index df457bb..0849274 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/README.adoc
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/README.adoc
@@ -51,7 +51,7 @@ Larger applications should consist of multiple modules; each such module can be
====
|`webapp`
-|Assembles the application into a webapp (comprising both the Wicket viewer and Restful Objects viewer) and runs the `isis:swagger` goal.
+|Assembles the application into a webapp (comprising both the Wicket viewer and Restful Objects viewer) and also as a docker image, and runs the `isis:swagger` goal.
|`_checks`
|Checkstyle and PMD rule sets for static analysis.
@@ -77,7 +77,7 @@ mvn -f pom-jdo-enhance-all.xml datanucleus:enhance
+
[source,bash]
----
-mvn package -Dmavenmixin-jettyconsole
+mvn install -Dmavenmixin-jettyconsole
----
+
This can then be run using: +
@@ -87,7 +87,22 @@ This can then be run using: +
cd webapp/target && java -jar simpleapp-webapp-xxx-jetty-console.war
----
+
-Add additional flags, eg ``--headless`` or ``--port 9999``, if required.
+Add additional arguments ``--headless`` or ``--port 9999``, if required.
++
+It can also be run using: +
++
+[source,bash]
+----
+mvn -pl webapp && mvn antrun:run -Dmavenmixin-jettyconsole
+----
++
+or to specify arguments:
++
+[source,bash]
+----
+mvn -pl webapp && mvn antrun:run -Dmavenmixin-jettyconsole \
+ -Dmaven-antrun-plugin.jettyconsole.args="--headless --port 9090"
+----
* To also generate source and javadoc JARs:
@@ -115,7 +130,6 @@ This is intended to run only for the `module-simple` module, and will generate a
====
-
* To disable the running of unit tests: +
+
[source,bash]
@@ -159,7 +173,7 @@ By default, output of integration tests are in `target/surefire-integbddspecs-r
mvn -DskipTests
----
-* To disable the running of the `isis:validate goal: +
+* To disable the running of the `isis:validate` goal: +
+
[source,bash]
----
@@ -191,4 +205,39 @@ mvn -Dskip.danhaywood-mavenmixin-isisswagger
By default, Swagger spec files are generated at `target/generated-resources/isis-swagger` (in the ``webapp`` module).
====
+* To package up the application as a docker image: +
++
+[source,bash]
+----
+mvn package -Dmavenmixin-docker
+----
++
+This assumes that the `${docker-plugin.imageName}` property has been defined in the `webapp` module.
+Alternatively it can be specified on the command line using a system property, eg:
++
+[source,bash]
+----
+mvn package -Dmavenmixin-docker -Ddocker-plugin.imageName=mycompany/myapp
+----
++
+The packaged image can be viewed using `docker images`.
+
+* To run a docker image previously packaged: +
++
+[source,bash]
+----
+docker run -d -p 8080:8080 mycompany/myapp
+----
++
+See link:https://github.com/danhaywood/java-mavenmixin-docker#how-to-consume[mavenmixin-docker] for further details on how to run docker images.
+
+* To upload the application as a docker image to link:https://hub.docker.com[docker hub] (or some other docker registry): +
++
+[source,bash]
+----
+mvn deploy -Dmavenmixin-docker
+----
++
+This assumes that the `${docker-plugin.imageName}` property has been defined, _and_ also that docker registry credentials have been specified in `~/.m2/settings.xml`.
+See link:https://github.com/danhaywood/java-mavenmixin-docker#how-to-configure[mavenmixin-docker] for further details.
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/application/pom.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/pom.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/pom.xml
index bf5d0a0..816324c 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/pom.xml
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/pom.xml
@@ -102,7 +102,12 @@
<groupId>${project.groupId}</groupId>
<artifactId>${rootArtifactId}-module-simple</artifactId>
</dependency>
-
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>${rootArtifactId}-module-simple</artifactId>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
<!-- isis -->
<dependency>
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/DomainAppFixtureScriptsSpecificationProvider.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/DomainAppFixtureScriptsSpecificationProvider.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/DomainAppFixtureScriptsSpecificationProvider.java
index 1c15c0f..d257dbc 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/DomainAppFixtureScriptsSpecificationProvider.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/DomainAppFixtureScriptsSpecificationProvider.java
@@ -27,7 +27,7 @@ import org.apache.isis.applib.fixturescripts.FixtureScripts;
import org.apache.isis.applib.services.fixturespec.FixtureScriptsSpecification;
import org.apache.isis.applib.services.fixturespec.FixtureScriptsSpecificationProvider;
-import domainapp.modules.simple.fixture.scenario.RecreateSimpleObjects;
+import domainapp.application.fixture.scenarios.DomainAppDemo;
/**
* Specifies where to find fixtures, and other settings.
@@ -39,9 +39,9 @@ public class DomainAppFixtureScriptsSpecificationProvider implements FixtureScri
return FixtureScriptsSpecification
.builder(DomainAppFixtureScriptsSpecificationProvider.class)
.with(FixtureScripts.MultipleExecutionStrategy.EXECUTE)
- .withRunScriptDefault(RecreateSimpleObjects.class)
+ .withRunScriptDefault(DomainAppDemo.class)
.withRunScriptDropDown(FixtureScriptsSpecification.DropDownPolicy.CHOICES)
- .withRecreate(RecreateSimpleObjects.class)
+ .withRecreate(DomainAppDemo.class)
.build();
}
}
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/scenarios/DomainAppDemo.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/scenarios/DomainAppDemo.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/scenarios/DomainAppDemo.java
index b753a64..ecf258d 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/scenarios/DomainAppDemo.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/scenarios/DomainAppDemo.java
@@ -21,10 +21,14 @@
*/
package domainapp.application.fixture.scenarios;
+import javax.annotation.Nullable;
+
import org.apache.isis.applib.fixturescripts.FixtureScript;
import domainapp.application.fixture.teardown.DomainAppTearDown;
-import domainapp.modules.simple.fixture.scenario.RecreateSimpleObjects;
+import domainapp.modules.simple.fixture.scenario.CreateSimpleObjects;
+import lombok.Getter;
+import lombok.Setter;
public class DomainAppDemo extends FixtureScript {
@@ -32,32 +36,16 @@ public class DomainAppDemo extends FixtureScript {
withDiscoverability(Discoverability.DISCOVERABLE);
}
- //region > number (optional input)
+ @Nullable
+ @Getter @Setter
private Integer number;
- /**
- * The number of objects to create, up to 10; optional, defaults to 3.
- */
- public Integer getNumber() {
- return number;
- }
-
- public DomainAppDemo setNumber(final Integer number) {
- this.number = number;
- return this;
- }
- //endregion
-
@Override
protected void execute(final ExecutionContext ec) {
- // defaults
- final int number = defaultParam("number", ec, 3);
-
-
// execute
ec.executeChild(this, new DomainAppTearDown());
- ec.executeChild(this, new RecreateSimpleObjects().setNumber(number));
+ ec.executeChild(this, new CreateSimpleObjects().setNumber(number));
}
}
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/teardown/DomainAppTearDown.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/teardown/DomainAppTearDown.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/teardown/DomainAppTearDown.java
index 90ac634..4f9e450 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/teardown/DomainAppTearDown.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/fixture/teardown/DomainAppTearDown.java
@@ -22,7 +22,6 @@
package domainapp.application.fixture.teardown;
import org.apache.isis.applib.fixturescripts.FixtureScript;
-import org.apache.isis.applib.services.jdosupport.IsisJdoSupport;
import domainapp.modules.simple.fixture.teardown.SimpleModuleTearDown;
@@ -33,8 +32,4 @@ public class DomainAppTearDown extends FixtureScript {
executionContext.executeChild(this, new SimpleModuleTearDown());
}
-
- @javax.inject.Inject
- private IsisJdoSupport isisJdoSupport;
-
}
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixtures.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixtures.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixtures.java
index 172ec48..0712ea6 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixtures.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/manifest/DomainAppAppManifestWithFixtures.java
@@ -30,7 +30,7 @@ import com.google.common.collect.Maps;
import org.apache.isis.applib.fixturescripts.FixtureScript;
-import domainapp.modules.simple.fixture.scenario.RecreateSimpleObjects;
+import domainapp.modules.simple.fixture.scenario.CreateSimpleObjects;
/**
* Run the app but without setting up any fixtures.
@@ -42,7 +42,7 @@ public class DomainAppAppManifestWithFixtures extends DomainAppAppManifest {
*/
@Override
public List<Class<? extends FixtureScript>> getFixtures() {
- return Lists.newArrayList(RecreateSimpleObjects.class);
+ return Lists.newArrayList(CreateSimpleObjects.class);
}
/**
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.java
index 8cba20d..eac86fe 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/main/java/domainapp/application/services/homepage/HomePageViewModel.java
@@ -32,23 +32,14 @@ import domainapp.modules.simple.dom.impl.SimpleObjectRepository;
@ViewModel
public class HomePageViewModel {
- //region > title
public TranslatableString title() {
return TranslatableString.tr("{num} objects", "num", getObjects().size());
}
- //endregion
- //region > object (collection)
- @org.apache.isis.applib.annotation.HomePage
public List<SimpleObject> getObjects() {
return simpleObjectRepository.listAll();
}
- //endregion
-
- //region > injected services
@javax.inject.Inject
SimpleObjectRepository simpleObjectRepository;
-
- //endregion
}
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/BootstrappingGlue.java
----------------------------------------------------------------------
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 efa9a20..30469c6 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
@@ -30,9 +30,7 @@ public class BootstrappingGlue extends CukeGlueAbstract {
@Before(value={"@integration"}, order=100)
public void beforeScenarioIntegrationScope() {
-
DomainAppIntegTestAbstract.initSystem();
-
before(ScenarioExecutionScope.INTEGRATION);
}
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/CatalogOfFixturesGlue.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/CatalogOfFixturesGlue.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/CatalogOfFixturesGlue.java
index 53fa408..9c75d6d 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/CatalogOfFixturesGlue.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/CatalogOfFixturesGlue.java
@@ -22,13 +22,13 @@ package domainapp.application.bdd.specglue;
import org.apache.isis.core.specsupport.specs.CukeGlueAbstract;
import cucumber.api.java.Before;
-import domainapp.modules.simple.fixture.scenario.RecreateSimpleObjects;
+import domainapp.application.fixture.scenarios.DomainAppDemo;
public class CatalogOfFixturesGlue extends CukeGlueAbstract {
- @Before(value={"@integration", "@RecreateSimpleObjects"}, order=20000)
+ @Before(value={"@integration", "@DomainAppDemo"}, order=20000)
public void integrationFixtures() throws Throwable {
- scenarioExecution().install(new RecreateSimpleObjects());
+ scenarioExecution().install(new DomainAppDemo());
}
}
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/SimpleObjectGlue.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/SimpleObjectGlue.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/SimpleObjectGlue.java
deleted file mode 100644
index 06638c3..0000000
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specglue/SimpleObjectGlue.java
+++ /dev/null
@@ -1,53 +0,0 @@
-#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.application.bdd.specglue;
-
-import java.util.List;
-import java.util.UUID;
-
-import org.apache.isis.core.specsupport.specs.CukeGlueAbstract;
-
-import cucumber.api.java.en.Given;
-import cucumber.api.java.en.When;
-import domainapp.modules.simple.dom.impl.SimpleObject;
-import domainapp.modules.simple.dom.impl.SimpleObjectMenu;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class SimpleObjectGlue extends CukeGlueAbstract {
-
- @Given("^there are.* (${symbol_escape}${symbol_escape}d+) simple objects${symbol_dollar}")
- public void there_are_N_simple_objects(int n) throws Throwable {
- try {
- final List<SimpleObject> findAll = service(SimpleObjectMenu.class).listAll();
- assertThat(findAll.size(), is(n));
- putVar("list", "all", findAll);
-
- } finally {
- assertMocksSatisfied();
- }
- }
-
- @When("^I create a new simple object${symbol_dollar}")
- public void I_create_a_new_simple_object() throws Throwable {
- service(SimpleObjectMenu.class).create(UUID.randomUUID().toString());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/RunIntegBddSpecs.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/RunIntegBddSpecs.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/RunIntegBddSpecs.java
index e4749b5..8cc8871 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/RunIntegBddSpecs.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/RunIntegBddSpecs.java
@@ -34,7 +34,10 @@ import cucumber.api.junit.Cucumber;
"html:target/cucumber-html-report"
,"json:target/cucumber.json"
},
- glue={"classpath:domainapp.application.bdd.specglue"},
+ glue={
+ "classpath:domainapp.application.bdd.specglue",
+ "classpath:domainapp.modules.simple.specglue"
+ },
strict = true,
tags = { "~@backlog", "~@ignore" })
public class RunIntegBddSpecs {
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/SimpleObjectSpec_listAllAndCreate.feature
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/SimpleObjectSpec_listAllAndCreate.feature b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/SimpleObjectSpec_listAllAndCreate.feature
index 77e0356..083e2cb 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/SimpleObjectSpec_listAllAndCreate.feature
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/bdd/specs/SimpleObjectSpec_listAllAndCreate.feature
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-@RecreateSimpleObjects
+@DomainAppDemo
Feature: List and Create New Simple Objects
@integration
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/integtests/Smoke_IntegTest.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/integtests/Smoke_IntegTest.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/integtests/Smoke_IntegTest.java
index d69d88b..aa6a745 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/integtests/Smoke_IntegTest.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/src/test/java/domainapp/application/integtests/Smoke_IntegTest.java
@@ -84,7 +84,7 @@ public class Smoke_IntegTest extends DomainAppIntegTestAbstract {
// when
- wrap(mixin(SimpleObject.updateName.class, fred)).exec("Freddy");
+ wrap(fred).updateName("Freddy");
transactionService.flushTransaction();
// then
@@ -100,7 +100,7 @@ public class Smoke_IntegTest extends DomainAppIntegTestAbstract {
// when
- wrap(mixin(SimpleObject.delete.class, fred)).exec();
+ wrap(fred).delete();
transactionService.flushTransaction();
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/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
index db8172d..9d82337 100644
--- 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
@@ -22,6 +22,7 @@
package domainapp.modules.simple.dom;
public final class SimpleModuleDomSubmodule {
+ private SimpleModuleDomSubmodule(){}
public static class PropertyDomainEvent<S,T>
extends org.apache.isis.applib.services.eventbus.PropertyDomainEvent<S,T> {}
@@ -29,5 +30,4 @@ public final class SimpleModuleDomSubmodule {
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/2931909d/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
index bc9bd2e..3344a4e 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
@@ -25,25 +25,19 @@ 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.annotation.Title;
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;
@@ -54,172 +48,68 @@ import lombok.Setter;
)
@javax.jdo.annotations.DatastoreIdentity(
strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY,
- column="id")
+ column="id")
@javax.jdo.annotations.Version(
strategy= VersionStrategy.DATE_TIME,
column="version")
@javax.jdo.annotations.Queries({
@javax.jdo.annotations.Query(
- name = "findByName", language = "JDOQL",
+ name = "findByName",
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
+ objectType = "simple.SimpleObject"
)
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
- )
+ @javax.jdo.annotations.Column(allowsNull = "false", length = 40)
+ @Property(editing = Editing.DISABLED)
@Getter @Setter
+ @Title(prepend = "Object: ")
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
- )
+ @javax.jdo.annotations.Column(allowsNull = "true", length = 4000)
+ @Property(editing = Editing.ENABLED)
@Getter @Setter
private String notes;
- //endregion
+
//region > updateName (action)
- @Mixin(method = "exec")
- 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 exec(
- @Parameter(maxLength = SimpleObject.NameType.Meta.MAX_LEN)
- @ParameterLayout(named = "Name")
- final String name) {
- simpleObject.setName(name);
- return simpleObject;
- }
-
- public String default0Exec() {
- return simpleObject.getName();
- }
-
- public TranslatableString validate0Exec(final String name) {
- return name != null && name.contains("!") ? TranslatableString.tr("Exclamation mark is not allowed") : null;
- }
+ @Action(semantics = SemanticsOf.IDEMPOTENT)
+ public SimpleObject updateName(
+ @Parameter(maxLength = 40)
+ @ParameterLayout(named = "Name")
+ final String name) {
+ setName(name);
+ return this;
+ }
+ public String default0UpdateName() {
+ return getName();
+ }
+
+ public TranslatableString validate0UpdateName(final String name) {
+ return name != null && name.contains("!") ? TranslatableString.tr("Exclamation mark is not allowed") : null;
}
//endregion
//region > delete (action)
- @Mixin(method = "exec")
- 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 exec() {
- 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;
+ @Action(semantics = SemanticsOf.NON_IDEMPOTENT_ARE_YOU_SURE)
+ public void delete() {
+ final String title = titleService.titleOf(this);
+ messageService.informUser(String.format("'%s' deleted", title));
+ repositoryService.remove(this);
}
-
//endregion
+
//region > toString, compareTo
@Override
public String toString() {
@@ -230,7 +120,17 @@ public class SimpleObject implements Comparable<SimpleObject> {
public int compareTo(final SimpleObject other) {
return ObjectContracts.compare(this, other, "name");
}
+ //endregion
+
+ //region > injected services
+ @javax.inject.Inject
+ RepositoryService repositoryService;
+
+ @javax.inject.Inject
+ TitleService titleService;
+ @javax.inject.Inject
+ MessageService messageService;
//endregion
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/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
index 098b18a..3e70432 100644
--- 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
@@ -22,6 +22,5 @@
package domainapp.modules.simple.fixture;
public final class SimpleModuleFixtureSubmodule {
-
-
+ private SimpleModuleFixtureSubmodule(){}
}
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/data/SimpleObjectMenu_create.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/data/SimpleObjectMenu_create.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/data/SimpleObjectMenu_create.java
deleted file mode 100644
index 9b47915..0000000
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/data/SimpleObjectMenu_create.java
+++ /dev/null
@@ -1,61 +0,0 @@
-#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.data;
-
-import org.apache.isis.applib.fixturescripts.FixtureScript;
-
-import domainapp.modules.simple.dom.impl.SimpleObject;
-import domainapp.modules.simple.dom.impl.SimpleObjectMenu;
-import lombok.Getter;
-import lombok.Setter;
-import lombok.experimental.Accessors;
-
-@Accessors(chain = true)
-public class SimpleObjectMenu_create extends FixtureScript {
-
- /**
- * Name of the object (required)
- */
- @Getter @Setter
- private String name;
-
- /**
- * The created simple object (output).
- */
- @Getter
- private SimpleObject simpleObject;
-
-
- @Override
- protected void execute(final ExecutionContext ec) {
-
- String name = checkParam("name", ec, String.class);
-
- this.simpleObject = wrap(simpleObjectMenu).create(name);
- ec.addResult(this, simpleObject);
- }
-
- @javax.inject.Inject
- SimpleObjectMenu simpleObjectMenu;
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/CreateSimpleObjects.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/CreateSimpleObjects.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/CreateSimpleObjects.java
new file mode 100644
index 0000000..1211a6d
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/CreateSimpleObjects.java
@@ -0,0 +1,84 @@
+#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.scenario;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import javax.annotation.Nullable;
+
+import com.google.common.collect.Lists;
+
+import org.apache.isis.applib.fixturescripts.FixtureScript;
+
+import domainapp.modules.simple.dom.impl.SimpleObject;
+import domainapp.modules.simple.dom.impl.SimpleObjectMenu;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.experimental.Accessors;
+
+@Accessors(chain = true)
+public class CreateSimpleObjects extends FixtureScript {
+
+ public final List<String> NAMES = Collections.unmodifiableList(Arrays.asList(
+ "Foo", "Bar", "Baz", "Frodo", "Froyo", "Fizz", "Bip", "Bop", "Bang", "Boo"));
+
+ /**
+ * The number of objects to create, up to 10; optional, defaults to 3.
+ */
+ @Nullable
+ @Getter @Setter
+ private Integer number;
+
+ /**
+ * The simpleobjects created by this fixture (output).
+ */
+ @Getter
+ private final List<SimpleObject> simpleObjects = Lists.newArrayList();
+
+ @Override
+ protected void execute(final ExecutionContext ec) {
+
+ // defaults
+ final int number = defaultParam("number", ec, 3);
+
+ // validate
+ if(number < 0 || number > NAMES.size()) {
+ throw new IllegalArgumentException(String.format("number must be in range [0,%d)", NAMES.size()));
+ }
+
+ // execute
+ for (int i = 0; i < number; i++) {
+ final String name = NAMES.get(i);
+
+ final SimpleObject simpleObject = wrap(simpleObjectMenu).create(name);
+ ec.addResult(this, simpleObject);
+ simpleObjects.add(simpleObject);
+ }
+ }
+
+ @javax.inject.Inject
+ SimpleObjectMenu simpleObjectMenu;
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/RecreateSimpleObjects.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/RecreateSimpleObjects.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/RecreateSimpleObjects.java
deleted file mode 100644
index 3d5b7e2..0000000
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/main/java/domainapp/modules/simple/fixture/scenario/RecreateSimpleObjects.java
+++ /dev/null
@@ -1,79 +0,0 @@
-#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.scenario;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import com.google.common.collect.Lists;
-
-import org.apache.isis.applib.fixturescripts.FixtureScript;
-
-import domainapp.modules.simple.dom.impl.SimpleObject;
-import domainapp.modules.simple.fixture.data.SimpleObjectMenu_create;
-import domainapp.modules.simple.fixture.teardown.SimpleModuleTearDown;
-import lombok.Getter;
-import lombok.Setter;
-import lombok.experimental.Accessors;
-
-@Accessors(chain = true)
-public class RecreateSimpleObjects extends FixtureScript {
-
- public final List<String> NAMES = Collections.unmodifiableList(Arrays.asList(
- "Foo", "Bar", "Baz", "Frodo", "Froyo", "Fizz", "Bip", "Bop", "Bang", "Boo"));
-
- /**
- * The number of objects to create, up to 10; optional, defaults to 3.
- */
- @Getter @Setter
- private Integer number;
-
- /**
- * The simpleobjects created by this fixture (output).
- */
- @Getter
- private final List<SimpleObject> simpleObjects = Lists.newArrayList();
-
- @Override
- protected void execute(final ExecutionContext ec) {
-
- // defaults
- final int number = defaultParam("number", ec, 3);
-
- // validate
- if(number < 0 || number > NAMES.size()) {
- throw new IllegalArgumentException(String.format("number must be in range [0,%d)", NAMES.size()));
- }
-
- // execute
- ec.executeChild(this, new SimpleModuleTearDown());
- for (int i = 0; i < number; i++) {
- final String name = NAMES.get(i);
- final SimpleObjectMenu_create fs = new SimpleObjectMenu_create().setName(name);
- ec.executeChild(this, fs.getName(), fs);
- simpleObjects.add(fs.getSimpleObject());
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjectMenu_IntegTest.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjectMenu_IntegTest.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjectMenu_IntegTest.java
index cf76151..635edfe 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjectMenu_IntegTest.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObjectMenu_IntegTest.java
@@ -35,12 +35,11 @@ import org.junit.Test;
import org.apache.isis.applib.fixturescripts.FixtureScript;
import org.apache.isis.applib.fixturescripts.FixtureScripts;
-import org.apache.isis.applib.services.repository.RepositoryService;
import org.apache.isis.applib.services.xactn.TransactionService;
import domainapp.modules.simple.dom.impl.SimpleObject;
import domainapp.modules.simple.dom.impl.SimpleObjectMenu;
-import domainapp.modules.simple.fixture.scenario.RecreateSimpleObjects;
+import domainapp.modules.simple.fixture.scenario.CreateSimpleObjects;
import domainapp.modules.simple.fixture.teardown.SimpleModuleTearDown;
import domainapp.modules.simple.integtests.SimpleModuleIntegTestAbstract;
import static org.assertj.core.api.Assertions.assertThat;
@@ -53,8 +52,6 @@ public class SimpleObjectMenu_IntegTest extends SimpleModuleIntegTestAbstract {
TransactionService transactionService;
@Inject
SimpleObjectMenu menu;
- @Inject
- RepositoryService repositoryService;
public static class ListAll extends SimpleObjectMenu_IntegTest {
@@ -62,7 +59,8 @@ public class SimpleObjectMenu_IntegTest extends SimpleModuleIntegTestAbstract {
public void happyCase() throws Exception {
// given
- RecreateSimpleObjects fs = new RecreateSimpleObjects();
+ fixtureScripts.runFixtureScript(new SimpleModuleTearDown(), null);
+ CreateSimpleObjects fs = new CreateSimpleObjects();
fixtureScripts.runFixtureScript(fs, null);
transactionService.nextTransaction();
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObject_IntegTest.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObject_IntegTest.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObject_IntegTest.java
index 5d7b696..57d4d99 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObject_IntegTest.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/integtests/tests/SimpleObject_IntegTest.java
@@ -37,7 +37,8 @@ import org.apache.isis.core.metamodel.services.jdosupport.Persistable_datanucleu
import org.apache.isis.core.metamodel.services.jdosupport.Persistable_datanucleusVersionTimestamp;
import domainapp.modules.simple.dom.impl.SimpleObject;
-import domainapp.modules.simple.fixture.scenario.RecreateSimpleObjects;
+import domainapp.modules.simple.fixture.scenario.CreateSimpleObjects;
+import domainapp.modules.simple.fixture.teardown.SimpleModuleTearDown;
import domainapp.modules.simple.integtests.SimpleModuleIntegTestAbstract;
import static org.assertj.core.api.Assertions.assertThat;
@@ -53,7 +54,8 @@ public class SimpleObject_IntegTest extends SimpleModuleIntegTestAbstract {
@Before
public void setUp() throws Exception {
// given
- RecreateSimpleObjects fs = new RecreateSimpleObjects().setNumber(1);
+ fixtureScripts.runFixtureScript(new SimpleModuleTearDown(), null);
+ CreateSimpleObjects fs = new CreateSimpleObjects().setNumber(1);
fixtureScripts.runFixtureScript(fs, null);
transactionService.nextTransaction();
@@ -90,7 +92,7 @@ public class SimpleObject_IntegTest extends SimpleModuleIntegTestAbstract {
public void can_be_updated_directly() throws Exception {
// when
- wrap(mixin(SimpleObject.updateName.class, simpleObject)).exec("new name");
+ wrap(simpleObject).updateName("new name");
transactionService.nextTransaction();
// then
@@ -105,7 +107,7 @@ public class SimpleObject_IntegTest extends SimpleModuleIntegTestAbstract {
expectedExceptions.expectMessage("Exclamation mark is not allowed");
// when
- wrap(mixin(SimpleObject.updateName.class, simpleObject)).exec("new name!");
+ wrap(simpleObject).updateName("new name!");
}
}
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/specglue/SimpleObjectMenuGlue.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/specglue/SimpleObjectMenuGlue.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/specglue/SimpleObjectMenuGlue.java
new file mode 100644
index 0000000..e5fd971
--- /dev/null
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/module-simple/src/test/java/domainapp/modules/simple/specglue/SimpleObjectMenuGlue.java
@@ -0,0 +1,56 @@
+#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.specglue;
+
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.isis.core.specsupport.specs.CukeGlueAbstract;
+
+import cucumber.api.java.en.Given;
+import cucumber.api.java.en.When;
+import domainapp.modules.simple.dom.impl.SimpleObject;
+import domainapp.modules.simple.dom.impl.SimpleObjectMenu;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class SimpleObjectMenuGlue extends CukeGlueAbstract {
+
+ @Given("^there are.* (${symbol_escape}${symbol_escape}d+) simple objects${symbol_dollar}")
+ public void there_are_N_simple_objects(int n) throws Throwable {
+ try {
+ final List<SimpleObject> list = simpleObjectMenu().listAll();
+ assertThat(list.size(), is(n));
+ putVar("java.util.List", "simpleObjects", list);
+ } finally {
+ assertMocksSatisfied();
+ }
+ }
+
+ @When("^.*create a .*simple object${symbol_dollar}")
+ public void create_a_simple_object() throws Throwable {
+ simpleObjectMenu().create(UUID.randomUUID().toString());
+ }
+
+ private SimpleObjectMenu simpleObjectMenu() {
+ return service(SimpleObjectMenu.class);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
index 092fa90..a0c4a22 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/pom.xml
@@ -87,6 +87,10 @@
<jdepend-maven-plugin.version>2.0-beta-2</jdepend-maven-plugin.version>
<findbugs-maven-plugin.version>2.5</findbugs-maven-plugin.version>
+ <mavenmixin-docker.version>0.0.2</mavenmixin-docker.version>
+ <maven-deploy-plugin.version>2.8.1</maven-deploy-plugin.version>
+ <docker-maven-plugin.version>0.4.13</docker-maven-plugin.version>
+
<mavendeps-isistesting.version>0.0.2</mavendeps-isistesting.version>
<mavendeps-isisintellij.version>0.0.1</mavendeps-isisintellij.version>
<mavendeps-isiswebapp.version>0.0.1</mavendeps-isiswebapp.version>
@@ -231,6 +235,14 @@
<artifactId>findbugs-maven-plugin</artifactId>
<version>${findbugs-maven-plugin.version}</version>
</plugin>
+
+ <!-- mavenmixin-docker -->
+ <plugin>
+ <groupId>com.spotify</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>${docker-maven-plugin.version}</version>
+ </plugin>
+
</plugins>
</pluginManagement>
<plugins>
@@ -317,6 +329,12 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
+ <artifactId>${rootArtifactId}-module-simple</artifactId>
+ <version>${version}</version>
+ <type>test-jar</type>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
<artifactId>${rootArtifactId}-application</artifactId>
<version>${version}</version>
</dependency>
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/pom.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/pom.xml
index b614837..dd9ddaa 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/pom.xml
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/pom.xml
@@ -41,11 +41,18 @@
<jetty-console-maven-plugin.backgroundImage>${basedir}/src/main/jettyconsole/isis-banner.png</jetty-console-maven-plugin.backgroundImage>
<maven-war-plugin.warName>${project.parent.artifactId}</maven-war-plugin.warName>
+
+ <docker-plugin.imageName>DOCKER_REGISTRY_ACCOUNT/${project.parent.artifactId}</docker-plugin.imageName>
+ <docker-plugin.resource.include>${maven-war-plugin.warName}.war</docker-plugin.resource.include>
+ <docker-plugin.serverId>docker-hub</docker-plugin.serverId>
+ <docker-plugin.registryUrl>https://index.docker.io/v1/</docker-plugin.registryUrl>
+
</properties>
<build>
<resources>
<resource>
+ <filtering>true</filtering>
<directory>src/main/resources</directory>
</resource>
<resource>
@@ -85,6 +92,7 @@
</execution>
</executions>
</plugin>
+
<plugin>
<groupId>com.github.odavid.maven.plugins</groupId>
<artifactId>mixin-maven-plugin</artifactId>
@@ -117,9 +125,15 @@
<artifactId>jettyconsole</artifactId>
<version>${mavenmixin-jettyconsole.version}</version>
</mixin>
+ <mixin>
+ <groupId>com.danhaywood.mavenmixin</groupId>
+ <artifactId>docker</artifactId>
+ <version>${mavenmixin-docker.version}</version>
+ </mixin>
</mixins>
</configuration>
</plugin>
+
</plugins>
</build>
@@ -183,7 +197,6 @@
</dependency>
</dependencies>
</profile>
- <!--
<profile>
<id>jdbc-postgres</id>
<activation>
@@ -199,7 +212,6 @@
</dependency>
</dependencies>
</profile>
- -->
<!--
<profile>
<id>jdbc-mssql</id>
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/translations-en.po
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/translations-en.po b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/translations-en.po
index c927400..5d9f038 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/translations-en.po
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/translations-en.po
@@ -488,7 +488,7 @@ msgstr "Remember Me"
#: org.apache.isis.viewer.wicket.ui.pages.login.WicketSignInPage
msgid "resetButtonLabel"
-msgstr "RecreateSimpleObjects"
+msgstr "CreateSimpleObjects"
#: org.wicketstuff.select2.Select2Choice
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/translations-es.po
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/translations-es.po b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/translations-es.po
index 2730e34..5c0f06b 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/translations-es.po
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/translations-es.po
@@ -487,7 +487,7 @@ msgstr "Remember Me"
#: org.apache.isis.viewer.wicket.ui.pages.login.WicketSignInPage
msgid "resetButtonLabel"
-msgstr "RecreateSimpleObjects"
+msgstr "CreateSimpleObjects"
#: org.wicketstuff.select2.Select2Choice
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/translations-nl.po
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/translations-nl.po b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/translations-nl.po
index 6efa8de..f7c3e89 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/translations-nl.po
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/translations-nl.po
@@ -488,7 +488,7 @@ msgstr "Remember Me"
#: org.apache.isis.viewer.wicket.ui.pages.login.WicketSignInPage
msgid "resetButtonLabel"
-msgstr "RecreateSimpleObjects"
+msgstr "CreateSimpleObjects"
#: org.wicketstuff.select2.Select2Choice
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/translations.po
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/translations.po b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/translations.po
index d071cdf..52dcfb3 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/translations.po
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/translations.po
@@ -487,7 +487,7 @@ msgstr "Remember Me"
#: org.apache.isis.viewer.wicket.ui.pages.login.WicketSignInPage
msgid "resetButtonLabel"
-msgstr "RecreateSimpleObjects"
+msgstr "CreateSimpleObjects"
#: org.wicketstuff.select2.Select2Choice
http://git-wip-us.apache.org/repos/asf/isis/blob/2931909d/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties b/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties
index e7afa59..44d4718 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 @@
-#Sat Dec 10 18:17:52 GMT 2016
+#Sat Dec 31 15:00:50 GMT 2016
package=it.pkg
version=0.1-SNAPSHOT
groupId=archetype.it