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 2021/01/27 10:14:23 UTC

[isis-app-simpleapp] 01/02: fixes compile issue

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

danhaywood pushed a commit to branch jdo
in repository https://gitbox.apache.org/repos/asf/isis-app-simpleapp.git

commit 55a3dc53d572a2b7e3c42996abade60ff51eae6c
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Jan 27 10:10:21 2021 +0000

    fixes compile issue
---
 webapp/pom.xml                                     |  7 ---
 .../integtests/ApplicationIntegTestAbstract.java   |  3 +-
 .../SimpleWebAppTestConfiguration_usingJdo.java    | 56 ++++++++++++++++++++++
 3 files changed, 57 insertions(+), 9 deletions(-)

diff --git a/webapp/pom.xml b/webapp/pom.xml
index bc012c6..da6aba1 100644
--- a/webapp/pom.xml
+++ b/webapp/pom.xml
@@ -176,13 +176,6 @@
         <!-- TESTING -->
 
         <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>simpleapp-module-simple</artifactId>
-            <type>test-jar</type>
-            <scope>test</scope>
-        </dependency>
-        
-        <dependency>
             <groupId>org.apache.isis.mavendeps</groupId>
             <artifactId>isis-mavendeps-integtests</artifactId>
             <type>pom</type>
diff --git a/webapp/src/test/java/domainapp/webapp/integtests/ApplicationIntegTestAbstract.java b/webapp/src/test/java/domainapp/webapp/integtests/ApplicationIntegTestAbstract.java
index 082f5da..5d85838 100644
--- a/webapp/src/test/java/domainapp/webapp/integtests/ApplicationIntegTestAbstract.java
+++ b/webapp/src/test/java/domainapp/webapp/integtests/ApplicationIntegTestAbstract.java
@@ -4,13 +4,12 @@ import org.springframework.boot.test.context.SpringBootTest;
 
 import org.apache.isis.testing.integtestsupport.applib.IsisIntegrationTestAbstract;
 
-import domainapp.modules.simple.integtests.SimpleModuleTestConfiguration_usingJdo;
 import domainapp.webapp.application.ApplicationModule;
 import domainapp.webapp.bdd.stepdefs.BddStepDefsModule;
 
 @SpringBootTest(
     classes = {
-            SimpleModuleTestConfiguration_usingJdo.class,
+            SimpleWebAppTestConfiguration_usingJdo.class,
             BddStepDefsModule.class,
             ApplicationModule.class,
     },
diff --git a/webapp/src/test/java/domainapp/webapp/integtests/SimpleWebAppTestConfiguration_usingJdo.java b/webapp/src/test/java/domainapp/webapp/integtests/SimpleWebAppTestConfiguration_usingJdo.java
new file mode 100644
index 0000000..eaebce4
--- /dev/null
+++ b/webapp/src/test/java/domainapp/webapp/integtests/SimpleWebAppTestConfiguration_usingJdo.java
@@ -0,0 +1,56 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package domainapp.webapp.integtests;
+
+import org.springframework.boot.SpringBootConfiguration;
+import org.springframework.context.annotation.Import;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.context.annotation.PropertySources;
+
+import org.apache.isis.core.config.presets.IsisPresets;
+import org.apache.isis.core.runtimeservices.IsisModuleCoreRuntimeServices;
+import org.apache.isis.persistence.jdo.datanucleus.IsisModuleJdoDatanucleus;
+import org.apache.isis.security.bypass.IsisModuleSecurityBypass;
+import org.apache.isis.testing.fixtures.applib.IsisModuleTestingFixturesApplib;
+
+import domainapp.modules.simple.SimpleModule;
+
+/**
+ * Compared to the production app manifest <code>domainapp.webapp.AppManifest</code>,
+ * here we in effect disable security checks, and we exclude any web/UI modules.
+ */
+@SpringBootConfiguration
+@Import({
+
+    IsisModuleCoreRuntimeServices.class,
+    IsisModuleSecurityBypass.class,
+    IsisModuleJdoDatanucleus.class,
+    IsisModuleTestingFixturesApplib.class,
+
+    SimpleModule.class
+})
+@PropertySources({
+    @PropertySource(IsisPresets.H2InMemory_withUniqueSchema),
+    @PropertySource(IsisPresets.DataNucleusAutoCreate),
+    @PropertySource(IsisPresets.UseLog4j2Test),
+})
+public class SimpleWebAppTestConfiguration_usingJdo {
+
+
+}