You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2022/09/13 07:20:11 UTC

[isis] branch master updated: ISIS-3209: adds artifact internaltestvintage to ease internal test migration

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/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new cbddfc2d4f ISIS-3209: adds artifact internaltestvintage to ease internal test migration
cbddfc2d4f is described below

commit cbddfc2d4ff94a23b5822d0a42ec68e0d389d34c
Author: Andi Huber <ah...@apache.org>
AuthorDate: Tue Sep 13 09:20:05 2022 +0200

    ISIS-3209: adds artifact internaltestvintage to ease internal test
    migration
    
    - to be removed eventually
---
 core/internaltestvintage/pom.xml                   | 183 +++++++++++++++++++++
 .../jmocking/ImposteriserUsingCodegenPlugin.java   |   0
 .../jmocking/Imposterisers.java                    |   0
 .../jmocking/InjectIntoJMockAction.java            |   0
 .../internaltestsupport/jmocking/IsisActions.java  |   0
 .../internaltestsupport/jmocking/JMockActions.java |   0
 .../jmocking/JUnitRuleMockery2.java                |   0
 .../internaltestsupport/jmocking/MyMockomatic.java |   0
 .../jmocking/PostponedAction.java                  |   0
 core/pom.xml                                       |   6 +
 persistence/jdo/metamodel/pom.xml                  |   2 +-
 viewers/restfulobjects/testing/pom.xml             |   2 +-
 viewers/restfulobjects/viewer/pom.xml              |   2 +-
 viewers/wicket/viewer/pom.xml                      |  38 +----
 14 files changed, 194 insertions(+), 39 deletions(-)

diff --git a/core/internaltestvintage/pom.xml b/core/internaltestvintage/pom.xml
new file mode 100644
index 0000000000..a6c7d3ea9e
--- /dev/null
+++ b/core/internaltestvintage/pom.xml
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 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. -->
+<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/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<parent>
+		<groupId>org.apache.isis.core</groupId>
+		<artifactId>isis-core</artifactId>
+		<version>2.0.0-SNAPSHOT</version>
+	</parent>
+
+	<artifactId>isis-core-internaltestvintage</artifactId>
+	<name>Apache Isis Core - Internal Test Support (Vintage)</name>
+
+	<properties>
+		<jar-plugin.automaticModuleName>org.apache.isis.core.internaltestvintage</jar-plugin.automaticModuleName>
+		<git-plugin.propertiesDir>org/apache/isis/core/internaltestvintage</git-plugin.propertiesDir>
+	</properties>
+
+	<description>
+        Legacy support for writing unit tests in JUnit 4 with JMocj and AssertJ. DEPRECATED!
+    </description>
+
+	<dependencies>
+
+		<dependency>
+			<groupId>org.apache.isis.commons</groupId>
+			<artifactId>isis-commons</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.junit.jupiter</groupId>
+			<artifactId>junit-jupiter-api</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.junit.jupiter</groupId>
+			<artifactId>junit-jupiter-engine</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.junit.vintage</groupId>
+			<artifactId>junit-vintage-engine</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.assertj</groupId>
+			<artifactId>assertj-core</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>net.bytebuddy</groupId>
+			<artifactId>byte-buddy</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.mockito</groupId>
+			<artifactId>mockito-core</artifactId>
+			<exclusions>
+				<exclusion>
+					<groupId>net.bytebuddy</groupId>
+					<artifactId>byte-buddy</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>net.bytebuddy</groupId>
+					<artifactId>byte-buddy-agent</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+
+		<!-- framework default codegen for tests -->
+		<dependency>
+			<groupId>org.apache.isis.core</groupId>
+			<artifactId>isis-core-codegen-bytebuddy</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.hamcrest</groupId>
+			<artifactId>hamcrest-library</artifactId>
+			<scope>compile</scope>
+		</dependency>
+
+		<!-- JDO API (non transient, provided by plugin) -->
+		<dependency>
+			<!-- v3.2 not available yet, use datanucleus staging for now -->
+			<!-- <groupId>javax.jdo</groupId> -->
+			<!-- <artifactId>jdo-api</artifactId> -->
+			<groupId>org.datanucleus</groupId>
+			<artifactId>javax.jdo</artifactId>
+			<!-- provided by plugins -->
+			<scope>provided</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+		</dependency>
+
+		<!-- SPRING -->
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-test</artifactId>
+			<exclusions>
+				<exclusion>
+					<groupId>org.ow2.asm</groupId>
+					<artifactId>asm</artifactId>
+				</exclusion>
+				<exclusion>
+					<!-- when spring-boot release lags behind spring-core release explicitly
+						spring-test added below -->
+					<groupId>org.springframework</groupId>
+					<artifactId>spring-test</artifactId>
+				</exclusion>
+				<exclusion>
+					<!-- when spring-boot release lags behind spring-core release explicitly
+						spring-test added below -->
+					<groupId>org.springframework</groupId>
+					<artifactId>spring-core</artifactId>
+				</exclusion>
+				<exclusion>
+					<!-- we use log4j-2 instead -->
+					<groupId>org.springframework.boot</groupId>
+					<artifactId>spring-boot-starter-logging</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.slf4j</groupId>
+					<artifactId>slf4j-api</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-test</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.picocontainer</groupId>
+			<artifactId>picocontainer</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.jmock</groupId>
+			<artifactId>jmock</artifactId>
+			<exclusions>
+				<exclusion>
+					<groupId>org.ow2.asm</groupId>
+					<artifactId>asm</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+
+		<dependency>
+			<groupId>org.jmock</groupId>
+			<artifactId>jmock-junit4</artifactId>
+			<exclusions>
+				<exclusion>
+					<groupId>junit</groupId>
+					<artifactId>junit-dep</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.ow2.asm</groupId>
+					<artifactId>asm</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>net.bytebuddy</groupId>
+					<artifactId>byte-buddy</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+
+	</dependencies>
+
+</project>
diff --git a/core/internaltestsupport/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/ImposteriserUsingCodegenPlugin.java b/core/internaltestvintage/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/ImposteriserUsingCodegenPlugin.java
similarity index 100%
rename from core/internaltestsupport/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/ImposteriserUsingCodegenPlugin.java
rename to core/internaltestvintage/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/ImposteriserUsingCodegenPlugin.java
diff --git a/core/internaltestsupport/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/Imposterisers.java b/core/internaltestvintage/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/Imposterisers.java
similarity index 100%
rename from core/internaltestsupport/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/Imposterisers.java
rename to core/internaltestvintage/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/Imposterisers.java
diff --git a/core/internaltestsupport/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/InjectIntoJMockAction.java b/core/internaltestvintage/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/InjectIntoJMockAction.java
similarity index 100%
rename from core/internaltestsupport/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/InjectIntoJMockAction.java
rename to core/internaltestvintage/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/InjectIntoJMockAction.java
diff --git a/core/internaltestsupport/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/IsisActions.java b/core/internaltestvintage/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/IsisActions.java
similarity index 100%
rename from core/internaltestsupport/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/IsisActions.java
rename to core/internaltestvintage/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/IsisActions.java
diff --git a/core/internaltestsupport/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/JMockActions.java b/core/internaltestvintage/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/JMockActions.java
similarity index 100%
rename from core/internaltestsupport/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/JMockActions.java
rename to core/internaltestvintage/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/JMockActions.java
diff --git a/core/internaltestsupport/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/JUnitRuleMockery2.java b/core/internaltestvintage/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/JUnitRuleMockery2.java
similarity index 100%
rename from core/internaltestsupport/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/JUnitRuleMockery2.java
rename to core/internaltestvintage/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/JUnitRuleMockery2.java
diff --git a/core/internaltestsupport/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/MyMockomatic.java b/core/internaltestvintage/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/MyMockomatic.java
similarity index 100%
rename from core/internaltestsupport/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/MyMockomatic.java
rename to core/internaltestvintage/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/MyMockomatic.java
diff --git a/core/internaltestsupport/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/PostponedAction.java b/core/internaltestvintage/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/PostponedAction.java
similarity index 100%
rename from core/internaltestsupport/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/PostponedAction.java
rename to core/internaltestvintage/src/main/java/org/apache/isis/core/internaltestsupport/jmocking/PostponedAction.java
diff --git a/core/pom.xml b/core/pom.xml
index c5610d301d..647f5d8ce8 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -497,6 +497,11 @@
 				<artifactId>isis-core-internaltestsupport</artifactId>
 				<version>2.0.0-SNAPSHOT</version>
 			</dependency>
+			<dependency>
+				<groupId>org.apache.isis.core</groupId>
+				<artifactId>isis-core-internaltestvintage</artifactId>
+				<version>2.0.0-SNAPSHOT</version>
+			</dependency>
 			<dependency>
 				<groupId>org.apache.isis.core</groupId>
 				<artifactId>isis-core-metamodel</artifactId>
@@ -1644,6 +1649,7 @@
 		<module>config</module>
 		<module>interaction</module>
 		<module>internaltestsupport</module>
+		<module>internaltestvintage</module>
 		<module>metamodel</module>
 		<module>runtime</module>
 		<module>runtimeservices</module>
diff --git a/persistence/jdo/metamodel/pom.xml b/persistence/jdo/metamodel/pom.xml
index 69aa414de0..3df2708a7d 100644
--- a/persistence/jdo/metamodel/pom.xml
+++ b/persistence/jdo/metamodel/pom.xml
@@ -52,7 +52,7 @@
 		
         <dependency>
             <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-internaltestsupport</artifactId>
+            <artifactId>isis-core-internaltestvintage</artifactId>
             <scope>test</scope>
         </dependency>
 
diff --git a/viewers/restfulobjects/testing/pom.xml b/viewers/restfulobjects/testing/pom.xml
index 7d4954f315..61aae74a97 100644
--- a/viewers/restfulobjects/testing/pom.xml
+++ b/viewers/restfulobjects/testing/pom.xml
@@ -50,7 +50,7 @@
 
         <dependency>
             <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-internaltestsupport</artifactId>
+            <artifactId>isis-core-internaltestvintage</artifactId>
         </dependency>
 
 	</dependencies>
diff --git a/viewers/restfulobjects/viewer/pom.xml b/viewers/restfulobjects/viewer/pom.xml
index ec9dcf0808..fbcf9467a4 100644
--- a/viewers/restfulobjects/viewer/pom.xml
+++ b/viewers/restfulobjects/viewer/pom.xml
@@ -61,7 +61,7 @@
         
         <dependency>
             <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-internaltestsupport</artifactId>
+            <artifactId>isis-core-internaltestvintage</artifactId>
             <scope>test</scope>
         </dependency>
 
diff --git a/viewers/wicket/viewer/pom.xml b/viewers/wicket/viewer/pom.xml
index 2334fca8e9..8c3f0f9dd2 100644
--- a/viewers/wicket/viewer/pom.xml
+++ b/viewers/wicket/viewer/pom.xml
@@ -182,44 +182,10 @@
 
 		<dependency>
 			<groupId>org.apache.isis.core</groupId>
-			<artifactId>isis-core-internaltestsupport</artifactId>
-			<scope>provided</scope> <!-- this is a hack because wicket-core currently requires jupiter-api -->
-			<exclusions>
-				<exclusion>
-					<groupId>org.jmock</groupId>
-					<artifactId>jmock-junit4</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>junit</groupId>
-					<artifactId>junit</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>org.junit.vintage</groupId>
-					<artifactId>junit-vintage-engine</artifactId>
-				</exclusion>
-			</exclusions>
+			<artifactId>isis-core-internaltestvintage</artifactId>
+			<scope>test</scope>
 		</dependency>
 
-        <dependency>
-        	<groupId>org.jmock</groupId>
-        	<artifactId>jmock-junit4</artifactId>
-            <scope>test</scope>
-        	<exclusions>
-        		<exclusion>
-        			<groupId>org.ow2.asm</groupId>
-        			<artifactId>asm</artifactId>
-        		</exclusion>
-                <exclusion>
-                    <!-- for dependency convergence -->
-                    <groupId>junit</groupId>
-                    <artifactId>junit-dep</artifactId>
-                </exclusion>
-                <exclusion>
-                	<groupId>cglib</groupId>
-                	<artifactId>cglib</artifactId>
-                </exclusion>
-        	</exclusions>
-        </dependency>
     </dependencies>
 
 </project>