Add more upgrades. Refactor some tets.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<properties>
|
||||
<docs.main>spring-cloud-release-tools</docs.main>
|
||||
<main.basedir>${basedir}/..</main.basedir>
|
||||
<maven.plugin.plugin.version>3.4</maven.plugin.plugin.version>
|
||||
<maven.plugin.plugin.version>3.6.4</maven.plugin.plugin.version>
|
||||
<configprops.inclusionPattern>releaser.*</configprops.inclusionPattern>
|
||||
</properties>
|
||||
<dependencies>
|
||||
|
||||
10
pom.xml
10
pom.xml
@@ -30,18 +30,18 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
|
||||
<spring-cloud-bom.version>2021.0.0</spring-cloud-bom.version>
|
||||
<spring-cloud-bom.version>2021.0.1</spring-cloud-bom.version>
|
||||
<jcabi-github.version>1.1.2</jcabi-github.version>
|
||||
<jsch-agent.version>0.0.9</jsch-agent.version>
|
||||
<hibernate-validator.version>7.0.2.Final</hibernate-validator.version>
|
||||
<hibernate-validator.version>7.0.4.Final</hibernate-validator.version>
|
||||
<!--Matches JGit in Boot:-->
|
||||
<org.eclipse.jgit-version>5.12.0.202106070339-r</org.eclipse.jgit-version>
|
||||
<!-- Versions plugin uses this version -->
|
||||
<maven-model.version>3.8.4</maven-model.version>
|
||||
<versions-maven-plugin.version>2.7</versions-maven-plugin.version>
|
||||
<maven-model.version>3.8.5</maven-model.version>
|
||||
<versions-maven-plugin.version>2.10.0</versions-maven-plugin.version>
|
||||
<handlebars.version>4.3.0</handlebars.version>
|
||||
<initializr-metadata.version>0.12.0</initializr-metadata.version>
|
||||
<awaitility.version>4.1.1</awaitility.version>
|
||||
<awaitility.version>4.2.0</awaitility.version>
|
||||
<sagan-site.version>1.0.0-SNAPSHOT</sagan-site.version>
|
||||
<javax.json.version>1.1.4</javax.json.version>
|
||||
<jopt-simple.version>5.0.4</jopt-simple.version>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<cloudfoundry-client.version>4.12.0.RELEASE</cloudfoundry-client.version>
|
||||
<cloudfoundry-client.version>5.7.0.RELEASE</cloudfoundry-client.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -328,7 +328,7 @@ class PomWriter {
|
||||
try {
|
||||
XMLInputFactory inputFactory = XMLInputFactory2.newInstance();
|
||||
inputFactory.setProperty(XMLInputFactory2.P_PRESERVE_LOCATION, Boolean.TRUE);
|
||||
newPom = new ModifiedPomXMLEventReader(input, inputFactory);
|
||||
newPom = new ModifiedPomXMLEventReader(input, inputFactory, null);
|
||||
}
|
||||
catch (XMLStreamException e) {
|
||||
log.error("Exception occurred while trying to parse pom", e);
|
||||
|
||||
@@ -20,10 +20,10 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URISyntaxException;
|
||||
import java.nio.file.Files;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import edu.emory.mathcs.backport.java.util.Collections;
|
||||
import org.apache.maven.model.Model;
|
||||
import org.assertj.core.api.BDDAssertions;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
package releaser.internal.buildsystem;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
import edu.emory.mathcs.backport.java.util.Arrays;
|
||||
import org.apache.maven.model.Model;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
@@ -37,13 +37,13 @@ import static org.mockito.Mockito.never;
|
||||
* @author Marcin Grzejszczak
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
public class PropertyVersionChangerTests {
|
||||
class PropertyVersionChangerTests {
|
||||
|
||||
@Mock
|
||||
PropertyStorer propertyStorer;
|
||||
|
||||
@Test
|
||||
public void should_set_version_when_project_matches_property_name() {
|
||||
void should_set_version_when_project_matches_property_name() {
|
||||
PropertyVersionChanger changer = new PropertyVersionChanger(model(), versions(), null, null,
|
||||
this.propertyStorer);
|
||||
|
||||
@@ -54,7 +54,7 @@ public class PropertyVersionChangerTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_not_set_version_when_project_doesnt_match_property_name() {
|
||||
void should_not_set_version_when_project_doesnt_match_property_name() {
|
||||
PropertyVersionChanger changer = new PropertyVersionChanger(nonMatchingModel(), versions(), null, null,
|
||||
this.propertyStorer);
|
||||
|
||||
@@ -64,7 +64,7 @@ public class PropertyVersionChangerTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_not_set_version_when_project_matches_property_name_and_versions_are_the_same() {
|
||||
void should_not_set_version_when_project_matches_property_name_and_versions_are_the_same() {
|
||||
PropertyVersionChanger changer = new PropertyVersionChanger(modelWithSameValues(), versions(), null, null,
|
||||
this.propertyStorer);
|
||||
|
||||
@@ -80,8 +80,8 @@ public class PropertyVersionChangerTests {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private Set<Project> allProjects() {
|
||||
return new HashSet<>(Arrays.asList(new Project[] { project("spring-cloud-aws", "1.2.0.BUILD-SNAPSHOT"),
|
||||
project("spring-cloud-sleuth", "1.2.0.BUILD-SNAPSHOT") }));
|
||||
return new HashSet<>(Arrays.asList(project("spring-cloud-aws", "1.2.0.BUILD-SNAPSHOT"),
|
||||
project("spring-cloud-sleuth", "1.2.0.BUILD-SNAPSHOT")));
|
||||
}
|
||||
|
||||
Project project(String name, String value) {
|
||||
|
||||
@@ -29,13 +29,13 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
|
||||
@DirtiesContext
|
||||
public class BootstrapClientApplicationTests {
|
||||
class BootstrapClientApplicationTests {
|
||||
|
||||
@Autowired
|
||||
private ServerProperties server;
|
||||
|
||||
@Test
|
||||
public void contextLoads() throws Exception {
|
||||
void contextLoads() throws Exception {
|
||||
assertThat(2).isEqualTo(this.server.getTomcat().getMaxThreads());
|
||||
// The application.yml is never read because spring.config.name=sample
|
||||
assertThat("application").isEqualTo(this.server.getServlet().getApplicationDisplayName());
|
||||
|
||||
@@ -30,13 +30,13 @@ import static org.junit.Assert.assertNotNull;
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
@DirtiesContext
|
||||
public class StandaloneClientApplicationTests {
|
||||
class StandaloneClientApplicationTests {
|
||||
|
||||
@Autowired
|
||||
private ConfigServicePropertySourceLocator locator;
|
||||
|
||||
@Test
|
||||
public void contextLoads() throws Exception {
|
||||
void contextLoads() throws Exception {
|
||||
assertNotNull(this.locator);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
@DirtiesContext
|
||||
public class BootstrapDecryptionClientApplicationTests {
|
||||
class BootstrapDecryptionClientApplicationTests {
|
||||
|
||||
@Autowired
|
||||
private ConfigClientProperties config;
|
||||
@@ -38,7 +38,7 @@ public class BootstrapDecryptionClientApplicationTests {
|
||||
private ConfigServicePropertySourceLocator locator;
|
||||
|
||||
@Test
|
||||
public void contextLoads() throws Exception {
|
||||
void contextLoads() throws Exception {
|
||||
assertThat(new String[] { "http://localhost:8888" }).isEqualTo(this.config.getUri());
|
||||
// The application.yml is never read because spring.config.name=sample
|
||||
assertThat(this.locator).isNotNull();
|
||||
|
||||
@@ -30,13 +30,13 @@ import static org.junit.Assert.assertNotNull;
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
@DirtiesContext
|
||||
public class StandaloneClientApplicationTests {
|
||||
class StandaloneClientApplicationTests {
|
||||
|
||||
@Autowired
|
||||
private ConfigServicePropertySourceLocator locator;
|
||||
|
||||
@Test
|
||||
public void contextLoads() throws Exception {
|
||||
void contextLoads() throws Exception {
|
||||
assertNotNull(this.locator);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,16 +17,13 @@
|
||||
package demo;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
@DirtiesContext
|
||||
public class ConfigServerEurekaApplicationTests {
|
||||
class ConfigServerEurekaApplicationTests {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
|
||||
@@ -26,10 +26,10 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
@DirtiesContext
|
||||
public class ConfigServerApplicationTests {
|
||||
class ConfigServerApplicationTests {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ package releaser.internal.spring;
|
||||
import java.io.Closeable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
@@ -29,7 +30,6 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import edu.emory.mathcs.backport.java.util.Collections;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import releaser.internal.ReleaserProperties;
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
|
||||
package releaser.internal.docs;
|
||||
|
||||
import edu.emory.mathcs.backport.java.util.Collections;
|
||||
import java.util.Collections;
|
||||
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.git.ProjectGitHandler;
|
||||
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
|
||||
package releaser.internal.buildsystem;
|
||||
|
||||
import edu.emory.mathcs.backport.java.util.Collections;
|
||||
import java.util.Collections;
|
||||
|
||||
import releaser.internal.ReleaserProperties;
|
||||
|
||||
public class MavenBomParserAccessor {
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
<artifactId>spring-cloud-info</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven-core.version>3.6.1</maven-core.version>
|
||||
<maven-core.version>3.8.5</maven-core.version>
|
||||
<javax.json-api.version>1.1.4</javax.json-api.version>
|
||||
<maven-model.version>3.6.3</maven-model.version>
|
||||
<maven-model.version>3.8.5</maven-model.version>
|
||||
<scs.version>3.1.6.RELEASE</scs.version>
|
||||
<spring-asciidoctor-extensions.version>0.2.0-RELEASE</spring-asciidoctor-extensions.version>
|
||||
<spring-cloud-bom.version>2021.0.0</spring-cloud-bom.version>
|
||||
<spring-cloud-bom.version>2021.0.1</spring-cloud-bom.version>
|
||||
<spring-rest-docs.version>2.0.6.RELEASE</spring-rest-docs.version>
|
||||
</properties>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user