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 2014/12/17 21:57:01 UTC

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

ISIS-928: 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/857e3563
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/857e3563
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/857e3563

Branch: refs/heads/master
Commit: 857e35632a6a93d495f41fa94bc55756f57e9278
Parents: 6ef5a7d
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Dec 17 18:14:49 2014 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Dec 17 18:14:49 2014 +0000

----------------------------------------------------------------------
 .../resources/archetype-resources/dom/pom.xml   | 32 ++++++++++++++++++++
 .../simple/SimpleObjectsFixturesService.java    |  6 ++--
 .../simple/objects/SimpleObjectAbstract.java    |  2 +-
 .../simple/scenario/SimpleObjectsFixture.java   |  8 ++---
 .../src/main/webapp/WEB-INF/isis.properties     | 16 ++++++----
 .../projects/basic/archetype.properties         |  2 +-
 6 files changed, 51 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/857e3563/example/archetype/simpleapp/src/main/resources/archetype-resources/dom/pom.xml
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/dom/pom.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/dom/pom.xml
index 5ab3e8b..6a10ffe 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/dom/pom.xml
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/dom/pom.xml
@@ -45,6 +45,38 @@
         </resources>
         <plugins>
             <plugin>
+                <groupId>org.apache.isis.tool</groupId>
+                <artifactId>isis-maven-plugin</artifactId>
+                <version>1.8.0-SNAPSHOT</version>
+                <configuration>
+                    <isisConfigDir>..\webapp\src\main\webapp\WEB-INF</isisConfigDir>
+                </configuration>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.apache.isis.example.application</groupId>
+                        <artifactId>todoapp-dom</artifactId>
+                        <version>1.8.0-SNAPSHOT</version>
+                    </dependency>
+                    <!--
+                    ... workaround to avoid conflict with plexus-default
+                        (not sure why exclusions in the isis-maven-plugin aren't sufficient, though ...
+                    -->
+                    <dependency>
+                        <groupId>com.google.guava</groupId>
+                        <artifactId>guava</artifactId>
+                        <version>16.0.1</version>
+                    </dependency>
+                </dependencies>
+                <executions>
+                    <execution>
+                        <phase>test</phase>
+                        <goals>
+                            <goal>validate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
                 <groupId>org.datanucleus</groupId>
                 <artifactId>datanucleus-maven-plugin</artifactId>
                 <version>${datanucleus-maven-plugin.version}</version>

http://git-wip-us.apache.org/repos/asf/isis/blob/857e3563/example/archetype/simpleapp/src/main/resources/archetype-resources/fixture/src/main/java/fixture/simple/SimpleObjectsFixturesService.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/fixture/src/main/java/fixture/simple/SimpleObjectsFixturesService.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/fixture/src/main/java/fixture/simple/SimpleObjectsFixturesService.java
index f7f1813..22c1f7d 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/fixture/src/main/java/fixture/simple/SimpleObjectsFixturesService.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/fixture/src/main/java/fixture/simple/SimpleObjectsFixturesService.java
@@ -24,8 +24,8 @@ package fixture.simple;
 import fixture.simple.scenario.SimpleObjectsFixture;
 
 import java.util.List;
-import org.apache.isis.applib.annotation.ClassLayout;
 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.Prototype;
 import org.apache.isis.applib.fixturescripts.FixtureResult;
@@ -36,8 +36,8 @@ import org.apache.isis.applib.fixturescripts.SimpleFixtureScript;
 /**
  * Enables fixtures to be installed from the application.
  */
-@ClassLayout(named="Prototyping")
-@DomainService(menuBar= DomainService.MenuBar.SECONDARY, menuOrder = "20")
+@DomainService
+@DomainServiceLayout(named="Prototyping", menuBar = DomainServiceLayout.MenuBar.SECONDARY, menuOrder = "20")
 public class SimpleObjectsFixturesService extends FixtureScripts {
 
     public SimpleObjectsFixturesService() {

http://git-wip-us.apache.org/repos/asf/isis/blob/857e3563/example/archetype/simpleapp/src/main/resources/archetype-resources/fixture/src/main/java/fixture/simple/objects/SimpleObjectAbstract.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/fixture/src/main/java/fixture/simple/objects/SimpleObjectAbstract.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/fixture/src/main/java/fixture/simple/objects/SimpleObjectAbstract.java
index 8f282ec..2aadd16 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/fixture/src/main/java/fixture/simple/objects/SimpleObjectAbstract.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/fixture/src/main/java/fixture/simple/objects/SimpleObjectAbstract.java
@@ -30,7 +30,7 @@ import org.apache.isis.applib.fixturescripts.FixtureScript;
 public abstract class SimpleObjectAbstract extends FixtureScript {
 
     protected SimpleObject create(final String name, ExecutionContext executionContext) {
-        return executionContext.add(this, simpleObjects.create(name));
+        return executionContext.addResult(this, simpleObjects.create(name));
     }
 
     @javax.inject.Inject

http://git-wip-us.apache.org/repos/asf/isis/blob/857e3563/example/archetype/simpleapp/src/main/resources/archetype-resources/fixture/src/main/java/fixture/simple/scenario/SimpleObjectsFixture.java
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/fixture/src/main/java/fixture/simple/scenario/SimpleObjectsFixture.java b/example/archetype/simpleapp/src/main/resources/archetype-resources/fixture/src/main/java/fixture/simple/scenario/SimpleObjectsFixture.java
index f067114..f2936e0 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/fixture/src/main/java/fixture/simple/scenario/SimpleObjectsFixture.java
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/fixture/src/main/java/fixture/simple/scenario/SimpleObjectsFixture.java
@@ -38,11 +38,11 @@ public class SimpleObjectsFixture extends FixtureScript {
     @Override
     protected void execute(ExecutionContext executionContext) {
 
-        executeChild(new SimpleObjectsTearDownFixture(), executionContext);
+        executionContext.executeChild(this, new SimpleObjectsTearDownFixture());
 
-        executeChild(new SimpleObjectForFoo(), executionContext);
-        executeChild(new SimpleObjectForBar(), executionContext);
-        executeChild(new SimpleObjectForBaz(), executionContext);
+        executionContext.executeChild(this, new SimpleObjectForFoo());
+        executionContext.executeChild(this, new SimpleObjectForBar());
+        executionContext.executeChild(this, new SimpleObjectForBaz());
     }
 
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/857e3563/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/isis.properties
----------------------------------------------------------------------
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/isis.properties b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/isis.properties
index eae9e91..bf63c40 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/isis.properties
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/webapp/WEB-INF/isis.properties
@@ -24,7 +24,7 @@ ${symbol_pound}
 ${symbol_pound} specify system components.
 ${symbol_pound}
 ${symbol_pound} The values correspond to the named components in the installer-registry.properties file
-${symbol_pound} in the org.apache.isis.runtimes.dflt:runtime JAR (in the org.apache.isis.runtimes.dflt.runtime package)
+${symbol_pound} in the org.apache.isis.core:isis-core-runtime JAR (in the org.apache.isis.core.runtime package)
 ${symbol_pound}
 ${symbol_pound} Although all configuration could reside in isis.properties, the recommendation is
 ${symbol_pound} to split out into component specific files:
@@ -35,11 +35,7 @@ ${symbol_pound} where
 ${symbol_pound}    * xxx is the component type, and
 ${symbol_pound}    * yyy is the component name.
 ${symbol_pound}
-${symbol_pound} For example, persistor_sql.properties holds configuration information specific to the
-${symbol_pound}
-${symbol_pound}
-${symbol_pound} If the components are changed, also remember to edit pom.xml (further comments can be 
-${symbol_pound} found in the persistor_xxx.properties files)
+${symbol_pound} For example, viewer_wicket.properties holds configuration information specific to the Wicket viewer.
 ${symbol_pound}
 ${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbo
 l_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}${symbol_pound}
 
@@ -99,6 +95,14 @@ ${symbol_pound}isis.reflector.validator=
 
 
 ${symbol_pound}
+${symbol_pound} layoutMetadataReader(s)
+${symbol_pound}
+
+${symbol_pound} isis.reflector.layoutMetadataReaders=org.apache.isis.core.metamodel.layoutmetadata.json.LayoutMetadataReaderFromJson
+
+
+
+${symbol_pound}
 ${symbol_pound} patterns for applying CssClassFa facet (font-awesome icons) to member names
 ${symbol_pound}
 isis.reflector.facet.cssClassFa.patterns=${symbol_escape}

http://git-wip-us.apache.org/repos/asf/isis/blob/857e3563/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 5957bd5..cc2c384 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 @@
-#Fri Dec 05 11:55:17 GMT 2014
+#Wed Dec 17 18:14:43 GMT 2014
 package=it.pkg
 version=0.1-SNAPSHOT
 groupId=archetype.it