Update
This commit is contained in:
@@ -290,6 +290,7 @@ The following properties are used for both meta release and a release of an indi
|
||||
|
||||
- `releaser.post-release-tasks-only` - If set to `true` will run only post release tasks. Defaults to `false`.
|
||||
- `releaser.meta-release.release-train-project-name` - Name of the project that represents the BOM of the release train. Defaults to `spring-cloud-release`.
|
||||
- `releaser.meta-release.release-train-dependency-names` - Names of the projects that should be updated with the version of the release train. Defaults to `[spring-cloud, spring-cloud-dependencies, spring-cloud-starter]`.
|
||||
- `releaser.git.fetch-versions-from-git` - If `true` then should fill the map of versions from Git. If `false` then picks fixed versions.
|
||||
- `releaser.git.clone-destination-dir` - Where should the Spring Cloud Release repo get cloned to. If null defaults to a temporary directory.
|
||||
- `releaser.git.release-train-bom-url` - URL to a project containing a BOM. Defaults to Spring Cloud Release Git repository: `https://github.com/spring-cloud/spring-cloud-release`.
|
||||
|
||||
@@ -79,6 +79,14 @@ public class ReleaserProperties implements Serializable {
|
||||
*/
|
||||
private String releaseTrainProjectName = "spring-cloud-release";
|
||||
|
||||
/**
|
||||
* All the names of dependencies that should be updated with the release
|
||||
* train project version
|
||||
*/
|
||||
private List<String> releaseTrainDependencyNames = Arrays.asList(
|
||||
"spring-cloud", "spring-cloud-dependencies", "spring-cloud-starter"
|
||||
);
|
||||
|
||||
/**
|
||||
* The URL of the Git organization. We'll append each project's
|
||||
* name to it
|
||||
@@ -120,6 +128,14 @@ public class ReleaserProperties implements Serializable {
|
||||
this.releaseTrainProjectName = releaseTrainProjectName;
|
||||
}
|
||||
|
||||
public List<String> getReleaseTrainDependencyNames() {
|
||||
return this.releaseTrainDependencyNames;
|
||||
}
|
||||
|
||||
public void setReleaseTrainDependencyNames(List<String> releaseTrainDependencyNames) {
|
||||
this.releaseTrainDependencyNames = releaseTrainDependencyNames;
|
||||
}
|
||||
|
||||
public List<String> getProjectsToSkip() {
|
||||
return this.projectsToSkip;
|
||||
}
|
||||
|
||||
@@ -18,9 +18,18 @@ package org.springframework.cloud.release.internal.git;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.List;
|
||||
|
||||
import com.jcraft.jsch.IdentityRepository;
|
||||
import com.jcraft.jsch.JSch;
|
||||
import com.jcraft.jsch.JSchException;
|
||||
import com.jcraft.jsch.Session;
|
||||
import com.jcraft.jsch.agentproxy.AgentProxyException;
|
||||
import com.jcraft.jsch.agentproxy.Connector;
|
||||
import com.jcraft.jsch.agentproxy.RemoteIdentityRepository;
|
||||
import com.jcraft.jsch.agentproxy.USocketFactory;
|
||||
import com.jcraft.jsch.agentproxy.connector.SSHAgentConnector;
|
||||
import com.jcraft.jsch.agentproxy.usocket.JNAUSocketFactory;
|
||||
import org.eclipse.jgit.api.CheckoutCommand;
|
||||
import org.eclipse.jgit.api.CloneCommand;
|
||||
import org.eclipse.jgit.api.CreateBranchCommand;
|
||||
@@ -43,21 +52,11 @@ import org.eclipse.jgit.util.FS;
|
||||
import org.eclipse.jgit.util.FileUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.springframework.cloud.release.internal.ReleaserProperties;
|
||||
import org.springframework.util.ResourceUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import com.jcraft.jsch.IdentityRepository;
|
||||
import com.jcraft.jsch.JSch;
|
||||
import com.jcraft.jsch.JSchException;
|
||||
import com.jcraft.jsch.Session;
|
||||
import com.jcraft.jsch.agentproxy.AgentProxyException;
|
||||
import com.jcraft.jsch.agentproxy.Connector;
|
||||
import com.jcraft.jsch.agentproxy.RemoteIdentityRepository;
|
||||
import com.jcraft.jsch.agentproxy.USocketFactory;
|
||||
import com.jcraft.jsch.agentproxy.connector.SSHAgentConnector;
|
||||
import com.jcraft.jsch.agentproxy.usocket.JNAUSocketFactory;
|
||||
|
||||
/**
|
||||
* Abstraction over a Git repo. Can cloned repo from a given location
|
||||
* and check its branch.
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
package org.springframework.cloud.release.internal.git;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.jcabi.github.Coordinates;
|
||||
import com.jcabi.github.Github;
|
||||
import com.jcabi.github.Issue;
|
||||
import com.jcabi.github.Milestone;
|
||||
import com.jcabi.github.Repo;
|
||||
import com.jcabi.github.RtGithub;
|
||||
import com.jcabi.http.wire.RetryWire;
|
||||
|
||||
@@ -3,7 +3,6 @@ package org.springframework.cloud.release.internal.gradle;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.nio.file.FileVisitResult;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
@@ -58,7 +58,7 @@ class BomParser {
|
||||
|
||||
Versions allVersions() {
|
||||
Versions boot = bootVersion();
|
||||
Versions cloud = versionsFromSpringCloudBom();
|
||||
Versions cloud = versionsFromBom();
|
||||
return new Versions(boot.bootVersion, cloud.scBuildVersion, allProjects(boot, cloud));
|
||||
}
|
||||
|
||||
@@ -71,6 +71,9 @@ class BomParser {
|
||||
|
||||
Versions bootVersion() {
|
||||
Model model = pom(this.pomWithBootStarterParent);
|
||||
if (model == null) {
|
||||
return Versions.EMPTY_VERSION;
|
||||
}
|
||||
String bootArtifactId = model.getParent().getArtifactId();
|
||||
log.debug("Boot artifact id is equal to [{}]", bootArtifactId);
|
||||
if (!SpringCloudConstants.BOOT_STARTER_PARENT_ARTIFACT_ID.equals(bootArtifactId)) {
|
||||
@@ -94,8 +97,11 @@ class BomParser {
|
||||
}
|
||||
|
||||
// the BOM contains all versions of projects and its parent MUST be Spring Cloud Dependencies Parent
|
||||
Versions versionsFromSpringCloudBom() {
|
||||
Versions versionsFromBom() {
|
||||
Model model = pom(this.thisTrainBom);
|
||||
if (model == null) {
|
||||
return Versions.EMPTY_VERSION;
|
||||
}
|
||||
String buildArtifact = model.getParent().getArtifactId();
|
||||
log.debug("[{}] artifact id is equal to [{}]", SpringCloudConstants.CLOUD_DEPENDENCIES_PARENT_ARTIFACT_ID, buildArtifact);
|
||||
if (!SpringCloudConstants.CLOUD_DEPENDENCIES_PARENT_ARTIFACT_ID.equals(buildArtifact)) {
|
||||
|
||||
@@ -18,10 +18,8 @@ package org.springframework.cloud.release.internal.pom;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import javax.xml.stream.XMLInputFactory;
|
||||
import javax.xml.stream.XMLStreamException;
|
||||
|
||||
@@ -88,7 +88,7 @@ public class ProjectPomUpdater implements ReleaserPropertiesAware {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Will apply the following fixed versions {}", projectVersions);
|
||||
}
|
||||
return new Versions(projectVersions).toProjectVersions();
|
||||
return new Versions(projectVersions, this.properties).toProjectVersions();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -103,7 +103,7 @@ public class ProjectPomUpdater implements ReleaserPropertiesAware {
|
||||
*/
|
||||
public void updateProjectFromReleaseTrain(File projectRoot, Projects projects,
|
||||
ProjectVersion versionFromReleaseTrain, boolean assertSnapshots) {
|
||||
Versions versions = new Versions(projects);
|
||||
Versions versions = new Versions(projects, this.properties);
|
||||
if (!this.pomUpdater.shouldProjectBeUpdated(projectRoot, versions)) {
|
||||
log.info("Skipping project updating");
|
||||
return;
|
||||
@@ -151,7 +151,7 @@ public class ProjectPomUpdater implements ReleaserPropertiesAware {
|
||||
ReleaserProperties properties, ProjectVersion versionFromScRelease,
|
||||
boolean assertSnapshots) {
|
||||
this.rootPom = rootPom;
|
||||
this.versions = new Versions(projects);
|
||||
this.versions = new Versions(projects, properties);
|
||||
this.pomUpdater = pomUpdater;
|
||||
this.properties = properties;
|
||||
this.snapshotVersion = !assertSnapshots || versionFromScRelease.isSnapshot();
|
||||
|
||||
@@ -52,7 +52,7 @@ public class Projects extends HashSet<ProjectVersion> {
|
||||
|
||||
public Projects postReleaseSnapshotVersion(List<String> projectsToSkip) {
|
||||
Projects projects = this.stream()
|
||||
.filter(v -> projectsToSkip.contains(v.projectName))
|
||||
.filter(v -> projectsToSkip(projectsToSkip, v))
|
||||
.collect(Collectors.toCollection(Projects::new));
|
||||
Projects bumped = this.stream()
|
||||
.map(v -> new ProjectVersion(v.projectName, v.postReleaseSnapshotVersion()))
|
||||
@@ -62,6 +62,10 @@ public class Projects extends HashSet<ProjectVersion> {
|
||||
return merged;
|
||||
}
|
||||
|
||||
private boolean projectsToSkip(List<String> projectsToSkip, ProjectVersion version) {
|
||||
return projectsToSkip.stream().anyMatch(version.projectName::startsWith);
|
||||
}
|
||||
|
||||
public void remove(String projectName) {
|
||||
ProjectVersion projectVersion = forName(projectName);
|
||||
remove(projectVersion);
|
||||
|
||||
@@ -21,15 +21,11 @@ package org.springframework.cloud.release.internal.pom;
|
||||
*/
|
||||
final class SpringCloudConstants {
|
||||
static final String SPRING_BOOT = "spring-boot";
|
||||
static final String CLOUD_DEPENDENCIES_ARTIFACT_ID = "spring-cloud-dependencies";
|
||||
static final String BOOT_STARTER_ARTIFACT_ID = "spring-boot-starter";
|
||||
static final String BOOT_STARTER_PARENT_ARTIFACT_ID = BOOT_STARTER_ARTIFACT_ID + "-parent";
|
||||
static final String BOOT_DEPENDENCIES_ARTIFACT_ID = "spring-boot-dependencies";
|
||||
static final String CLOUD_DEPENDENCIES_PARENT_ARTIFACT_ID = "spring-cloud-dependencies-parent";
|
||||
static final String BUILD_ARTIFACT_ID = "spring-cloud-build";
|
||||
static final String SPRING_CLOUD_RELEASE = "spring-cloud-release";
|
||||
static final String SPRING_CLOUD = "spring-cloud";
|
||||
static final String SPRING_CLOUD_STARTER = "spring-cloud-starter";
|
||||
|
||||
private SpringCloudConstants() {
|
||||
throw new IllegalStateException("Don't instantiate a utility class");
|
||||
|
||||
@@ -15,19 +15,20 @@
|
||||
*/
|
||||
package org.springframework.cloud.release.internal.pom;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.springframework.cloud.release.internal.ReleaserProperties;
|
||||
|
||||
import static org.springframework.cloud.release.internal.pom.SpringCloudConstants.BOOT_DEPENDENCIES_ARTIFACT_ID;
|
||||
import static org.springframework.cloud.release.internal.pom.SpringCloudConstants.BOOT_STARTER_PARENT_ARTIFACT_ID;
|
||||
import static org.springframework.cloud.release.internal.pom.SpringCloudConstants.BUILD_ARTIFACT_ID;
|
||||
import static org.springframework.cloud.release.internal.pom.SpringCloudConstants.CLOUD_DEPENDENCIES_ARTIFACT_ID;
|
||||
import static org.springframework.cloud.release.internal.pom.SpringCloudConstants.CLOUD_DEPENDENCIES_PARENT_ARTIFACT_ID;
|
||||
import static org.springframework.cloud.release.internal.pom.SpringCloudConstants.SPRING_CLOUD;
|
||||
import static org.springframework.cloud.release.internal.pom.SpringCloudConstants.SPRING_CLOUD_RELEASE;
|
||||
import static org.springframework.cloud.release.internal.pom.SpringCloudConstants.SPRING_CLOUD_STARTER;
|
||||
|
||||
/**
|
||||
* Represents versions taken out from Spring Cloud Release pom
|
||||
@@ -42,35 +43,42 @@ class Versions {
|
||||
String bootVersion;
|
||||
String scBuildVersion;
|
||||
Set<Project> projects = new HashSet<>();
|
||||
ReleaserProperties properties;
|
||||
|
||||
Versions(String bootVersion) {
|
||||
this.bootVersion = bootVersion;
|
||||
this.projects.add(new Project(SPRING_BOOT_PROJECT_NAME, bootVersion));
|
||||
this.projects.add(new Project(BOOT_STARTER_PARENT_ARTIFACT_ID, bootVersion));
|
||||
this.projects.add(new Project(BOOT_DEPENDENCIES_ARTIFACT_ID, bootVersion));
|
||||
add(SPRING_BOOT_PROJECT_NAME, bootVersion);
|
||||
add(BOOT_STARTER_PARENT_ARTIFACT_ID, bootVersion);
|
||||
add(BOOT_DEPENDENCIES_ARTIFACT_ID, bootVersion);
|
||||
this.properties = new ReleaserProperties();
|
||||
}
|
||||
|
||||
Versions(String scBuildVersion, Set<Project> projects) {
|
||||
this.scBuildVersion = scBuildVersion;
|
||||
this.projects.add(new Project(BUILD_ARTIFACT_ID, scBuildVersion));
|
||||
this.projects.add(new Project(CLOUD_DEPENDENCIES_PARENT_ARTIFACT_ID, scBuildVersion));
|
||||
this.projects.add(new Project(CLOUD_DEPENDENCIES_ARTIFACT_ID, scBuildVersion));
|
||||
add(BUILD_ARTIFACT_ID, scBuildVersion);
|
||||
add(CLOUD_DEPENDENCIES_PARENT_ARTIFACT_ID, scBuildVersion);
|
||||
this.projects.addAll(projects);
|
||||
this.properties = new ReleaserProperties();
|
||||
}
|
||||
|
||||
Versions(String bootVersion, String scBuildVersion, Set<Project> projects) {
|
||||
this(new ReleaserProperties(), bootVersion, scBuildVersion, projects);
|
||||
}
|
||||
|
||||
Versions(ReleaserProperties properties, String bootVersion, String scBuildVersion, Set<Project> projects) {
|
||||
this.properties = properties;
|
||||
this.bootVersion = bootVersion;
|
||||
this.scBuildVersion = scBuildVersion;
|
||||
this.projects.add(new Project(SPRING_BOOT_PROJECT_NAME, bootVersion));
|
||||
this.projects.add(new Project(BOOT_STARTER_PARENT_ARTIFACT_ID, bootVersion));
|
||||
this.projects.add(new Project(BOOT_DEPENDENCIES_ARTIFACT_ID, bootVersion));
|
||||
this.projects.add(new Project(BUILD_ARTIFACT_ID, scBuildVersion));
|
||||
this.projects.add(new Project(CLOUD_DEPENDENCIES_ARTIFACT_ID, scBuildVersion));
|
||||
this.projects.add(new Project(CLOUD_DEPENDENCIES_PARENT_ARTIFACT_ID, scBuildVersion));
|
||||
add(SPRING_BOOT_PROJECT_NAME, bootVersion);
|
||||
add(BOOT_STARTER_PARENT_ARTIFACT_ID, bootVersion);
|
||||
add(BOOT_DEPENDENCIES_ARTIFACT_ID, bootVersion);
|
||||
add(BUILD_ARTIFACT_ID, scBuildVersion);
|
||||
add(dependenciesParentArtifactId(), scBuildVersion);
|
||||
this.projects.addAll(projects);
|
||||
}
|
||||
|
||||
Versions(Set<ProjectVersion> versions) {
|
||||
Versions(Set<ProjectVersion> versions, ReleaserProperties properties) {
|
||||
this.properties = properties;
|
||||
this.bootVersion = versions.stream().filter(projectVersion -> SPRING_BOOT_PROJECT_NAME.equals(projectVersion.projectName))
|
||||
.findFirst().orElse(new ProjectVersion(SPRING_BOOT_PROJECT_NAME, "")).version;
|
||||
this.scBuildVersion = versions.stream().filter(projectVersion -> BUILD_ARTIFACT_ID.equals(projectVersion.projectName))
|
||||
@@ -78,6 +86,19 @@ class Versions {
|
||||
versions.forEach(projectVersion -> setVersion(projectVersion.projectName, projectVersion.version));
|
||||
}
|
||||
|
||||
private String bomProjectName() {
|
||||
return this.properties.getMetaRelease().getReleaseTrainProjectName();
|
||||
}
|
||||
|
||||
private String dependenciesArtifactId() {
|
||||
String artifactId = this.properties.getPom().getThisTrainBom();
|
||||
return artifactId.split(File.separator)[0];
|
||||
}
|
||||
|
||||
private String dependenciesParentArtifactId() {
|
||||
return dependenciesArtifactId() + "-parent";
|
||||
}
|
||||
|
||||
String versionForProject(String projectName) {
|
||||
return this.projects.stream()
|
||||
.filter(project -> nameMatches(projectName, project))
|
||||
@@ -99,18 +120,33 @@ class Versions {
|
||||
Projects toProjectVersions() {
|
||||
return this.projects.stream()
|
||||
.map(project -> new ProjectVersion(project.name, project.version))
|
||||
.distinct().collect(Collectors.toCollection(Projects::new));
|
||||
.collect(Collectors.toCollection(Projects::new));
|
||||
}
|
||||
|
||||
/**
|
||||
* The only exception is spring-cloud-dependencies (e.g. Greenwich.RELEASE) and
|
||||
* spring-cloud-dependencies-parent (e.g. 2.1.0.RELEASE)
|
||||
*/
|
||||
private boolean nameMatches(String projectName, Project project) {
|
||||
if (project.name.equals(projectName)) {
|
||||
return true;
|
||||
}
|
||||
boolean parent = nameWithSuffix(projectName, "-parent", project);
|
||||
return parent || nameWithSuffix(projectName, "-dependencies", project);
|
||||
boolean parent = matchesNameWithSuffix(projectName, "-parent", project);
|
||||
boolean bomArtifactId = comparisonOfBomArtifactAndParent(projectName, project);
|
||||
return !bomArtifactId &&
|
||||
(parent || matchesNameWithSuffix(projectName, "-dependencies", project));
|
||||
}
|
||||
|
||||
private boolean nameWithSuffix(String projectName, String suffix, Project project) {
|
||||
private boolean comparisonOfBomArtifactAndParent(String projectName, Project project) {
|
||||
return artifactOrParent(projectName, project.name) || artifactOrParent(project.name, projectName);
|
||||
}
|
||||
|
||||
private boolean artifactOrParent(String projectName, String otherProjectName) {
|
||||
return projectName.equals(dependenciesArtifactId()) &&
|
||||
otherProjectName.equals(dependenciesParentArtifactId());
|
||||
}
|
||||
|
||||
private boolean matchesNameWithSuffix(String projectName, String suffix, Project project) {
|
||||
boolean containsSuffix = projectName.endsWith(suffix);
|
||||
if (!containsSuffix) {
|
||||
return false;
|
||||
@@ -124,42 +160,59 @@ class Versions {
|
||||
case SPRING_BOOT_PROJECT_NAME:
|
||||
case BOOT_STARTER_PARENT_ARTIFACT_ID:
|
||||
case BOOT_DEPENDENCIES_ARTIFACT_ID:
|
||||
this.bootVersion = version;
|
||||
remove(SPRING_BOOT_PROJECT_NAME);
|
||||
remove(BOOT_DEPENDENCIES_ARTIFACT_ID);
|
||||
remove(BOOT_STARTER_PARENT_ARTIFACT_ID);
|
||||
this.projects.add(new Project(SPRING_BOOT_PROJECT_NAME, version));
|
||||
this.projects.add(new Project(BOOT_STARTER_PARENT_ARTIFACT_ID, version));
|
||||
this.projects.add(new Project(BOOT_DEPENDENCIES_ARTIFACT_ID, version));
|
||||
updateBootVersions(version);
|
||||
break;
|
||||
case BUILD_ARTIFACT_ID:
|
||||
case CLOUD_DEPENDENCIES_ARTIFACT_ID:
|
||||
case CLOUD_DEPENDENCIES_PARENT_ARTIFACT_ID:
|
||||
this.scBuildVersion = version;
|
||||
remove(BUILD_ARTIFACT_ID);
|
||||
remove(CLOUD_DEPENDENCIES_PARENT_ARTIFACT_ID);
|
||||
remove(CLOUD_DEPENDENCIES_ARTIFACT_ID);
|
||||
this.projects.add(new Project(BUILD_ARTIFACT_ID, version));
|
||||
this.projects.add(new Project(CLOUD_DEPENDENCIES_PARENT_ARTIFACT_ID, version));
|
||||
this.projects.add(new Project(CLOUD_DEPENDENCIES_ARTIFACT_ID, version));
|
||||
break;
|
||||
case SPRING_CLOUD_RELEASE:
|
||||
case SPRING_CLOUD:
|
||||
case SPRING_CLOUD_STARTER:
|
||||
remove(SPRING_CLOUD_RELEASE);
|
||||
remove(SPRING_CLOUD);
|
||||
remove(SPRING_CLOUD_STARTER);
|
||||
this.projects.add(new Project(SPRING_CLOUD_RELEASE, version));
|
||||
this.projects.add(new Project(SPRING_CLOUD, version));
|
||||
this.projects.add(new Project(SPRING_CLOUD_STARTER, version));
|
||||
updateBuildVersions(version);
|
||||
break;
|
||||
default:
|
||||
remove(projectName);
|
||||
this.projects.add(new Project(projectName, version));
|
||||
if (bomVersionProjectNames().contains(projectName)) {
|
||||
updateBomVersions(version);
|
||||
} else {
|
||||
remove(projectName);
|
||||
add(projectName, version);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
private List<String> bomVersionProjectNames() {
|
||||
List<String> names = new ArrayList<>(this.properties.getMetaRelease()
|
||||
.getReleaseTrainDependencyNames());
|
||||
names.add(this.properties.getMetaRelease().getReleaseTrainProjectName());
|
||||
return names;
|
||||
}
|
||||
|
||||
private void updateBuildVersions(String version) {
|
||||
this.scBuildVersion = version;
|
||||
remove(BUILD_ARTIFACT_ID);
|
||||
remove(CLOUD_DEPENDENCIES_PARENT_ARTIFACT_ID);
|
||||
add(BUILD_ARTIFACT_ID, version);
|
||||
add(CLOUD_DEPENDENCIES_PARENT_ARTIFACT_ID, version);
|
||||
}
|
||||
|
||||
private void updateBootVersions(String version) {
|
||||
this.bootVersion = version;
|
||||
remove(SPRING_BOOT_PROJECT_NAME);
|
||||
remove(BOOT_DEPENDENCIES_ARTIFACT_ID);
|
||||
remove(BOOT_STARTER_PARENT_ARTIFACT_ID);
|
||||
add(SPRING_BOOT_PROJECT_NAME, version);
|
||||
add(BOOT_STARTER_PARENT_ARTIFACT_ID, version);
|
||||
add(BOOT_DEPENDENCIES_ARTIFACT_ID, version);
|
||||
}
|
||||
|
||||
private void updateBomVersions(String version) {
|
||||
remove(bomProjectName());
|
||||
bomVersionProjectNames().forEach(this::remove);
|
||||
add(bomProjectName(), version);
|
||||
bomVersionProjectNames().forEach(s -> add(s, version));
|
||||
}
|
||||
|
||||
private void add(String key, String value) {
|
||||
this.projects.add(new Project(key, value));
|
||||
}
|
||||
|
||||
private void remove(String expectedProjectName) {
|
||||
this.projects.removeIf(project -> expectedProjectName.equals(project.name));
|
||||
}
|
||||
|
||||
@@ -114,8 +114,7 @@ public class PostReleaseActions implements Closeable {
|
||||
List<String> value = e.getValue();
|
||||
log.info("Running version update for project [{}] and samples {}", key, value);
|
||||
ProjectVersion projectVersionForReleaseTrain = projects.forName(key);
|
||||
Projects postRelease = projects
|
||||
.postReleaseSnapshotVersion(this.properties.getMetaRelease().getProjectsToSkip());
|
||||
Projects postRelease = getPostReleaseProjects(projects);
|
||||
log.info("Versions to update the samples with \n" + postRelease.stream()
|
||||
.map(v -> "[" + v.projectName + " => " + v.version + "]")
|
||||
.collect(Collectors.joining("\n")));
|
||||
@@ -127,6 +126,11 @@ public class PostReleaseActions implements Closeable {
|
||||
});
|
||||
}
|
||||
|
||||
Projects getPostReleaseProjects(Projects projects) {
|
||||
return projects
|
||||
.postReleaseSnapshotVersion(this.properties.getMetaRelease().getProjectsToSkip());
|
||||
}
|
||||
|
||||
private void commitUpdatedProject(Projects projects, String key, ProjectVersion projectVersionForReleaseTrain, Projects postRelease, String url) {
|
||||
String releaseTrainVersion = projects
|
||||
.forName(this.properties.getMetaRelease().getReleaseTrainProjectName()).version;
|
||||
|
||||
@@ -2,7 +2,6 @@ package org.springframework.cloud.release.internal.project;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.nio.file.FileVisitResult;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
@@ -4,7 +4,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package org.springframework.cloud.release.internal.sagan;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package org.springframework.cloud.release.internal.sagan;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package org.springframework.cloud.release.internal.sagan;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
|
||||
@@ -3,11 +3,9 @@ package org.springframework.cloud.release.internal.sagan;
|
||||
import java.net.URI;
|
||||
import java.util.List;
|
||||
|
||||
import edu.emory.mathcs.backport.java.util.Collections;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.release.internal.ReleaserProperties;
|
||||
import org.springframework.core.ParameterizedTypeReference;
|
||||
import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpMethod;
|
||||
|
||||
@@ -2,22 +2,17 @@ package org.springframework.cloud.release.internal.template;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Files;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.github.jknack.handlebars.Template;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.springframework.cloud.release.internal.git.ProjectGitHandler;
|
||||
import org.springframework.cloud.release.internal.pom.Projects;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import com.github.jknack.handlebars.Template;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
package org.springframework.cloud.release.internal;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import org.assertj.core.api.BDDAssertions;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
@@ -15,10 +15,8 @@ import org.springframework.cloud.release.internal.ReleaserProperties;
|
||||
import org.springframework.cloud.release.internal.git.ProjectGitHandler;
|
||||
import org.springframework.cloud.release.internal.pom.ProjectVersion;
|
||||
import org.springframework.cloud.release.internal.pom.TestUtils;
|
||||
import org.springframework.cloud.release.internal.sagan.Project;
|
||||
import org.springframework.util.FileSystemUtils;
|
||||
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
import static org.assertj.core.api.BDDAssertions.then;
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,8 +10,6 @@ import org.springframework.cloud.release.internal.ReleaserProperties;
|
||||
import org.springframework.cloud.release.internal.pom.ProjectVersion;
|
||||
import org.springframework.cloud.release.internal.pom.Projects;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
*/
|
||||
|
||||
@@ -8,8 +8,6 @@ import org.junit.Test;
|
||||
import org.springframework.cloud.release.internal.pom.ProjectVersion;
|
||||
import org.springframework.cloud.release.internal.pom.Projects;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
*/
|
||||
|
||||
@@ -2,14 +2,12 @@ package org.springframework.cloud.release.internal.git;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.util.Collections;
|
||||
import javax.json.Json;
|
||||
|
||||
import com.jcabi.github.Coordinates;
|
||||
import com.jcabi.github.Github;
|
||||
import com.jcabi.github.Issue;
|
||||
import com.jcabi.github.Milestone;
|
||||
import com.jcabi.github.Repo;
|
||||
import com.jcabi.github.mock.MkGithub;
|
||||
import org.junit.Before;
|
||||
|
||||
@@ -79,7 +79,7 @@ public class BomParserTests {
|
||||
public void should_throw_exception_when_cloud_pom_is_missing() {
|
||||
BomParser parser = new BomParser(this.properties, new File("."));
|
||||
|
||||
thenThrownBy(parser::versionsFromSpringCloudBom)
|
||||
thenThrownBy(parser::versionsFromBom)
|
||||
.isInstanceOf(IllegalStateException.class)
|
||||
.hasMessageContaining("Pom is not present");
|
||||
}
|
||||
@@ -90,7 +90,7 @@ public class BomParserTests {
|
||||
this.properties.getPom().setThisTrainBom(null);
|
||||
BomParser parser = new BomParser(this.properties, this.springCloudReleaseProject);
|
||||
|
||||
thenThrownBy(parser::versionsFromSpringCloudBom)
|
||||
thenThrownBy(parser::versionsFromBom)
|
||||
.isInstanceOf(IllegalStateException.class)
|
||||
.hasMessageContaining("Pom is not present");
|
||||
}
|
||||
@@ -101,7 +101,7 @@ public class BomParserTests {
|
||||
this.properties.getPom().setThisTrainBom("pom.xml");
|
||||
BomParser parser = new BomParser(this.properties, this.springCloudReleaseProject);
|
||||
|
||||
thenThrownBy(parser::versionsFromSpringCloudBom)
|
||||
thenThrownBy(parser::versionsFromBom)
|
||||
.isInstanceOf(IllegalStateException.class)
|
||||
.hasMessageContaining("The pom doesn't have a [spring-cloud-dependencies-parent] artifact id");
|
||||
}
|
||||
@@ -110,7 +110,7 @@ public class BomParserTests {
|
||||
public void should_populate_cloud_version() {
|
||||
BomParser parser = new BomParser(this.properties, this.springCloudReleaseProject);
|
||||
|
||||
Versions cloudVersions = parser.versionsFromSpringCloudBom();
|
||||
Versions cloudVersions = parser.versionsFromBom();
|
||||
|
||||
then(cloudVersions.scBuildVersion).isEqualTo("1.3.1.BUILD-SNAPSHOT");
|
||||
then(cloudVersions.projects).contains(allProjects());
|
||||
|
||||
@@ -18,7 +18,6 @@ package org.springframework.cloud.release.internal.pom;
|
||||
|
||||
import java.io.EOFException;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
|
||||
@@ -11,8 +11,6 @@ import org.mockito.BDDMockito;
|
||||
import org.springframework.cloud.release.internal.ReleaserProperties;
|
||||
import org.springframework.cloud.release.internal.git.ProjectGitHandler;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
*/
|
||||
|
||||
@@ -122,7 +122,8 @@ public class ProjectsTests {
|
||||
@Test
|
||||
public void should_return_projects_with_bumped_versions() {
|
||||
Set<ProjectVersion> projectVersions = new HashSet<>();
|
||||
projectVersions.add(new ProjectVersion("dont_touch", "2.0.0.RELEASE"));
|
||||
projectVersions.add(new ProjectVersion("spring-boot-dependencies", "2.0.0.RELEASE"));
|
||||
projectVersions.add(new ProjectVersion("spring-boot-starter", "2.0.0.RELEASE"));
|
||||
projectVersions.add(new ProjectVersion("foo", "1.0.0.RELEASE"));
|
||||
projectVersions.add(new ProjectVersion("bar", "1.0.1.M1"));
|
||||
projectVersions.add(new ProjectVersion("baz", "1.0.2.BUILD-SNAPSHOT"));
|
||||
@@ -131,9 +132,10 @@ public class ProjectsTests {
|
||||
projectVersions.add(new ProjectVersion("foo4", "Finchley.SR4"));
|
||||
Projects projects = new Projects(projectVersions);
|
||||
|
||||
Projects bumped = projects.postReleaseSnapshotVersion(Collections.singletonList("dont_touch"));
|
||||
Projects bumped = projects.postReleaseSnapshotVersion(Collections.singletonList("spring-boot"));
|
||||
|
||||
then(bumped.forName("dont_touch").version).isEqualTo("2.0.0.RELEASE");
|
||||
then(bumped.forName("spring-boot-dependencies").version).isEqualTo("2.0.0.RELEASE");
|
||||
then(bumped.forName("spring-boot-starter").version).isEqualTo("2.0.0.RELEASE");
|
||||
then(bumped.forName("foo").version).isEqualTo("1.0.1.BUILD-SNAPSHOT");
|
||||
then(bumped.forName("bar").version).isEqualTo("1.0.1.BUILD-SNAPSHOT");
|
||||
then(bumped.forName("baz").version).isEqualTo("1.0.2.BUILD-SNAPSHOT");
|
||||
|
||||
@@ -16,12 +16,15 @@
|
||||
|
||||
package org.springframework.cloud.release.internal.pom;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.cloud.release.internal.ReleaserProperties;
|
||||
|
||||
import static org.assertj.core.api.BDDAssertions.then;
|
||||
|
||||
/**
|
||||
@@ -107,14 +110,17 @@ public class VersionsTests {
|
||||
Versions versions = mixedVersions().setVersion("spring-cloud-build", "3.0.0");
|
||||
|
||||
then(versions.versionForProject("spring-cloud-build")).isEqualTo("3.0.0");
|
||||
|
||||
versions = mixedVersions().setVersion("spring-cloud-build", "3.0.0");
|
||||
|
||||
then(versions.versionForProject("spring-cloud-dependencies-parent")).isEqualTo("3.0.0");
|
||||
then(versions.versionForProject("spring-cloud-dependencies")).isEqualTo("3.0.0");
|
||||
then(versions.versionForProject("spring-cloud-dependencies")).isEqualTo("Greenwich.RELEASE");
|
||||
|
||||
versions = mixedVersions().setVersion("spring-cloud-dependencies-parent", "3.0.0");
|
||||
|
||||
then(versions.versionForProject("spring-cloud-build")).isEqualTo("3.0.0");
|
||||
then(versions.versionForProject("spring-cloud-dependencies-parent")).isEqualTo("3.0.0");
|
||||
then(versions.versionForProject("spring-cloud-dependencies")).isEqualTo("3.0.0");
|
||||
then(versions.versionForProject("spring-cloud-dependencies")).isEqualTo("Greenwich.RELEASE");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -124,12 +130,60 @@ public class VersionsTests {
|
||||
then(versions.versionForProject("spring-cloud")).isEqualTo("3.0.0");
|
||||
then(versions.versionForProject("spring-cloud-release")).isEqualTo("3.0.0");
|
||||
then(versions.versionForProject("spring-cloud-starter")).isEqualTo("3.0.0");
|
||||
then(versions.versionForProject("spring-cloud-dependencies")).isEqualTo("3.0.0");
|
||||
|
||||
versions = mixedVersions().setVersion("spring-cloud-release", "3.0.0");
|
||||
|
||||
then(versions.versionForProject("spring-cloud")).isEqualTo("3.0.0");
|
||||
then(versions.versionForProject("spring-cloud-release")).isEqualTo("3.0.0");
|
||||
then(versions.versionForProject("spring-cloud-starter")).isEqualTo("3.0.0");
|
||||
then(versions.versionForProject("spring-cloud-dependencies")).isEqualTo("3.0.0");
|
||||
|
||||
versions = mixedVersions().setVersion("spring-cloud-release", "Greenwich.SR8");
|
||||
|
||||
then(versions.versionForProject("spring-cloud")).isEqualTo("Greenwich.SR8");
|
||||
then(versions.versionForProject("spring-cloud-release")).isEqualTo("Greenwich.SR8");
|
||||
then(versions.versionForProject("spring-cloud-starter")).isEqualTo("Greenwich.SR8");
|
||||
then(versions.versionForProject("spring-cloud-dependencies")).isEqualTo("Greenwich.SR8");
|
||||
|
||||
versions = mixedVersions().setVersion("spring-cloud-dependencies", "Greenwich.SR8");
|
||||
|
||||
then(versions.versionForProject("spring-cloud")).isEqualTo("Greenwich.SR8");
|
||||
then(versions.versionForProject("spring-cloud-release")).isEqualTo("Greenwich.SR8");
|
||||
then(versions.versionForProject("spring-cloud-starter")).isEqualTo("Greenwich.SR8");
|
||||
then(versions.versionForProject("spring-cloud-dependencies")).isEqualTo("Greenwich.SR8");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_update_projects_for_custom_bom_only() {
|
||||
Versions versions = mixedVersions(customBom()).setVersion("spring-cloud", "3.0.0");
|
||||
|
||||
then(versions.versionForProject("spring-cloud")).isEqualTo("3.0.0");
|
||||
then(versions.versionForProject("spring-cloud-stream-starters")).isEqualTo("Fishtown.RELEASE");
|
||||
then(versions.versionForProject("spring-cloud-starter")).isEmpty();
|
||||
then(versions.versionForProject("spring-cloud-dependencies")).isEqualTo("Greenwich.RELEASE");
|
||||
|
||||
versions = mixedVersions(customBom()).setVersion("spring-cloud-stream-starters", "Fishtown.SR4");
|
||||
|
||||
then(versions.versionForProject("spring-cloud")).isEmpty();
|
||||
then(versions.versionForProject("spring-cloud-stream-starters")).isEqualTo("Fishtown.SR4");
|
||||
then(versions.versionForProject("spring-cloud-starter")).isEmpty();
|
||||
then(versions.versionForProject("spring-cloud-dependencies")).isEqualTo("Greenwich.RELEASE");
|
||||
|
||||
versions = mixedVersions(customBom()).setVersion("spring-cloud-release", "Greenwich.SR8");
|
||||
|
||||
then(versions.versionForProject("spring-cloud-release")).isEqualTo("Greenwich.SR8");
|
||||
then(versions.versionForProject("spring-cloud-stream-starters")).isEqualTo("Fishtown.RELEASE");
|
||||
then(versions.versionForProject("spring-cloud")).isEmpty();
|
||||
then(versions.versionForProject("spring-cloud-starter")).isEmpty();
|
||||
then(versions.versionForProject("spring-cloud-dependencies")).isEqualTo("Greenwich.RELEASE");
|
||||
|
||||
versions = mixedVersions(customBom()).setVersion("spring-cloud-dependencies", "Greenwich.SR8");
|
||||
|
||||
then(versions.versionForProject("spring-cloud")).isEmpty();
|
||||
then(versions.versionForProject("spring-cloud-stream-starters")).isEqualTo("Fishtown.RELEASE");
|
||||
then(versions.versionForProject("spring-cloud-starter")).isEmpty();
|
||||
then(versions.versionForProject("spring-cloud-dependencies")).isEqualTo("Greenwich.SR8");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -143,6 +197,18 @@ public class VersionsTests {
|
||||
return new Versions("1.0.0", "2.0.0", mixedProjects());
|
||||
}
|
||||
|
||||
private Versions mixedVersions(ReleaserProperties properties) {
|
||||
return new Versions(properties, "1.0.0", "2.0.0", mixedProjects());
|
||||
}
|
||||
|
||||
private ReleaserProperties customBom() {
|
||||
ReleaserProperties properties = new ReleaserProperties();
|
||||
properties.getMetaRelease().setReleaseTrainDependencyNames(Collections.emptyList());
|
||||
properties.getMetaRelease().setReleaseTrainProjectName("spring-cloud-stream-starters");
|
||||
properties.getPom().setThisTrainBom("spring-cloud-stream-dependencies");
|
||||
return properties;
|
||||
}
|
||||
|
||||
Set<Project> projects() {
|
||||
Set<Project> projects = new HashSet<>();
|
||||
projects.add(new Project("foo", "bar"));
|
||||
@@ -153,6 +219,9 @@ public class VersionsTests {
|
||||
Set<Project> projects = new HashSet<>();
|
||||
projects.add(new Project("foo", "1.0.0.BUILD-SNAPSHOT"));
|
||||
projects.add(new Project("fooBar", "1.0.0.RELEASE"));
|
||||
projects.add(new Project("spring-cloud-release", "Greenwich.RELEASE"));
|
||||
projects.add(new Project("spring-cloud-dependencies", "Greenwich.RELEASE"));
|
||||
projects.add(new Project("spring-cloud-stream-starters", "Fishtown.RELEASE"));
|
||||
return projects;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import org.apache.maven.model.Model;
|
||||
import org.assertj.core.api.BDDAssertions;
|
||||
@@ -192,8 +193,15 @@ public class PostReleaseActionsTests {
|
||||
this.properties.getGit().getAllTestSampleUrls().put("spring-cloud-sleuth",
|
||||
Collections.singletonList(tmpFile("spring-cloud-core-tests/")
|
||||
.getAbsolutePath() + "/"));
|
||||
AtomicReference<Projects> postReleaseProjects = new AtomicReference<>();
|
||||
PostReleaseActions actions = new PostReleaseActions(this.projectGitHandler,
|
||||
this.updater, this.gradleUpdater, this.builder, this.properties);
|
||||
this.updater, this.gradleUpdater, this.builder, this.properties) {
|
||||
@Override
|
||||
Projects getPostReleaseProjects(Projects projects) {
|
||||
postReleaseProjects.set(super.getPostReleaseProjects(projects));
|
||||
return postReleaseProjects.get();
|
||||
}
|
||||
};
|
||||
|
||||
actions.updateAllTestSamples(currentGa());
|
||||
|
||||
@@ -211,6 +219,8 @@ public class PostReleaseActionsTests {
|
||||
BDDAssertions.then(commit.getShortMessage())
|
||||
.isEqualTo("Updated versions after [Finchley.SR1] release train and [2.0.1.RELEASE] [spring-cloud-sleuth] project release");
|
||||
thenGradleUpdaterWasCalled();
|
||||
BDDAssertions.then(postReleaseProjects.get()
|
||||
.forName("spring-boot-dependencies").version).isEqualTo("2.0.4.RELEASE");
|
||||
}
|
||||
|
||||
private String sleuthParentPomVersion() {
|
||||
@@ -234,6 +244,8 @@ public class PostReleaseActionsTests {
|
||||
new ProjectVersion("spring-cloud-stream", "Elmhurst.SR1"),
|
||||
new ProjectVersion("spring-cloud-zookeeper", "2.0.0.RELEASE"),
|
||||
new ProjectVersion("spring-boot", "2.0.4.RELEASE"),
|
||||
new ProjectVersion("spring-boot-dependencies", "2.0.4.RELEASE"),
|
||||
new ProjectVersion("spring-boot-starter", "2.0.4.RELEASE"),
|
||||
new ProjectVersion("spring-cloud-task", "2.0.0.RELEASE"),
|
||||
new ProjectVersion("spring-cloud-release", "Finchley.SR1"),
|
||||
new ProjectVersion("spring-cloud-vault", "2.0.1.RELEASE"),
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package org.springframework.cloud.release.internal.sagan;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package org.springframework.cloud.release.internal.spring;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.commons.validator.Arg;
|
||||
import org.springframework.cloud.release.internal.Releaser;
|
||||
import org.springframework.cloud.release.internal.ReleaserProperties;
|
||||
import org.springframework.cloud.release.internal.pom.ProjectVersion;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package org.springframework.cloud.release.internal.spring;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
package org.springframework.cloud.release.internal.spring;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import org.springframework.cloud.release.internal.Releaser;
|
||||
import org.springframework.cloud.release.internal.ReleaserProperties;
|
||||
import org.springframework.cloud.release.internal.options.Options;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package org.springframework.cloud.release.internal.spring;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.function.Consumer;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
import org.springframework.boot.test.rule.OutputCapture;
|
||||
|
||||
import static org.assertj.core.api.BDDAssertions.then;
|
||||
|
||||
Reference in New Issue
Block a user