This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/causeway.git
The following commit(s) were added to refs/heads/master by this push:
new 134b1fa1f0 CAUSEWAY-3411: don't include viewers with
causeway-mavendeps-webapp
134b1fa1f0 is described below
commit 134b1fa1f0390565539e11ac5c6c79b7f867e267
Author: Andi Huber <[email protected]>
AuthorDate: Sat Apr 8 09:27:31 2023 +0200
CAUSEWAY-3411: don't include viewers with causeway-mavendeps-webapp
- also purge the RO linebreaker, we have _OsUtil for that now
---
core/webapp/pom.xml | 17 -----
examples/demo/web/pom.xml | 5 ++
.../web/_infra/utils/ThereCanBeOnlyOne.java | 87 ----------------------
.../java/demoapp/web/linebreaker/LineBreaker.java | 64 ----------------
extensions/core/executionoutbox/restclient/pom.xml | 10 +--
mavendeps/webapp/pom.xml | 20 ++---
regressiontests/stable-rest/pom.xml | 11 ++-
regressiontests/stable-viewers-common/pom.xml | 5 ++
regressiontests/stable-viewers-jdo/pom.xml | 4 +
regressiontests/stable-viewers-jpa/pom.xml | 4 +
regressiontests/stable/pom.xml | 10 +++
11 files changed, 42 insertions(+), 195 deletions(-)
diff --git a/core/webapp/pom.xml b/core/webapp/pom.xml
index f558bc0c6e..8f3826ebf6 100644
--- a/core/webapp/pom.xml
+++ b/core/webapp/pom.xml
@@ -77,23 +77,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator</artifactId>
</dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-thymeleaf</artifactId>
- <exclusions>
- <exclusion>
- <!-- don't bring in Spring's default
logging, otherwise breaks DN enhancer -->
-
<groupId>org.springframework.boot</groupId>
-
<artifactId>spring-boot-starter</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot</artifactId>
- </dependency>
<dependency>
<groupId>javax.servlet</groupId>
diff --git a/examples/demo/web/pom.xml b/examples/demo/web/pom.xml
index fbfdd23744..3db1ac1363 100644
--- a/examples/demo/web/pom.xml
+++ b/examples/demo/web/pom.xml
@@ -40,6 +40,11 @@
<artifactId>causeway-mavendeps-webapp</artifactId>
<type>pom</type>
</dependency>
+ <dependency>
+ <groupId>org.apache.causeway.viewer</groupId>
+
<artifactId>causeway-viewer-restfulobjects-jaxrsresteasy</artifactId>
+ <scope>optional</scope>
+ </dependency>
<!-- DEMO DOMAIN -->
diff --git
a/examples/demo/web/src/main/java/demoapp/web/_infra/utils/ThereCanBeOnlyOne.java
b/examples/demo/web/src/main/java/demoapp/web/_infra/utils/ThereCanBeOnlyOne.java
deleted file mode 100644
index 6b480e6642..0000000000
---
a/examples/demo/web/src/main/java/demoapp/web/_infra/utils/ThereCanBeOnlyOne.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package demoapp.web._infra.utils;
-
-import java.io.IOException;
-
-import org.apache.http.HttpHost;
-import org.apache.http.auth.AuthScope;
-import org.apache.http.auth.UsernamePasswordCredentials;
-import org.apache.http.client.AuthCache;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.protocol.HttpClientContext;
-import org.apache.http.impl.auth.BasicScheme;
-import org.apache.http.impl.client.BasicAuthCache;
-import org.apache.http.impl.client.BasicCredentialsProvider;
-import org.apache.http.impl.client.HttpClientBuilder;
-import
org.springframework.boot.web.servlet.context.ServletWebServerInitializedEvent;
-import org.springframework.context.ApplicationListener;
-import org.springframework.stereotype.Component;
-
-import lombok.val;
-
-@Component
-public class ThereCanBeOnlyOne implements
ApplicationListener<ServletWebServerInitializedEvent > {
-
- @Override
- public void onApplicationEvent(final ServletWebServerInitializedEvent
event) {
- final int port = event.getWebServer().getPort();
-
- try {
- invokeRemoteShutdown(port);
- } catch (Exception e) {
- // ignore them all
- }
-
- }
-
- // -- HELPER
-
- private static void invokeRemoteShutdown(int port) throws IOException {
-
- val targetHost = new HttpHost("localhost", port, "http");
- val credsProvider = new BasicCredentialsProvider();
- credsProvider.setCredentials(
- new AuthScope(targetHost.getHostName(), targetHost.getPort()),
- new UsernamePasswordCredentials("sven", "pass"));
-
- // Create AuthCache instance
- AuthCache authCache = new BasicAuthCache();
- // Generate BASIC scheme object and add it to the local auth cache
- BasicScheme basicAuth = new BasicScheme();
- authCache.put(targetHost, basicAuth);
-
- // Add AuthCache to the execution context
- HttpClientContext context = HttpClientContext.create();
- context.setCredentialsProvider(credsProvider);
- context.setAuthCache(authCache);
-
- val httpget = new
HttpGet("/restful/services/demo.LineBreaker/actions/shutdown/invoke");
-
- try(val httpClient = HttpClientBuilder.create().build()){
- try(val response = httpClient.execute(targetHost, httpget,
context)) {
- response.getEntity();
- }
- }
-
- }
-
-}
-
-
diff --git
a/examples/demo/web/src/main/java/demoapp/web/linebreaker/LineBreaker.java
b/examples/demo/web/src/main/java/demoapp/web/linebreaker/LineBreaker.java
deleted file mode 100644
index c8b0fafa8a..0000000000
--- a/examples/demo/web/src/main/java/demoapp/web/linebreaker/LineBreaker.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package demoapp.web.linebreaker;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-
-import org.apache.causeway.applib.annotation.Action;
-import org.apache.causeway.applib.annotation.DomainService;
-import org.apache.causeway.applib.annotation.NatureOfService;
-import org.apache.causeway.applib.annotation.PriorityPrecedence;
-import org.apache.causeway.applib.annotation.SemanticsOf;
-import org.apache.causeway.applib.services.iactnlayer.InteractionLayerTracker;
-import org.apache.causeway.core.interaction.session.CausewayInteraction;
-
-import lombok.RequiredArgsConstructor;
-import lombok.extern.log4j.Log4j2;
-
-/**
- *
- * REST endpoint to allow for remote application shutdown
- *
- */
-@Named("demo.LineBreaker")
-@DomainService(
- nature = NatureOfService.REST
-)
[email protected](PriorityPrecedence.EARLY)
-@RequiredArgsConstructor(onConstructor_ = { @Inject })
-@Log4j2
-public class LineBreaker {
-
- final InteractionLayerTracker iInteractionLayerTracker;
-
- @Action(semantics = SemanticsOf.SAFE)
- public void shutdown() {
- log.info("about to shutdown the JVM");
-
- // allow for current interaction to complete gracefully
- iInteractionLayerTracker.currentInteraction()
- .map(CausewayInteraction.class::cast)
- .ifPresent(interaction->{
- interaction.setOnClose(()->System.exit(0));
- });
- }
-
-
-}
diff --git a/extensions/core/executionoutbox/restclient/pom.xml
b/extensions/core/executionoutbox/restclient/pom.xml
index 5a9c7e2dae..7e51f8512b 100644
--- a/extensions/core/executionoutbox/restclient/pom.xml
+++ b/extensions/core/executionoutbox/restclient/pom.xml
@@ -102,13 +102,11 @@
<artifactId>causeway-mavendeps-webapp</artifactId>
<type>pom</type>
<scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>org.apache.causeway.viewer</groupId>
- <artifactId>causeway-viewer-wicket-viewer</artifactId>
- </exclusion>
- </exclusions>
</dependency>
+ <dependency>
+ <groupId>org.apache.causeway.viewer</groupId>
+
<artifactId>causeway-viewer-restfulobjects-jaxrsresteasy</artifactId>
+ </dependency>
<dependency>
<groupId>com.h2database</groupId>
diff --git a/mavendeps/webapp/pom.xml b/mavendeps/webapp/pom.xml
index 068be8192a..3376785b49 100644
--- a/mavendeps/webapp/pom.xml
+++ b/mavendeps/webapp/pom.xml
@@ -72,16 +72,6 @@
<artifactId>causeway-schema</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.causeway.viewer</groupId>
- <artifactId>causeway-viewer-wicket-viewer</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.causeway.viewer</groupId>
-
<artifactId>causeway-viewer-restfulobjects-jaxrsresteasy</artifactId>
- </dependency>
-
<dependency>
<groupId>org.apache.causeway.core</groupId>
<artifactId>causeway-core-security</artifactId>
@@ -90,6 +80,11 @@
<groupId>org.apache.causeway.security</groupId>
<artifactId>causeway-security-bypass</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.causeway.core</groupId>
+ <artifactId>causeway-core-runtimeservices</artifactId>
+ </dependency>
<!--
we no longer include causeway-security-keycloak in order to
reduce the
@@ -126,11 +121,6 @@
</dependency>
-->
- <dependency>
- <groupId>org.apache.causeway.core</groupId>
- <artifactId>causeway-core-runtimeservices</artifactId>
- </dependency>
-
</dependencies>
</project>
diff --git a/regressiontests/stable-rest/pom.xml
b/regressiontests/stable-rest/pom.xml
index 7a8014ef07..0c4adfd938 100644
--- a/regressiontests/stable-rest/pom.xml
+++ b/regressiontests/stable-rest/pom.xml
@@ -62,12 +62,11 @@
<groupId>org.apache.causeway.mavendeps</groupId>
<artifactId>causeway-mavendeps-webapp</artifactId>
<type>pom</type>
- <exclusions>
- <exclusion>
-
<groupId>org.apache.causeway.viewer</groupId>
-
<artifactId>causeway-viewer-wicket-viewer</artifactId>
- </exclusion>
- </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.causeway.viewer</groupId>
+
<artifactId>causeway-viewer-restfulobjects-jaxrsresteasy</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
diff --git a/regressiontests/stable-viewers-common/pom.xml
b/regressiontests/stable-viewers-common/pom.xml
index f16ae9e698..c43369e72d 100644
--- a/regressiontests/stable-viewers-common/pom.xml
+++ b/regressiontests/stable-viewers-common/pom.xml
@@ -39,6 +39,11 @@
<artifactId>causeway-mavendeps-webapp</artifactId>
<type>pom</type>
</dependency>
+ <dependency>
+ <groupId>org.apache.causeway.viewer</groupId>
+ <artifactId>causeway-viewer-wicket-viewer</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.apache.causeway.regressiontests</groupId>
diff --git a/regressiontests/stable-viewers-jdo/pom.xml
b/regressiontests/stable-viewers-jdo/pom.xml
index d765892168..97098f663d 100644
--- a/regressiontests/stable-viewers-jdo/pom.xml
+++ b/regressiontests/stable-viewers-jdo/pom.xml
@@ -39,6 +39,10 @@
<artifactId>causeway-mavendeps-webapp</artifactId>
<type>pom</type>
</dependency>
+ <dependency>
+ <groupId>org.apache.causeway.viewer</groupId>
+ <artifactId>causeway-viewer-wicket-viewer</artifactId>
+ </dependency>
<dependency>
<groupId>org.apache.causeway.persistence</groupId>
diff --git a/regressiontests/stable-viewers-jpa/pom.xml
b/regressiontests/stable-viewers-jpa/pom.xml
index 4937b12ee5..268df59e00 100644
--- a/regressiontests/stable-viewers-jpa/pom.xml
+++ b/regressiontests/stable-viewers-jpa/pom.xml
@@ -39,6 +39,10 @@
<artifactId>causeway-mavendeps-webapp</artifactId>
<type>pom</type>
</dependency>
+ <dependency>
+ <groupId>org.apache.causeway.viewer</groupId>
+ <artifactId>causeway-viewer-wicket-viewer</artifactId>
+ </dependency>
<dependency>
<groupId>org.apache.causeway.persistence</groupId>
diff --git a/regressiontests/stable/pom.xml b/regressiontests/stable/pom.xml
index 6614a53726..d60a8f553f 100644
--- a/regressiontests/stable/pom.xml
+++ b/regressiontests/stable/pom.xml
@@ -113,6 +113,16 @@
<type>pom</type>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>org.apache.causeway.viewer</groupId>
+
<artifactId>causeway-viewer-restfulobjects-jaxrsresteasy</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.causeway.viewer</groupId>
+ <artifactId>causeway-viewer-wicket-viewer</artifactId>
+ <optional>true</optional>
+ </dependency>
<!-- <dependency> -->
<!-- <groupId>org.glassfish.jersey.ext</groupId> -->