Update spring boot to 2.4 67/136967/4
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Thu, 11 Jan 2024 10:36:27 +0000 (11:36 +0100)
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Thu, 11 Jan 2024 13:54:54 +0000 (14:54 +0100)
- update spring boot from 2.3 to 2.4
- remove compile-time dependency on powermock introduced by eelf-core
- remove dependencyManagement declarations for powermock since it's not used anymore

Issue-ID: AAI-3725
Change-Id: I05a35e0cee80b27123f28bb8eeb8ed885c83a173
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
22 files changed:
aai-aaf-auth/pom.xml
aai-core/pom.xml
aai-core/src/test/java/org/onap/aai/introspection/sideeffect/DataCopyTest.java
aai-core/src/test/java/org/onap/aai/introspection/sideeffect/DataLinkTest.java
aai-core/src/test/java/org/onap/aai/introspection/sideeffect/OwnerCheckTest.java
aai-core/src/test/java/org/onap/aai/introspection/sideeffect/PrivateEdgeTest.java
aai-core/src/test/java/org/onap/aai/serialization/queryformats/AggregateFormatTest.java
aai-core/src/test/java/org/onap/aai/serialization/queryformats/CountQuerySupportTest.java
aai-core/src/test/java/org/onap/aai/serialization/queryformats/MultiFormatTest.java
aai-core/src/test/java/org/onap/aai/serialization/queryformats/PathedURLTest.java
aai-core/src/test/java/org/onap/aai/serialization/queryformats/RawFormatTest.java
aai-core/src/test/java/org/onap/aai/serialization/queryformats/ResourceFormatTest.java
aai-core/src/test/java/org/onap/aai/serialization/queryformats/ResourceWithSoTTest.java
aai-core/src/test/java/org/onap/aai/serialization/queryformats/SimpleFormatTest.java
aai-core/src/test/java/org/onap/aai/serialization/queryformats/utils/QueryParamInjectorTest.java
aai-core/src/test/java/org/onap/aai/serialization/queryformats/utils/UrlBuilderTest.java
aai-els-onap-logging/pom.xml
aai-parent/pom.xml
aai-schema-abstraction/pom.xml
aai-schema-abstraction/src/test/java/org/onap/aai/schemaif/oxm/OxmSchemaProviderTest.java
aai-schema-ingest/pom.xml
aai-utils/pom.xml

index ef7d956..18b5804 100644 (file)
             <groupId>org.springframework</groupId>
             <artifactId>spring-context</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-web</artifactId>
             <groupId>commons-io</groupId>
             <artifactId>commons-io</artifactId>
         </dependency>
+        <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+                       <scope>test</scope>
+               </dependency>
+        <!-- TODO: Migrate tests to junit 5 and remove this dependency -->
+               <dependency>
+                       <groupId>org.junit.vintage</groupId>
+                       <artifactId>junit-vintage-engine</artifactId>
+                       <scope>test</scope>
+                       <exclusions>
+                                       <exclusion>
+                                                       <groupId>org.hamcrest</groupId>
+                                                       <artifactId>hamcrest-core</artifactId>
+                                       </exclusion>
+                       </exclusions>
+               </dependency>
     </dependencies>
 </project>
index 4281629..d210f4e 100644 (file)
@@ -38,7 +38,7 @@ limitations under the License.
                <jacoco.line.coverage.limit>0.50</jacoco.line.coverage.limit>
                <gremlin.version>3.2.2</gremlin.version>
                <groovy.version>2.5.15</groovy.version>
-               <mockito.core.version>2.4.0</mockito.core.version>
+               <mockito.core.version>3.4.0</mockito.core.version>
                <!-- Start of Default ONAP Schema Properties -->
                <aai.wiki.link>https://wiki.onap.org/</aai.wiki.link>
                <gendoc.version>v15</gendoc.version>
@@ -341,11 +341,6 @@ limitations under the License.
                        <artifactId>spring-boot-test</artifactId>
                        <scope>test</scope>
                </dependency>
-               <dependency>
-                       <groupId>org.powermock</groupId>
-                       <artifactId>powermock-module-javaagent</artifactId>
-                       <scope>test</scope>
-               </dependency>
                <dependency>
                        <groupId>org.skyscreamer</groupId>
                        <artifactId>jsonassert</artifactId>
index e83d3bd..779139e 100644 (file)
@@ -123,7 +123,7 @@ public class DataCopyTest extends AAISetup {
     @Before
     public void initMock() {
         loader = loaderFactory.createLoaderForVersion(introspectorFactoryType, schemaVersions.getDefaultVersion());
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
         dbEngine = new JanusGraphDBEngine(queryStyle, loader);
     }
 
index 440d279..2a68e53 100644 (file)
@@ -169,7 +169,7 @@ public class DataLinkTest extends DataLinkSetup {
     @Before
     public void initMock() {
         loader = loaderFactory.createLoaderForVersion(introspectorFactoryType, schemaVersions.getDefaultVersion());
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
         dbEngine = new JanusGraphDBEngine(queryStyle, loader);
     }
 
index a349f85..7ca4e04 100644 (file)
@@ -109,7 +109,7 @@ public class OwnerCheckTest extends AAISetup {
     @Before
     public void initMock() {
         loader = loaderFactory.createLoaderForVersion(introspectorFactoryType, schemaVersions.getDefaultVersion());
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
         dbEngine = new JanusGraphDBEngine(queryStyle, loader);
     }
 
index edace19..d99b14e 100644 (file)
@@ -121,7 +121,7 @@ public class PrivateEdgeTest extends AAISetup {
     public void initMock() {
         Loader loader =
                 loaderFactory.createLoaderForVersion(introspectorFactoryType, schemaVersions.getDefaultVersion());
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
         dbEngine = new JanusGraphDBEngine(queryStyle, loader);
     }
 
index 2b80fb1..f7a7fde 100644 (file)
@@ -77,7 +77,7 @@ public class AggregateFormatTest extends AAISetup {
 
         version = schemaVersions.getDefaultVersion();
 
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
 
         graph = TinkerGraph.open();
 
index daf7d47..5c6ca4b 100644 (file)
@@ -80,7 +80,7 @@ public class CountQuerySupportTest extends AAISetup {
     public void setUp() throws Exception {
 
         version = schemaVersions.getDefaultVersion();
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
 
         graph = TinkerGraph.open();
 
index 09a1d1b..58fc014 100644 (file)
@@ -94,7 +94,7 @@ public class MultiFormatTest extends AAISetup {
     public void setUp() throws Exception {
 
         version = schemaVersions.getAppRootVersion();
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
 
         graph = TinkerGraph.open();
 
index b38b20a..6ed4253 100644 (file)
@@ -80,7 +80,7 @@ public class PathedURLTest extends AAISetup {
 
         version = schemaVersions.getDefaultVersion();
 
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
 
         graph = TinkerGraph.open();
 
index 232e80b..217ccd4 100644 (file)
@@ -77,7 +77,7 @@ public class RawFormatTest extends AAISetup {
 
         version = schemaVersions.getDefaultVersion();
 
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
 
         graph = TinkerGraph.open();
 
index e26c56e..587d943 100644 (file)
@@ -72,7 +72,7 @@ public class ResourceFormatTest extends AAISetup {
     @Before
     public void setUp() throws Exception {
 
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
 
         graph = TinkerGraph.open();
 
index 2bb3971..ac08ae2 100644 (file)
@@ -73,7 +73,7 @@ public class ResourceWithSoTTest extends AAISetup {
     public void setUp() throws Exception {
 
         version = schemaVersions.getDefaultVersion();
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
 
         graph = TinkerGraph.open();
 
index 7634d22..bfe41e1 100644 (file)
@@ -80,7 +80,7 @@ public class SimpleFormatTest extends AAISetup {
     @Before
     public void setUp() throws Exception {
 
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
 
         graph = TinkerGraph.open();
 
index 0ac1216..9b0639f 100644 (file)
@@ -47,7 +47,7 @@ public class QueryParamInjectorTest {
 
     @Test
     public void test() throws AAIException {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
         QueryParamInjector injector = QueryParamInjector.getInstance();
 
         MultivaluedMap<String, String> params = new MultivaluedHashMap<>();
index 6367144..4174207 100644 (file)
@@ -52,7 +52,7 @@ public class UrlBuilderTest extends AAISetup {
 
     @Before
     public void before() throws UnsupportedEncodingException, URISyntaxException {
-        MockitoAnnotations.initMocks(this);
+        MockitoAnnotations.openMocks(this);
         when(serializer.getURIForVertex(any(Vertex.class))).thenReturn(new URI(uri));
         when(v.id()).thenReturn(vId);
     }
index 0fb4418..3ca0cc7 100644 (file)
         <dependency>
             <groupId>org.onap.logging-analytics</groupId>
             <artifactId>logging-slf4j</artifactId>
+            <exclusions>
+                <exclusion>
+                  <groupId>org.powermock</groupId>
+                  <artifactId>powermock-module-junit4</artifactId>
+                </exclusion>
+              </exclusions>
         </dependency>
         <dependency>
             <groupId>javax.servlet</groupId>
             <artifactId>slf4j-api</artifactId>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-core</artifactId>
             <artifactId>spring-boot-starter-test</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <!-- TODO: Migrate tests to junit 5 and remove this dependency -->
+               <dependency>
+                       <groupId>org.junit.vintage</groupId>
+                       <artifactId>junit-vintage-engine</artifactId>
+                       <scope>test</scope>
+                       <exclusions>
+                                       <exclusion>
+                                                       <groupId>org.hamcrest</groupId>
+                                                       <artifactId>hamcrest-core</artifactId>
+                                       </exclusion>
+                       </exclusions>
+               </dependency>
     </dependencies>
 
     <!-- <build>
index b713f63..e9647c3 100644 (file)
@@ -92,8 +92,8 @@ limitations under the License.
         Please don't upgrade to 2.3.0 or above for nexus iq or security scans
         as it could potentially break our code
       -->
-    <spring.boot.version>2.3.12.RELEASE</spring.boot.version>
-    <spring.version>5.2.12.RELEASE</spring.version>
+    <spring.boot.version>2.4.13</spring.boot.version>
+    <spring.version>5.3.13</spring.version>
     <spring.jms.version>5.2.25.RELEASE</spring.jms.version>
     <spring.test.version>${spring.version}</spring.test.version>
     <json.path.version>2.2.0</json.path.version>
@@ -104,12 +104,11 @@ limitations under the License.
     <logback.version>1.2.7</logback.version>
     <slf4j.version>1.7.25</slf4j.version>
     <log4j.version>2.17.1</log4j.version>
-    <mockito.all.version>1.10.19</mockito.all.version>
-    <mockito.core.version>1.10.19</mockito.core.version>
+    <mockito.all.version>3.4.0</mockito.all.version>
+    <mockito.core.version>3.4.0</mockito.core.version>
     <netty.handler.version>4.1.63.Final</netty.handler.version>
     <netty.version>4.1.63.Final</netty.version>
     <opencsv.version>3.1</opencsv.version>
-    <powermock.version>1.6.6</powermock.version>
     <plexus.utils.version>3.1.1</plexus.utils.version>
     <reflections.version>0.9.10</reflections.version>
     <snakeyaml.version>1.29</snakeyaml.version>
@@ -134,7 +133,6 @@ limitations under the License.
 
     <spring.security.rsa.version>1.0.8.RELEASE</spring.security.rsa.version>
     <json.simple.version>1.1.1</json.simple.version>
-    <powermock.api.mockito2.version>2.0.4</powermock.api.mockito2.version>
     <aspectj.version>1.9.1</aspectj.version>
     <logging.analytics.version>1.5.1</logging.analytics.version>
   </properties>
@@ -178,7 +176,7 @@ limitations under the License.
       <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-jms</artifactId>
-        <version>${spring.jms.version}</version>
+        <version>5.3.31</version>
       </dependency>
 
 
@@ -375,33 +373,6 @@ limitations under the License.
         <version>${mockito.core.version}</version>
         <scope>test</scope>
       </dependency>
-      <dependency>
-        <groupId>org.powermock</groupId>
-        <artifactId>powermock-module-junit4</artifactId>
-        <version>${powermock.version}</version>
-      </dependency>
-
-      <dependency>
-        <groupId>org.powermock</groupId>
-        <artifactId>powermock-module-junit4-rule-agent</artifactId>
-        <version>${powermock.version}</version>
-      </dependency>
-
-      <dependency>
-        <groupId>org.powermock</groupId>
-        <artifactId>powermock-api-mockito2</artifactId>
-        <version>${powermock.api.mockito2.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.powermock</groupId>
-        <artifactId>powermock-core</artifactId>
-        <version>${powermock.api.mockito2.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.powermock</groupId>
-        <artifactId>powermock-module-javaagent</artifactId>
-        <version>${powermock.version}</version>
-      </dependency>
       <dependency>
         <groupId>com.beust</groupId>
         <artifactId>jcommander</artifactId>
index 324d033..91879d3 100644 (file)
       <groupId>com.att.eelf</groupId>
       <artifactId>eelf-core</artifactId>
       <version>1.0.1-oss</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.powermock</groupId>
+          <artifactId>powermock-module-junit4</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.powermock</groupId>
+          <artifactId>powermock-api-mockito</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.onap.aai.logging-service</groupId>
index 21ba985..222be0e 100644 (file)
@@ -29,7 +29,7 @@ import java.util.Set;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.runners.MockitoJUnitRunner;
+import org.mockito.junit.MockitoJUnitRunner;
 import org.onap.aai.schemaif.SchemaProviderException;
 import org.onap.aai.schemaif.definitions.EdgeSchema;
 import org.onap.aai.schemaif.definitions.PropertySchema;
index ad2f9fc..7193ebd 100644 (file)
@@ -138,9 +138,21 @@ limitations under the License.
                        <artifactId>junit</artifactId>
                        <scope>test</scope>
                </dependency>
+               <!-- TODO: Migrate tests to junit 5 and remove this dependency -->
+               <dependency>
+                       <groupId>org.junit.vintage</groupId>
+                       <artifactId>junit-vintage-engine</artifactId>
+                       <scope>test</scope>
+                       <exclusions>
+                                       <exclusion>
+                                                       <groupId>org.hamcrest</groupId>
+                                                       <artifactId>hamcrest-core</artifactId>
+                                       </exclusion>
+                       </exclusions>
+               </dependency>
                <dependency>
                        <groupId>org.mockito</groupId>
-                       <artifactId>mockito-all</artifactId>
+                       <artifactId>mockito-core</artifactId>
                        <scope>test</scope>
                </dependency>
                <dependency>
index 677c806..a2ca8ca 100644 (file)
             <groupId>com.att.eelf</groupId>
             <artifactId>eelf-core</artifactId>
             <version>1.0.1-oss</version>
+            <exclusions>
+                <exclusion>
+                  <groupId>org.powermock</groupId>
+                  <artifactId>powermock-module-junit4</artifactId>
+                </exclusion>
+                <exclusion>
+                  <groupId>org.powermock</groupId>
+                  <artifactId>powermock-api-mockito</artifactId>
+                </exclusion>
+              </exclusions>
         </dependency>
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>