Merge pull request #11546 from chaos2418/JAVA-8736

JAVA-8736: updating JDK version for the jdk9-and-above Jenkins jobs - W48
This commit is contained in:
kwoyke 2021-12-06 12:12:12 +01:00 committed by GitHub
commit 5fed81736d
12 changed files with 65 additions and 71 deletions

View File

@ -12,6 +12,7 @@
<groupId>com.baeldung</groupId>
<artifactId>parent-modules</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<dependencies>
@ -35,18 +36,6 @@
<artifactId>jakarta.xml.ws-api</artifactId>
<version>${jakarta.ws-api.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>${jaxws-rt.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-ri</artifactId>
<version>${jaxws-ri.version}</version>
<type>pom</type>
</dependency>
</dependencies>
<build>
@ -82,10 +71,8 @@
<maven.compiler.target.version>11</maven.compiler.target.version>
<guava.version>29.0-jre</guava.version>
<mockserver.version>5.11.1</mockserver.version>
<jakarta.ws-api.version>3.0.0</jakarta.ws-api.version>
<jaxws-rt.version>3.0.0</jaxws-rt.version>
<jaxws-ri.version>2.3.1</jaxws-ri.version>
<jaxws-maven-plugin.version>2.3.2</jaxws-maven-plugin.version>
<jakarta.ws-api.version>3.0.1</jakarta.ws-api.version>
<jaxws-maven-plugin.version>3.0.2</jaxws-maven-plugin.version>
</properties>
</project>

View File

@ -1,10 +1,10 @@
package com.baeldung.soap.ws.client.generated;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlSchemaType;
import jakarta.xml.bind.annotation.XmlType;
/**

View File

@ -1,19 +1,19 @@
package com.baeldung.soap.ws.client.generated;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.Action;
import jakarta.jws.WebMethod;
import jakarta.jws.WebParam;
import jakarta.jws.WebResult;
import jakarta.jws.WebService;
import jakarta.jws.soap.SOAPBinding;
import jakarta.xml.bind.annotation.XmlSeeAlso;
import jakarta.xml.ws.Action;
/**
* This class was generated by the JAX-WS RI.
* JAX-WS RI 2.3.2
* Generated source version: 2.2
* JAX-WS RI 3.0.2
* Generated source version: 3.0
*
*/
@WebService(name = "CountryService", targetNamespace = "http://server.ws.soap.baeldung.com/")

View File

@ -4,17 +4,17 @@ package com.baeldung.soap.ws.client.generated;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceFeature;
import jakarta.xml.ws.Service;
import jakarta.xml.ws.WebEndpoint;
import jakarta.xml.ws.WebServiceClient;
import jakarta.xml.ws.WebServiceException;
import jakarta.xml.ws.WebServiceFeature;
/**
* This class was generated by the JAX-WS RI.
* JAX-WS RI 2.3.2
* Generated source version: 2.2
* JAX-WS RI 3.0.2
* Generated source version: 3.0
*
*/
@WebServiceClient(name = "CountryServiceImplService", targetNamespace = "http://server.ws.soap.baeldung.com/", wsdlLocation = "http://localhost:8888/ws/country?wsdl")
@ -75,7 +75,7 @@ public class CountryServiceImplService
/**
*
* @param features
* A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
* A list of {@link jakarta.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
* @return
* returns CountryService
*/

View File

@ -1,15 +1,14 @@
package com.baeldung.soap.ws.client.generated;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.XmlEnum;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for currency.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* &lt;simpleType name="currency"&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt;

View File

@ -1,7 +1,7 @@
package com.baeldung.soap.ws.client.generated;
import javax.xml.bind.annotation.XmlRegistry;
import jakarta.xml.bind.annotation.XmlRegistry;
/**

View File

@ -1,2 +1,2 @@
@javax.xml.bind.annotation.XmlSchema(namespace = "http://server.ws.soap.baeldung.com/")
@jakarta.xml.bind.annotation.XmlSchema(namespace = "http://server.ws.soap.baeldung.com/")
package com.baeldung.soap.ws.client.generated;

View File

@ -13,6 +13,8 @@
<groupId>com.baeldung</groupId>
<artifactId>parent-modules</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<dependencies>

View File

@ -38,15 +38,15 @@
<version>${asspectj.version}</version>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>${powermock.version}</version>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>${mockito-inline.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito2</artifactId>
<version>${powermock.version}</version>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito-inline.version}</version>
<scope>test</scope>
</dependency>
<dependency>
@ -82,10 +82,10 @@
<properties>
<commons-math3.version>3.6.1</commons-math3.version>
<joda.version>2.10</joda.version>
<lombok.version>1.18.12</lombok.version>
<lombok.version>1.18.22</lombok.version>
<asspectj.version>1.8.9</asspectj.version>
<powermock.version>2.0.7</powermock.version>
<jmockit.version>1.44</jmockit.version>
<mockito-inline.version>4.0.0</mockito-inline.version>
</properties>
</project>

View File

@ -1,20 +1,15 @@
package com.baeldung.time;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import org.mockito.MockedStatic;
import java.time.Clock;
import java.time.Instant;
import java.time.ZoneId;
import static org.assertj.core.api.Assertions.assertThat;
import static org.powermock.api.mockito.PowerMockito.mockStatic;
import static org.powermock.api.mockito.PowerMockito.when;
import static org.mockito.Mockito.mockStatic;
@RunWith(PowerMockRunner.class)
@PrepareForTest({ Instant.class })
public class InstantUnitTest {
@Test
@ -22,12 +17,12 @@ public class InstantUnitTest {
String instantExpected = "2014-12-22T10:15:30Z";
Clock clock = Clock.fixed(Instant.parse(instantExpected), ZoneId.of("UTC"));
Instant instant = Instant.now(clock);
mockStatic(Instant.class);
when(Instant.now()).thenReturn(instant);
Instant now = Instant.now();
assertThat(now.toString()).isEqualTo(instantExpected);
try (MockedStatic<Instant> mockedStatic = mockStatic(Instant.class)) {
mockedStatic.when(Instant::now).thenReturn(instant);
Instant now = Instant.now();
assertThat(now.toString()).isEqualTo(instantExpected);
}
}
@Test

View File

@ -1,9 +1,6 @@
package com.baeldung.time;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import java.time.Clock;
import java.time.Instant;
@ -11,11 +8,7 @@ import java.time.LocalDateTime;
import java.time.ZoneId;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.when;
import static org.powermock.api.mockito.PowerMockito.mockStatic;
@RunWith(PowerMockRunner.class)
@PrepareForTest({ LocalDateTime.class })
public class LocalDateTimeUnitTest {
@Test

View File

@ -10,7 +10,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.4</version>
<version>2.6.0</version>
<relativePath />
</parent>
@ -96,6 +96,15 @@
<enabled>false</enabled>
</snapshots>
</repository>
<!-- This can be removed once a stable version of org.springframework.experimental:spring-aot-maven-plugin, compatible with latest JDK, is released. -->
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
@ -106,6 +115,15 @@
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<!-- This can be removed once a stable version of org.springframework.experimental:spring-aot-maven-plugin, compatible with latest JDK, is released. -->
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<profiles>
@ -166,7 +184,7 @@
<properties>
<java.version>11</java.version>
<repackage.classifier />
<spring-native.version>0.10.3</spring-native.version>
<spring-native.version>0.11.0-RC1</spring-native.version>
</properties>
</project>