diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/cloud/buildsystem/SpringCloudMavenBomParser.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/cloud/buildsystem/SpringCloudMavenBomParser.java index 460e5da2..af60995b 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/cloud/buildsystem/SpringCloudMavenBomParser.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/cloud/buildsystem/SpringCloudMavenBomParser.java @@ -26,10 +26,10 @@ import org.slf4j.LoggerFactory; import org.springframework.cloud.release.internal.ReleaserProperties; import org.springframework.cloud.release.internal.buildsystem.CustomBomParser; -import org.springframework.cloud.release.internal.buildsystem.PomReader; -import org.springframework.cloud.release.internal.buildsystem.Project; import org.springframework.cloud.release.internal.buildsystem.VersionsFromBom; import org.springframework.cloud.release.internal.buildsystem.VersionsFromBomBuilder; +import org.springframework.cloud.release.internal.project.Project; +import org.springframework.cloud.release.internal.tech.PomReader; import org.springframework.util.StringUtils; import static org.springframework.cloud.release.cloud.buildsystem.SpringCloudBomConstants.BOOT_DEPENDENCIES_ARTIFACT_ID; @@ -44,7 +44,7 @@ import static org.springframework.cloud.release.cloud.buildsystem.SpringCloudBom import static org.springframework.cloud.release.cloud.buildsystem.SpringCloudBomConstants.CLOUD_STARTER_PARENT_ARTIFACT_ID; import static org.springframework.cloud.release.cloud.buildsystem.SpringCloudBomConstants.SPRING_BOOT; -public class SpringCloudMavenBomParser implements CustomBomParser { +class SpringCloudMavenBomParser implements CustomBomParser { private static final Logger log = LoggerFactory .getLogger(SpringCloudMavenBomParser.class); diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/cloud/docs/SpringCloudCustomProjectDocumentationUpdater.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/cloud/docs/SpringCloudCustomProjectDocumentationUpdater.java index 1a4932db..c764ffe2 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/cloud/docs/SpringCloudCustomProjectDocumentationUpdater.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/cloud/docs/SpringCloudCustomProjectDocumentationUpdater.java @@ -23,9 +23,9 @@ import java.nio.file.Files; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; import org.springframework.cloud.release.internal.docs.CustomProjectDocumentationUpdater; import org.springframework.cloud.release.internal.git.ProjectGitHandler; +import org.springframework.cloud.release.internal.project.ProjectVersion; /** * @author Marcin Grzejszczak diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/Releaser.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/Releaser.java index 869380b4..43cd075c 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/Releaser.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/Releaser.java @@ -24,13 +24,13 @@ import org.slf4j.LoggerFactory; import org.springframework.cloud.release.internal.buildsystem.GradleUpdater; import org.springframework.cloud.release.internal.buildsystem.ProjectPomUpdater; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; import org.springframework.cloud.release.internal.docs.DocumentationUpdater; import org.springframework.cloud.release.internal.git.ProjectGitHandler; import org.springframework.cloud.release.internal.github.ProjectGitHubHandler; import org.springframework.cloud.release.internal.postrelease.PostReleaseActions; import org.springframework.cloud.release.internal.project.ProcessedProject; import org.springframework.cloud.release.internal.project.ProjectCommandExecutor; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; import org.springframework.cloud.release.internal.sagan.SaganUpdater; import org.springframework.cloud.release.internal.tech.MakeBuildUnstableException; @@ -48,8 +48,6 @@ public class Releaser implements ReleaserPropertiesAware { private static boolean SKIP_SNAPSHOT_ASSERTION = false; - private ReleaserProperties releaserProperties; - private final ProjectPomUpdater projectPomUpdater; private final ProjectCommandExecutor projectCommandExecutor; @@ -68,6 +66,8 @@ public class Releaser implements ReleaserPropertiesAware { private final PostReleaseActions postReleaseActions; + private ReleaserProperties releaserProperties; + public Releaser(ReleaserProperties releaserProperties, ProjectPomUpdater projectPomUpdater, ProjectCommandExecutor projectCommandExecutor, diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/ReleaserProperties.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/ReleaserProperties.java index bf0909ad..ef71a922 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/ReleaserProperties.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/ReleaserProperties.java @@ -968,6 +968,11 @@ public class ReleaserProperties implements Serializable { public static class Gradle implements Serializable { + /** + * Placeholder for system properties. + */ + public static final String SYSTEM_PROPS_PLACEHOLDER = "{{systemProps}}"; + /** * A mapping that should be applied to {@code gradle.properties} in order to * perform a substitution of properties. The mapping is from a property inside @@ -998,11 +1003,6 @@ public class ReleaserProperties implements Serializable { "^.*spring-cloud-contract-maven-plugin/target/.*$", "^.*samples/standalone/[a-z]+/.*$"); - /** - * Placeholder for system properties. - */ - public static final String SYSTEM_PROPS_PLACEHOLDER = "{{systemProps}}"; - /** * Command to be executed to build the project. */ diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/CustomBomParser.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/CustomBomParser.java index 3b825c0e..3ba01489 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/CustomBomParser.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/CustomBomParser.java @@ -21,6 +21,7 @@ import java.util.LinkedHashSet; import java.util.Set; import org.springframework.cloud.release.internal.ReleaserProperties; +import org.springframework.cloud.release.internal.project.Project; import org.springframework.lang.Nullable; /** @@ -28,6 +29,21 @@ import org.springframework.lang.Nullable; */ public interface CustomBomParser { + CustomBomParser NO_OP = new CustomBomParser() { + @Override + public boolean isApplicable(File thisProjectRoot, ReleaserProperties properties, + Set projects) { + return true; + } + + @Override + public VersionsFromBom parseBom(File thisProjectRoot, + ReleaserProperties properties) { + return VersionsFromBom.EMPTY_VERSION; + } + + }; + /** * Different projects can have different parsers. This method will tell whether the * current parser should be applied or not. @@ -69,19 +85,4 @@ public interface CustomBomParser { return new File(thisProjectRoot, "build.gradle").exists(); } - CustomBomParser NO_OP = new CustomBomParser() { - @Override - public boolean isApplicable(File thisProjectRoot, ReleaserProperties properties, - Set projects) { - return true; - } - - @Override - public VersionsFromBom parseBom(File thisProjectRoot, - ReleaserProperties properties) { - return VersionsFromBom.EMPTY_VERSION; - } - - }; - } diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/GradleUpdater.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/GradleUpdater.java index aac8f28b..986ebfd1 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/GradleUpdater.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/GradleUpdater.java @@ -37,6 +37,7 @@ import org.slf4j.LoggerFactory; import org.springframework.cloud.release.internal.ReleaserProperties; import org.springframework.cloud.release.internal.ReleaserPropertiesAware; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; /** diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/MavenBomParser.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/MavenBomParser.java index 06614f45..25ec023e 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/MavenBomParser.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/MavenBomParser.java @@ -31,6 +31,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.release.internal.ReleaserProperties; +import org.springframework.cloud.release.internal.project.Project; +import org.springframework.cloud.release.internal.tech.PomReader; /** * Parses the poms for a given project and populates versions from a release train. diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/PomUpdater.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/PomUpdater.java index 2bac33df..a44d21f4 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/PomUpdater.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/PomUpdater.java @@ -40,6 +40,8 @@ import org.codehaus.stax2.XMLInputFactory2; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.cloud.release.internal.project.Project; +import org.springframework.cloud.release.internal.tech.PomReader; import org.springframework.util.StringUtils; import static org.springframework.util.StringUtils.hasText; diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/ProjectPomUpdater.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/ProjectPomUpdater.java index 59024804..bdf607c0 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/ProjectPomUpdater.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/ProjectPomUpdater.java @@ -38,6 +38,8 @@ import org.slf4j.LoggerFactory; import org.springframework.cloud.release.internal.ReleaserProperties; import org.springframework.cloud.release.internal.ReleaserPropertiesAware; import org.springframework.cloud.release.internal.git.ProjectGitHandler; +import org.springframework.cloud.release.internal.project.Project; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; /** @@ -60,10 +62,10 @@ public class ProjectPomUpdater implements ReleaserPropertiesAware { private final PomUpdater pomUpdater = new PomUpdater(); - private ReleaserProperties properties; - private final List bomParsers; + private ReleaserProperties properties; + public ProjectPomUpdater(ReleaserProperties properties, List bomParsers) { this.properties = properties; this.gitRepo = new ProjectGitHandler(properties); diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/VersionsFromBom.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/VersionsFromBom.java index 113e38a0..1fccac33 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/VersionsFromBom.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/VersionsFromBom.java @@ -26,6 +26,8 @@ import java.util.Set; import java.util.stream.Collectors; import org.springframework.cloud.release.internal.ReleaserProperties; +import org.springframework.cloud.release.internal.project.Project; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; /** @@ -174,6 +176,10 @@ public class VersionsFromBom { this.projects.removeIf(project -> expectedProjectName.equals(project.name)); } + public Set projects() { + return this.projects; + } + @Override public String toString() { return "Projects=\n\t" + this.projects.stream().map(Object::toString) diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/VersionsFromBomBuilder.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/VersionsFromBomBuilder.java index 33732f1d..106e4cab 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/VersionsFromBomBuilder.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/VersionsFromBomBuilder.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://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, @@ -23,6 +23,7 @@ import java.util.List; import java.util.Set; import org.springframework.cloud.release.internal.ReleaserProperties; +import org.springframework.cloud.release.internal.project.Project; public class VersionsFromBomBuilder { diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/docs/CustomProjectDocumentationUpdater.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/docs/CustomProjectDocumentationUpdater.java index 2e8b1f1d..b0e0410e 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/docs/CustomProjectDocumentationUpdater.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/docs/CustomProjectDocumentationUpdater.java @@ -18,13 +18,30 @@ package org.springframework.cloud.release.internal.docs; import java.io.File; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; +import org.springframework.cloud.release.internal.project.ProjectVersion; /** * @author Marcin Grzejszczak */ public interface CustomProjectDocumentationUpdater { + /** + * NO OP implementation of the updater. + */ + CustomProjectDocumentationUpdater NO_OP = new CustomProjectDocumentationUpdater() { + @Override + public boolean isApplicable(File clonedDocumentationProject, + ProjectVersion currentProject, String bomBranch) { + return true; + } + + @Override + public File updateDocsRepo(File clonedDocumentationProject, + ProjectVersion currentProject, String bomBranch) { + return clonedDocumentationProject; + } + }; + /** * Different projects can have different documentation updaters. This method will tell * whether the current updater should be applied or not. Updates the documentation @@ -48,21 +65,4 @@ public interface CustomProjectDocumentationUpdater { File updateDocsRepo(File clonedDocumentationProject, ProjectVersion currentProject, String bomBranch); - /** - * NO OP implementation of the updater. - */ - CustomProjectDocumentationUpdater NO_OP = new CustomProjectDocumentationUpdater() { - @Override - public boolean isApplicable(File clonedDocumentationProject, - ProjectVersion currentProject, String bomBranch) { - return true; - } - - @Override - public File updateDocsRepo(File clonedDocumentationProject, - ProjectVersion currentProject, String bomBranch) { - return clonedDocumentationProject; - } - }; - } diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/docs/DocumentationUpdater.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/docs/DocumentationUpdater.java index bcdea4a0..35484bb3 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/docs/DocumentationUpdater.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/docs/DocumentationUpdater.java @@ -17,11 +17,12 @@ package org.springframework.cloud.release.internal.docs; import java.io.File; +import java.util.List; import org.springframework.cloud.release.internal.ReleaserProperties; import org.springframework.cloud.release.internal.ReleaserPropertiesAware; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; import org.springframework.cloud.release.internal.git.ProjectGitHandler; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; import org.springframework.cloud.release.internal.template.TemplateGenerator; @@ -38,9 +39,10 @@ public class DocumentationUpdater implements ReleaserPropertiesAware { public DocumentationUpdater(ProjectGitHandler gitHandler, ReleaserProperties properties, TemplateGenerator templateGenerator, - ProjectDocumentationUpdater updater) { + List updaters) { this.properties = properties; - this.projectDocumentationUpdater = updater; + this.projectDocumentationUpdater = new ProjectDocumentationUpdater(properties, + gitHandler, updaters); this.releaseTrainContentsUpdater = new ReleaseTrainContentsUpdater( this.properties, gitHandler, templateGenerator); } diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/docs/ProjectDocumentationUpdater.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/docs/ProjectDocumentationUpdater.java index 71ee6a7c..fef25238 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/docs/ProjectDocumentationUpdater.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/docs/ProjectDocumentationUpdater.java @@ -24,24 +24,24 @@ import org.slf4j.LoggerFactory; import org.springframework.cloud.release.internal.ReleaserProperties; import org.springframework.cloud.release.internal.ReleaserPropertiesAware; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; import org.springframework.cloud.release.internal.git.ProjectGitHandler; +import org.springframework.cloud.release.internal.project.ProjectVersion; /** * @author Marcin Grzejszczak */ -public class ProjectDocumentationUpdater implements ReleaserPropertiesAware { +class ProjectDocumentationUpdater implements ReleaserPropertiesAware { private static final Logger log = LoggerFactory .getLogger(ProjectDocumentationUpdater.class); private final ProjectGitHandler gitHandler; - private ReleaserProperties properties; - private final List updaters; - public ProjectDocumentationUpdater(ReleaserProperties properties, + private ReleaserProperties properties; + + ProjectDocumentationUpdater(ReleaserProperties properties, ProjectGitHandler gitHandler, List updaters) { this.gitHandler = gitHandler; diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/docs/ReleaseTrainContentsUpdater.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/docs/ReleaseTrainContentsUpdater.java index 23065684..d37e667d 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/docs/ReleaseTrainContentsUpdater.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/docs/ReleaseTrainContentsUpdater.java @@ -32,8 +32,8 @@ import org.slf4j.LoggerFactory; import org.springframework.cloud.release.internal.ReleaserProperties; import org.springframework.cloud.release.internal.ReleaserPropertiesAware; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; import org.springframework.cloud.release.internal.git.ProjectGitHandler; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; import org.springframework.cloud.release.internal.tech.HandlebarsHelper; import org.springframework.cloud.release.internal.template.TemplateGenerator; diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/docs/Row.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/docs/Row.java index c6dff07c..b9b8d4a5 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/docs/Row.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/docs/Row.java @@ -21,7 +21,7 @@ import java.util.List; import java.util.Objects; import java.util.stream.Collectors; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; /** diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/git/ProjectGitHandler.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/git/ProjectGitHandler.java index 82867055..a3fa22be 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/git/ProjectGitHandler.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/git/ProjectGitHandler.java @@ -27,7 +27,7 @@ import org.slf4j.LoggerFactory; import org.springframework.cloud.release.internal.ReleaserProperties; import org.springframework.cloud.release.internal.ReleaserPropertiesAware; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.tech.TemporaryFileStorage; import org.springframework.util.StringUtils; @@ -57,6 +57,10 @@ public class ProjectGitHandler implements ReleaserPropertiesAware { registerShutdownHook(); } + static void clearCache() { + CACHE.clear(); + } + private void registerShutdownHook() { Runtime.getRuntime().addShutdownHook(new Thread(TemporaryFileStorage::cleanup)); } @@ -79,10 +83,6 @@ public class ProjectGitHandler implements ReleaserPropertiesAware { } } - static void clearCache() { - CACHE.clear(); - } - public void commitAfterBumpingVersions(File project, ProjectVersion bumpedVersion) { if (bumpedVersion.isSnapshot()) { log.info("Snapshot version [{}] found. Will only commit the changed poms", diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/github/GithubIssues.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/github/GithubIssues.java index 0e8db268..f4db3caa 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/github/GithubIssues.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/github/GithubIssues.java @@ -30,7 +30,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.release.internal.ReleaserProperties; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; import org.springframework.util.Assert; import org.springframework.util.StringUtils; diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/github/GithubMilestones.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/github/GithubMilestones.java index b3ee9ee6..455c522f 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/github/GithubMilestones.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/github/GithubMilestones.java @@ -32,7 +32,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.release.internal.ReleaserProperties; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.util.Assert; import org.springframework.util.StringUtils; diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/github/ProjectGitHubHandler.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/github/ProjectGitHubHandler.java index da2ad8c1..468ffcc5 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/github/ProjectGitHubHandler.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/github/ProjectGitHubHandler.java @@ -21,7 +21,7 @@ import org.slf4j.LoggerFactory; import org.springframework.cloud.release.internal.ReleaserProperties; import org.springframework.cloud.release.internal.ReleaserPropertiesAware; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; import org.springframework.cloud.release.internal.tech.TemporaryFileStorage; diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/postrelease/PostReleaseActions.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/postrelease/PostReleaseActions.java index b7dd89ce..82834fd2 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/postrelease/PostReleaseActions.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/postrelease/PostReleaseActions.java @@ -34,10 +34,10 @@ import org.slf4j.LoggerFactory; import org.springframework.cloud.release.internal.ReleaserProperties; import org.springframework.cloud.release.internal.buildsystem.GradleUpdater; import org.springframework.cloud.release.internal.buildsystem.ProjectPomUpdater; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; import org.springframework.cloud.release.internal.git.ProjectGitHandler; import org.springframework.cloud.release.internal.project.ProcessedProject; import org.springframework.cloud.release.internal.project.ProjectCommandExecutor; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; import org.springframework.cloud.release.internal.versions.VersionsFetcher; import org.springframework.core.NestedExceptionUtils; diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/project/ProcessedProject.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/project/ProcessedProject.java index 04584ddb..4e3004ae 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/project/ProcessedProject.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/project/ProcessedProject.java @@ -17,7 +17,6 @@ package org.springframework.cloud.release.internal.project; import org.springframework.cloud.release.internal.ReleaserProperties; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; /** * Represents a processed project. diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/Project.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/project/Project.java similarity index 88% rename from spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/Project.java rename to spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/project/Project.java index 8e481e31..15bcec9c 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/Project.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/project/Project.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * https://www.apache.org/licenses/LICENSE-2.0 + * https://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, @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cloud.release.internal.buildsystem; +package org.springframework.cloud.release.internal.project; /** * Represents a single project. @@ -23,10 +23,19 @@ package org.springframework.cloud.release.internal.buildsystem; */ public class Project { + /** + * An empty project. + */ public static Project EMPTY_PROJECT = new Project("", ""); + /** + * Project name. + */ public final String name; + /** + * Project version. + */ public final String version; public Project(String name, String version) { diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/project/ProjectCommandExecutor.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/project/ProjectCommandExecutor.java index eb2810af..aa9c4144 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/project/ProjectCommandExecutor.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/project/ProjectCommandExecutor.java @@ -40,7 +40,6 @@ import org.slf4j.LoggerFactory; import org.springframework.cloud.release.internal.ReleaserProperties; import org.springframework.cloud.release.internal.ReleaserPropertiesAware; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; import org.springframework.util.StringUtils; /** @@ -304,47 +303,6 @@ class CommandPicker { private static final Log log = LogFactory.getLog(CommandPicker.class); - private enum ProjectType { - - MAVEN, GRADLE, BASH; - - } - - /** - * Enumeration over commonly used Maven profiles. - */ - private enum MavenProfile { - - /** - * Profile used for milestone versions. - */ - MILESTONE, - - /** - * Profile used for ga versions. - */ - CENTRAL, - - /** - * Profile used to run integration tests. - */ - INTEGRATION, - - /** - * Profile used to run guides publishing. - */ - GUIDES; - - /** - * Converts the profile to lowercase, maven command line property. - * @return profile with prepended -P - */ - public String asMavenProfile() { - return "-P" + this.name().toLowerCase(); - } - - } - private final ReleaserProperties releaserProperties; private final ProjectType projectType; @@ -530,6 +488,47 @@ class CommandPicker { .collect(Collectors.joining(" ")); } + private enum ProjectType { + + MAVEN, GRADLE, BASH; + + } + + /** + * Enumeration over commonly used Maven profiles. + */ + private enum MavenProfile { + + /** + * Profile used for milestone versions. + */ + MILESTONE, + + /** + * Profile used for ga versions. + */ + CENTRAL, + + /** + * Profile used to run integration tests. + */ + INTEGRATION, + + /** + * Profile used to run guides publishing. + */ + GUIDES; + + /** + * Converts the profile to lowercase, maven command line property. + * @return profile with prepended -P + */ + public String asMavenProfile() { + return "-P" + this.name().toLowerCase(); + } + + } + } class HtmlFileWalker extends SimpleFileVisitor { diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/ProjectVersion.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/project/ProjectVersion.java similarity index 99% rename from spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/ProjectVersion.java rename to spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/project/ProjectVersion.java index 7970c16c..7dc57493 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/ProjectVersion.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/project/ProjectVersion.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cloud.release.internal.buildsystem; +package org.springframework.cloud.release.internal.project; import java.io.File; import java.util.Arrays; @@ -25,7 +25,7 @@ import java.util.regex.Pattern; import org.apache.maven.model.Model; -import org.springframework.cloud.release.internal.project.ProjectCommandExecutor; +import org.springframework.cloud.release.internal.tech.PomReader; import org.springframework.util.StringUtils; /** diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/project/Projects.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/project/Projects.java index 4337ea37..5c1811fc 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/project/Projects.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/project/Projects.java @@ -26,8 +26,6 @@ import java.util.Set; import java.util.stream.Collectors; import org.springframework.cloud.release.internal.ReleaserProperties; -import org.springframework.cloud.release.internal.buildsystem.Project; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; /** * Abstraction over collection of projects. diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/sagan/SaganUpdater.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/sagan/SaganUpdater.java index 24942ab4..bb11fd38 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/sagan/SaganUpdater.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/sagan/SaganUpdater.java @@ -28,7 +28,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.release.internal.ReleaserProperties; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.util.StringUtils; /** diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/PomReader.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/tech/PomReader.java similarity index 97% rename from spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/PomReader.java rename to spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/tech/PomReader.java index 69da44ee..e7e6e0ba 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/buildsystem/PomReader.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/tech/PomReader.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cloud.release.internal.buildsystem; +package org.springframework.cloud.release.internal.tech; import java.io.File; import java.io.FileReader; diff --git a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/versions/VersionsFetcher.java b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/versions/VersionsFetcher.java index e8ba5ebf..7a2093db 100644 --- a/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/versions/VersionsFetcher.java +++ b/spring-cloud-release-tools-core/src/main/java/org/springframework/cloud/release/internal/versions/VersionsFetcher.java @@ -39,7 +39,7 @@ import org.springframework.boot.context.properties.source.MapConfigurationProper import org.springframework.cloud.release.internal.ReleaserProperties; import org.springframework.cloud.release.internal.ReleaserPropertiesAware; import org.springframework.cloud.release.internal.buildsystem.ProjectPomUpdater; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; import org.springframework.core.io.InputStreamResource; import org.springframework.util.StringUtils; @@ -54,12 +54,12 @@ public class VersionsFetcher implements ReleaserPropertiesAware { private static final Logger log = LoggerFactory.getLogger(VersionsFetcher.class); - private ReleaserProperties properties; - private final ProjectPomUpdater projectPomUpdater; private final ToPropertiesConverter toPropertiesConverter; + private ReleaserProperties properties; + public VersionsFetcher(ReleaserProperties properties, ProjectPomUpdater projectPomUpdater) { this.properties = properties; diff --git a/spring-cloud-release-tools-core/src/main/resources/templates/cloud/blog.hbs b/spring-cloud-release-tools-core/src/main/resources/templates/cloud/blog.hbs index 6777775a..d3aff91c 100644 --- a/spring-cloud-release-tools-core/src/main/resources/templates/cloud/blog.hbs +++ b/spring-cloud-release-tools-core/src/main/resources/templates/cloud/blog.hbs @@ -2,16 +2,17 @@ On behalf of the community, I am pleased to announce that the {{ availability }} ## Notable Changes in the {{ releaseName }} Release Train {{#each projects}} -### {{ name }} + ### {{ name }} -Some text related to project + Some text related to project {{/each}} The following modules were updated as part of {{ releaseVersion }}: -| Module | Version | Issues -|--- |--- |--- |--- -{{#each projects}}| {{name}} | {{version}} | {{#if closedMilestoneUrl}}([issues]({{{ closedMilestoneUrl }}})){{/if}}{{^closedMilestoneUrl}} {{/closedMilestoneUrl}} +| Module | Version | Issues +|--- |--- |--- |--- +{{#each projects}}| {{name}} | {{version}} | {{#if + closedMilestoneUrl}}([issues]({{{ closedMilestoneUrl }}})){{/if}}{{^closedMilestoneUrl}} {{/closedMilestoneUrl}} {{/each}} As always, we welcome feedback on [GitHub](https://github.com/spring-cloud/), on [Gitter](https://gitter.im/spring-cloud/spring-cloud), on [Stack Overflow](https://stackoverflow.com/questions/tagged/spring-cloud), or on [Twitter](https://twitter.com/SpringCloud). @@ -19,16 +20,17 @@ As always, we welcome feedback on [GitHub](https://github.com/spring-cloud/), on To get started with Maven with a BOM (dependency management only): ``` -{{#if nonRelease}} - - spring-milestones - Spring Milestones - https://repo.spring.io/milestone - - false - - -{{/if}} +{{#if nonRelease}} + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + false + + + {{/if}} @@ -57,28 +59,28 @@ or with Gradle: ``` buildscript { - dependencies { - classpath "io.spring.gradle:dependency-management-plugin:1.0.2.RELEASE" - } +dependencies { +classpath "io.spring.gradle:dependency-management-plugin:1.0.2.RELEASE" +} } {{#if nonRelease}}repositories { - maven { - url 'https://repo.spring.io/milestone' - } +maven { +url 'https://repo.spring.io/milestone' +} }{{/if}} apply plugin: "io.spring.dependency-management" dependencyManagement { - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:{{ releaseVersion }}' - } +imports { +mavenBom 'org.springframework.cloud:spring-cloud-dependencies:{{ releaseVersion }}' +} } dependencies { - compile 'org.springframework.cloud:spring-cloud-starter-config' - compile 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' - ... +compile 'org.springframework.cloud:spring-cloud-starter-config' +compile 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' +... } ``` diff --git a/spring-cloud-release-tools-core/src/main/resources/templates/cloud/spring-project.hbs b/spring-cloud-release-tools-core/src/main/resources/templates/cloud/spring-project.hbs index b59e2769..6e45b488 100644 --- a/spring-cloud-release-tools-core/src/main/resources/templates/cloud/spring-project.hbs +++ b/spring-cloud-release-tools-core/src/main/resources/templates/cloud/spring-project.hbs @@ -5,15 +5,15 @@ title: Spring Cloud badges: - # Customize your project's badges. Delete any entries that do not apply. - custom: - - name: Source (GitHub) - url: https://github.com/spring-cloud - icon: github +# Customize your project's badges. Delete any entries that do not apply. +custom: +- name: Source (GitHub) +url: https://github.com/spring-cloud +icon: github - - name: StackOverflow - url: https://stackoverflow.com/questions/tagged/spring-cloud - icon: stackoverflow +- name: StackOverflow +url: https://stackoverflow.com/questions/tagged/spring-cloud +icon: stackoverflow --- @@ -42,7 +42,7 @@ Spring Cloud builds on Spring Boot by providing a bunch of libraries that enhance the behaviour of an application when added to the classpath. You can take advantage of the basic default behaviour to get started really quickly, and then when you need to, you can -configure or extend to create a custom solution. +configure or extend to create a custom solution. @@ -59,7 +59,8 @@ and eureka (change the artifact ids to pull in other starters): ## Features -Spring Cloud focuses on providing good out of box experience for typical use cases and extensibility mechanism to cover others. +Spring Cloud focuses on providing good out of box experience for typical use cases and extensibility mechanism to cover +others. * Distributed/versioned configuration * Service registration and discovery @@ -79,9 +80,9 @@ annotation. Example application that is a discovery client: @SpringBootApplication @EnableDiscoveryClient public class Application { - public static void main(String[] args) { - SpringApplication.run(Application.class, args); - } +public static void main(String[] args) { +SpringApplication.run(Application.class, args); +} } ``` @@ -91,119 +92,160 @@ public class Application { {% capture project_description %} -Centralized external configuration management backed by a git repository. The configuration resources map directly to Spring `Environment` but could be used by non-Spring applications if desired. +Centralized external configuration management backed by a git repository. The configuration resources map directly to +Spring `Environment` but could be used by non-Spring applications if desired. {% endcapture %} -{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-config" repo_url="https://github.com/spring-cloud/spring-cloud-config" project_title="Spring Cloud Config" project_description=project_description %} +{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-config" +repo_url="https://github.com/spring-cloud/spring-cloud-config" project_title="Spring Cloud Config" +project_description=project_description %} {% capture project_description %} Integration with various Netflix OSS components (Eureka, Hystrix, Zuul, Archaius, etc.). {% endcapture %} -{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-netflix" repo_url="https://github.com/spring-cloud/spring-cloud-netflix" project_title="Spring Cloud Netflix" project_description=project_description %} +{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-netflix" +repo_url="https://github.com/spring-cloud/spring-cloud-netflix" project_title="Spring Cloud Netflix" +project_description=project_description %} {% capture project_description %} -An event bus for linking services and service instances together with distributed messaging. Useful for propagating state changes across a cluster (e.g. config change events). +An event bus for linking services and service instances together with distributed messaging. Useful for propagating +state changes across a cluster (e.g. config change events). {% endcapture %} -{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-bus" repo_url="https://github.com/spring-cloud/spring-cloud-bus" project_title="Spring Cloud Bus" project_description=project_description %} +{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-bus" +repo_url="https://github.com/spring-cloud/spring-cloud-bus" project_title="Spring Cloud Bus" +project_description=project_description %} {% capture project_description %} -Integrates your application with Pivotal Cloud Foundry. Provides a service discovery implementation and also makes it easy to implement SSO and OAuth2 protected resources. +Integrates your application with Pivotal Cloud Foundry. Provides a service discovery implementation and also makes it +easy to implement SSO and OAuth2 protected resources. {% endcapture %} -{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-cloudfoundry" repo_url="https://github.com/spring-cloud/spring-cloud-cloudfoundry" project_title="Spring Cloud for Cloud Foundry" project_description=project_description %} +{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-cloudfoundry" +repo_url="https://github.com/spring-cloud/spring-cloud-cloudfoundry" project_title="Spring Cloud for Cloud Foundry" +project_description=project_description %} {% capture project_description %} Provides a starting point for building a service broker that implements the Open Service Broker API. {% endcapture %} -{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-open-service-broker/" repo_url="https://github.com/spring-cloud/spring-cloud-open-service-broker" project_title="Spring Cloud Open Service Broker" project_description=project_description %} +{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-open-service-broker/" +repo_url="https://github.com/spring-cloud/spring-cloud-open-service-broker" project_title="Spring Cloud Open Service +Broker" project_description=project_description %} {% capture project_description %} -Leadership election and common stateful patterns with an abstraction and implementation for Zookeeper, Redis, Hazelcast, Consul. +Leadership election and common stateful patterns with an abstraction and implementation for Zookeeper, Redis, Hazelcast, +Consul. {% endcapture %} -{% include project_block.md site_url="/spring-cloud" repo_url="https://github.com/spring-cloud/spring-cloud-cluster" project_title="Spring Cloud Cluster" project_description=project_description %} +{% include project_block.md site_url="/spring-cloud" repo_url="https://github.com/spring-cloud/spring-cloud-cluster" +project_title="Spring Cloud Cluster" project_description=project_description %} {% capture project_description %} Service discovery and configuration management with Hashicorp Consul. {% endcapture %} -{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-consul" repo_url="https://github.com/spring-cloud/spring-cloud-consul" project_title="Spring Cloud Consul" project_description=project_description %} +{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-consul" +repo_url="https://github.com/spring-cloud/spring-cloud-consul" project_title="Spring Cloud Consul" +project_description=project_description %} {% capture project_description %} Provides support for load-balanced OAuth2 rest client and authentication header relays in a Zuul proxy. {% endcapture %} -{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-security" repo_url="https://github.com/spring-cloud/spring-cloud-security" project_title="Spring Cloud Security" project_description=project_description %} +{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-security" +repo_url="https://github.com/spring-cloud/spring-cloud-security" project_title="Spring Cloud Security" +project_description=project_description %} {% capture project_description %} Distributed tracing for Spring Cloud applications, compatible with Zipkin, HTrace and log-based (e.g. ELK) tracing. {% endcapture %} -{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-sleuth" repo_url="https://github.com/spring-cloud/spring-cloud-sleuth" project_title="Spring Cloud Sleuth" project_description=project_description %} +{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-sleuth" +repo_url="https://github.com/spring-cloud/spring-cloud-sleuth" project_title="Spring Cloud Sleuth" +project_description=project_description %} {% capture project_description %} -A cloud-native orchestration service for composable microservice applications on modern runtimes. Easy-to-use DSL, drag-and-drop GUI, and REST-APIs together simplifies the overall orchestration of microservice based data pipelines. +A cloud-native orchestration service for composable microservice applications on modern runtimes. Easy-to-use DSL, +drag-and-drop GUI, and REST-APIs together simplifies the overall orchestration of microservice based data pipelines. {% endcapture %} -{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-dataflow" repo_url="https://github.com/spring-cloud/spring-cloud-dataflow" project_title="Spring Cloud Data Flow" project_description=project_description %} +{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-dataflow" +repo_url="https://github.com/spring-cloud/spring-cloud-dataflow" project_title="Spring Cloud Data Flow" +project_description=project_description %} {% capture project_description %} -A lightweight event-driven microservices framework to quickly build applications that can connect to external systems. Simple declarative model to send and receive messages using Apache Kafka or RabbitMQ between Spring Boot apps. +A lightweight event-driven microservices framework to quickly build applications that can connect to external systems. +Simple declarative model to send and receive messages using Apache Kafka or RabbitMQ between Spring Boot apps. {% endcapture %} -{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-stream" repo_url="https://github.com/spring-cloud/spring-cloud-stream" project_title="Spring Cloud Stream" project_description=project_description %} +{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-stream" +repo_url="https://github.com/spring-cloud/spring-cloud-stream" project_title="Spring Cloud Stream" +project_description=project_description %} {% capture project_description %} -Spring Cloud Stream App Starters are Spring Boot based Spring Integration applications that provide integration with external systems. +Spring Cloud Stream App Starters are Spring Boot based Spring Integration applications that provide integration with +external systems. {% endcapture %} -{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-stream-app-starters" repo_url="https://github.com/spring-cloud/spring-cloud-stream-app-starters" project_title="Spring Cloud Stream App Starters" project_description=project_description %} +{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-stream-app-starters" +repo_url="https://github.com/spring-cloud/spring-cloud-stream-app-starters" project_title="Spring Cloud Stream App +Starters" project_description=project_description %} {% capture project_description %} -A short-lived microservices framework to quickly build applications that perform finite amounts of data processing. Simple declarative for adding both functional and non-functional features to Spring Boot apps. +A short-lived microservices framework to quickly build applications that perform finite amounts of data processing. +Simple declarative for adding both functional and non-functional features to Spring Boot apps. {% endcapture %} -{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-task" repo_url="https://github.com/spring-cloud/spring-cloud-task" project_title="Spring Cloud Task" project_description=project_description %} +{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-task" +repo_url="https://github.com/spring-cloud/spring-cloud-task" project_title="Spring Cloud Task" +project_description=project_description %} {% capture project_description %} -Spring Cloud Task App Starters are Spring Boot applications that may be any process including Spring Batch jobs that do not run forever, and they end/stop after a finite period of data processing. +Spring Cloud Task App Starters are Spring Boot applications that may be any process including Spring Batch jobs that do +not run forever, and they end/stop after a finite period of data processing. {% endcapture %} -{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-task-app-starters" repo_url="https://github.com/spring-cloud/spring-cloud-task-app-starters" project_title="Spring Cloud Task App Starters" project_description=project_description %} +{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-task-app-starters" +repo_url="https://github.com/spring-cloud/spring-cloud-task-app-starters" project_title="Spring Cloud Task App Starters" +project_description=project_description %} {% capture project_description %} Service discovery and configuration management with Apache Zookeeper. {% endcapture %} -{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-zookeeper" repo_url="https://github.com/spring-cloud/spring-cloud-zookeeper" project_title="Spring Cloud Zookeeper" project_description=project_description %} +{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-zookeeper" +repo_url="https://github.com/spring-cloud/spring-cloud-zookeeper" project_title="Spring Cloud Zookeeper" +project_description=project_description %} {% capture project_description %} -Easy integration with hosted Amazon Web Services. It offers a convenient way to interact with AWS provided services using well-known Spring idioms and APIs, such as the messaging or caching API. Developers can build their application around the hosted services without having to care about infrastructure or maintenance. +Easy integration with hosted Amazon Web Services. It offers a convenient way to interact with AWS provided services +using well-known Spring idioms and APIs, such as the messaging or caching API. Developers can build their application +around the hosted services without having to care about infrastructure or maintenance. {% endcapture %} {% capture site_url %} {{ site.projects_site_url }}/spring-cloud-aws {% endcapture %} -{% include project_block.md site_url=site_url repo_url="https://github.com/spring-cloud/spring-cloud-aws" project_title="Spring Cloud for Amazon Web Services" project_description=project_description %} +{% include project_block.md site_url=site_url repo_url="https://github.com/spring-cloud/spring-cloud-aws" +project_title="Spring Cloud for Amazon Web Services" project_description=project_description %} {% capture project_description %} @@ -215,57 +257,77 @@ databases and message brokers (the project formerly known as "Spring Cloud"). {{ site.projects_site_url }}/spring-cloud-connectors {% endcapture %} -{% include project_block.md site_url=site_url repo_url="https://github.com/spring-cloud/spring-cloud-connectors" project_title="Spring Cloud Connectors" project_description=project_description %} +{% include project_block.md site_url=site_url repo_url="https://github.com/spring-cloud/spring-cloud-connectors" +project_title="Spring Cloud Connectors" project_description=project_description %} {% capture project_description %} -Spring Boot-style starter projects to ease dependency management for consumers of Spring Cloud. (Discontinued as a project and merged with the other projects after Angel.SR2.) +Spring Boot-style starter projects to ease dependency management for consumers of Spring Cloud. (Discontinued as a +project and merged with the other projects after Angel.SR2.) {% endcapture %} -{% include project_block.md site_url="https://github.com/spring-cloud/spring-cloud-starters" repo_url="https://github.com/spring-cloud/spring-cloud-starters" project_title="Spring Cloud Starters" project_description=project_description %} +{% include project_block.md site_url="https://github.com/spring-cloud/spring-cloud-starters" +repo_url="https://github.com/spring-cloud/spring-cloud-starters" project_title="Spring Cloud Starters" +project_description=project_description %} {% capture project_description %} Spring Boot CLI plugin for creating Spring Cloud component applications quickly in Groovy {% endcapture %} -{% include project_block.md site_url="https://github.com/spring-cloud/spring-cloud-cli" repo_url="https://github.com/spring-cloud/spring-cloud-cli" project_title="Spring Cloud CLI" project_description=project_description %} - +{% include project_block.md site_url="https://github.com/spring-cloud/spring-cloud-cli" +repo_url="https://github.com/spring-cloud/spring-cloud-cli" project_title="Spring Cloud CLI" +project_description=project_description %} + {% capture project_description %} -Spring Cloud Contract is an umbrella project holding solutions that help users in successfully implementing the Consumer Driven Contracts approach. +Spring Cloud Contract is an umbrella project holding solutions that help users in successfully implementing the Consumer +Driven Contracts approach. {% endcapture %} -{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-contract" repo_url="https://github.com/spring-cloud/spring-cloud-contract" project_title="Spring Cloud Contract" project_description=project_description %} +{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-contract" +repo_url="https://github.com/spring-cloud/spring-cloud-contract" project_title="Spring Cloud Contract" +project_description=project_description %} {% capture project_description %} Spring Cloud Gateway is an intelligent and programmable router based on Project Reactor. {% endcapture %} -{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-gateway" repo_url="https://github.com/spring-cloud/spring-cloud-gateway" project_title="Spring Cloud Gateway" project_description=project_description %} +{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-gateway" +repo_url="https://github.com/spring-cloud/spring-cloud-gateway" project_title="Spring Cloud Gateway" +project_description=project_description %} {% capture project_description %} -Spring Cloud OpenFeign provides integrations for Spring Boot apps through autoconfiguration and binding to the Spring Environment and other Spring programming model idioms. +Spring Cloud OpenFeign provides integrations for Spring Boot apps through autoconfiguration and binding to the Spring +Environment and other Spring programming model idioms. {% endcapture %} -{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-openfeign" repo_url="https://github.com/spring-cloud/spring-cloud-openfeign" project_title="Spring Cloud OpenFeign" project_description=project_description %} +{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-openfeign" +repo_url="https://github.com/spring-cloud/spring-cloud-openfeign" project_title="Spring Cloud OpenFeign" +project_description=project_description %} {% capture project_description %} -Spring Cloud Pipelines provides an opinionated deployment pipeline with steps to ensure that your application can be deployed in zero downtime fashion and easilly rolled back of something goes wrong. +Spring Cloud Pipelines provides an opinionated deployment pipeline with steps to ensure that your application can be +deployed in zero downtime fashion and easilly rolled back of something goes wrong. {% endcapture %} -{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-pipelines" repo_url="https://github.com/spring-cloud/spring-cloud-pipelines" project_title="Spring Cloud Pipelines" project_description=project_description %} +{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-pipelines" +repo_url="https://github.com/spring-cloud/spring-cloud-pipelines" project_title="Spring Cloud Pipelines" +project_description=project_description %} {% capture project_description %} -Spring Cloud Function promotes the implementation of business logic via functions. It supports a uniform programming model across serverless providers, as well as the ability to run standalone (locally or in a PaaS). +Spring Cloud Function promotes the implementation of business logic via functions. It supports a uniform programming +model across serverless providers, as well as the ability to run standalone (locally or in a PaaS). {% endcapture %} -{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-function" repo_url="https://github.com/spring-cloud/spring-cloud-function" project_title="Spring Cloud Function" project_description=project_description %} - +{% include project_block.md site_url="https://cloud.spring.io/spring-cloud-function" +repo_url="https://github.com/spring-cloud/spring-cloud-function" project_title="Spring Cloud Function" +project_description=project_description %} + ## Release Trains Spring Cloud is an umbrella project consisting of independent projects with, in principle, different @@ -273,7 +335,7 @@ release cadences. To manage the portfolio a BOM (Bill of Materials) is published set of dependencies on the individual project (see below). The release trains have names, not versions, to avoid confusion with the sub-projects. The names are an alphabetic sequence (so you can sort them chronologically) with names of London Tube stations ("Angel" is the first -release, "Brixton" is the second). When point releases of the individual projects accumulate to +release, "Brixton" is the second). When point releases of the individual projects accumulate to a critical mass, or if there is a critical bug in one of them that needs to be available to everyone, the release train will push out "service releases" with names ending ".SRX", where "X" is a number. @@ -282,7 +344,7 @@ Release train contents: -|Component |{{lastGaTrainName}}|{{currentGaTrainName}}|{{currentSnapshotTrainName}}| +|Component |{{lastGaTrainName}}|{{currentGaTrainName}}|{{currentSnapshotTrainName}}| |--------------------------------------|-----------------|---------------------|------------------------| {{#each projects}} |{{componentName}}|{{lastGaVersion}}|{{currentGaVersion}}|{{currentSnapshotVersion}}| {{/each}} @@ -292,22 +354,26 @@ Release train contents: Finchley builds and works with Spring Boot 2.0.x, and is not expected to work with Spring Boot 1.5.x. -Note: The Dalston release train will [reach end-of-life](https://spring.io/blog/2018/06/19/spring-cloud-finchley-release-is-available) in December 2018. Edgware will follow the end-of-life cycle of Spring Boot 1.5.x. - +Note: The Dalston release train will [reach +end-of-life](https://spring.io/blog/2018/06/19/spring-cloud-finchley-release-is-available) in December 2018. Edgware +will follow the end-of-life cycle of Spring Boot 1.5.x. + The Dalston and Edgware release trains build on Spring Boot 1.5.x, and are not expected to work with Spring Boot 2.0.x. -NOTE: The Camden release train was [marked end-of-life](https://spring.io/blog/2018/06/19/spring-cloud-finchley-release-is-available). - +NOTE: The Camden release train was [marked +end-of-life](https://spring.io/blog/2018/06/19/spring-cloud-finchley-release-is-available). + The Camden release train builds on Spring Boot 1.4.x, but is also tested with 1.5.x. -NOTE: The Brixton and Angel release trains were [marked end-of-life](https://spring.io/blog/2017/07/21/spring-cloud-dalston-sr2-is-available-now#end-of-life-for-angel-and-brixton-release-trains) +NOTE: The Brixton and Angel release trains were [marked +end-of-life](https://spring.io/blog/2017/07/21/spring-cloud-dalston-sr2-is-available-now#end-of-life-for-angel-and-brixton-release-trains) (EOL) in July 2017. The Brixton release train builds on Spring Boot 1.3.x, but is also tested with 1.4.x. - + The Angel release train builds on Spring Boot 1.2.x, and is incompatible in some areas with Spring Boot 1.3.x. Brixton builds on Spring Boot 1.3.x and is similarly incompatible with 1.2.x. Some @@ -335,8 +401,9 @@ Spring dependency management plugin. > Spring Cloud. The opposite is not true: using the Cloud parent > makes it impossible, or at least unreliable, to also use the > Boot BOM to change the version of Spring Boot and its dependencies. - -> NOTE: If you find anything wrong or outdated on this page, please open an issue in [this](https://github.com/spring-projects/spring-cloud) repo. + +> NOTE: If you find anything wrong or outdated on this page, please open an issue in +[this](https://github.com/spring-projects/spring-cloud) repo. {% endcapture %} diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/cloud/buildsystem/SpringCloudMavenBomParserAccessor.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/cloud/buildsystem/SpringCloudMavenBomParserAccessor.java new file mode 100644 index 00000000..606623fe --- /dev/null +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/cloud/buildsystem/SpringCloudMavenBomParserAccessor.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2019 the original author or authors. + * + * Licensed 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 + * + * https://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. + */ + +package org.springframework.cloud.release.cloud.buildsystem; + +import org.springframework.cloud.release.internal.buildsystem.CustomBomParser; + +public class SpringCloudMavenBomParserAccessor { + + public static CustomBomParser cloud() { + return new SpringCloudMavenBomParser(); + } + +} diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/cloud/docs/SpringCloudCustomProjectDocumentationUpdaterTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/cloud/docs/SpringCloudCustomProjectDocumentationUpdaterTests.java index a27155b8..34143644 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/cloud/docs/SpringCloudCustomProjectDocumentationUpdaterTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/cloud/docs/SpringCloudCustomProjectDocumentationUpdaterTests.java @@ -32,10 +32,12 @@ import org.junit.rules.TemporaryFolder; import org.mockito.BDDMockito; import org.springframework.cloud.release.internal.ReleaserProperties; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; import org.springframework.cloud.release.internal.buildsystem.TestUtils; -import org.springframework.cloud.release.internal.docs.ProjectDocumentationUpdater; +import org.springframework.cloud.release.internal.docs.DocumentationUpdater; import org.springframework.cloud.release.internal.git.ProjectGitHandler; +import org.springframework.cloud.release.internal.github.ProjectGitHubHandler; +import org.springframework.cloud.release.internal.project.ProjectVersion; +import org.springframework.cloud.release.internal.template.TemplateGenerator; import org.springframework.util.FileSystemUtils; import static org.assertj.core.api.BDDAssertions.then; @@ -54,6 +56,8 @@ public class SpringCloudCustomProjectDocumentationUpdaterTests { ProjectGitHandler handler; + ProjectGitHubHandler gitHubHandler; + File clonedDocProject; ReleaserProperties properties = new ReleaserProperties(); @@ -69,6 +73,7 @@ public class SpringCloudCustomProjectDocumentationUpdaterTests { file("/projects/spring-cloud-static/").toURI().toString()); this.handler = new ProjectGitHandler(this.properties); this.clonedDocProject = this.handler.cloneDocumentationProject(); + this.gitHubHandler = new ProjectGitHubHandler(this.properties); } @Test @@ -106,8 +111,9 @@ public class SpringCloudCustomProjectDocumentationUpdaterTests { }; BDDAssertions - .thenThrownBy(() -> new ProjectDocumentationUpdater(properties, - this.handler, Collections.singletonList(customUpdater)) + .thenThrownBy(() -> new DocumentationUpdater(this.handler, properties, + templateGenerator(properties), + Collections.singletonList(customUpdater)) .updateDocsRepo(releaseTrainVersion, "vAngel.SR33")) .isInstanceOf(IllegalStateException.class) .hasMessageContaining("The URL to the documentation repo not found"); @@ -126,10 +132,10 @@ public class SpringCloudCustomProjectDocumentationUpdaterTests { } @NotNull - private ProjectDocumentationUpdater projectDocumentationUpdater( + private DocumentationUpdater projectDocumentationUpdater( ReleaserProperties properties) { - return new ProjectDocumentationUpdater(properties, this.handler, - Collections.singletonList( + return new DocumentationUpdater(this.handler, properties, + templateGenerator(properties), Collections.singletonList( new SpringCloudCustomProjectDocumentationUpdater(this.handler) { @Override boolean isNewerOrEqualReleaseTrain(String storedReleaseTrain, @@ -142,10 +148,10 @@ public class SpringCloudCustomProjectDocumentationUpdaterTests { } @NotNull - private ProjectDocumentationUpdater projectDocumentationUpdaterWithNoIndexHtml( + private DocumentationUpdater projectDocumentationUpdaterWithNoIndexHtml( ReleaserProperties properties) { - return new ProjectDocumentationUpdater(properties, this.handler, - Collections.singletonList( + return new DocumentationUpdater(this.handler, properties, + templateGenerator(properties), Collections.singletonList( new SpringCloudCustomProjectDocumentationUpdater(this.handler) { @Override File indexHtml(File clonedDocumentationProject, @@ -155,6 +161,11 @@ public class SpringCloudCustomProjectDocumentationUpdaterTests { })); } + @NotNull + private TemplateGenerator templateGenerator(ReleaserProperties properties) { + return new TemplateGenerator(properties, this.gitHubHandler); + } + @NotNull private ProjectGitHandler projectGitHandler(ReleaserProperties properties) { return new ProjectGitHandler(properties); diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/PomUpdateAcceptanceTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/PomUpdateAcceptanceTests.java index 768a820e..54e9082b 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/PomUpdateAcceptanceTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/PomUpdateAcceptanceTests.java @@ -30,11 +30,11 @@ import org.junit.Test; import org.junit.rules.TemporaryFolder; import org.springframework.cloud.release.internal.buildsystem.MavenBomParserAccessor; -import org.springframework.cloud.release.internal.buildsystem.PomReader; import org.springframework.cloud.release.internal.buildsystem.ProjectPomUpdater; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; import org.springframework.cloud.release.internal.buildsystem.TestUtils; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; +import org.springframework.cloud.release.internal.tech.PomReader; import org.springframework.util.FileSystemUtils; import static org.assertj.core.api.BDDAssertions.then; diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/ReleaserTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/ReleaserTests.java index ee955ff3..7b87fc02 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/ReleaserTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/ReleaserTests.java @@ -33,12 +33,12 @@ import org.mockito.junit.MockitoJUnitRunner; import org.springframework.boot.test.rule.OutputCapture; import org.springframework.cloud.release.internal.buildsystem.GradleUpdater; import org.springframework.cloud.release.internal.buildsystem.ProjectPomUpdater; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; import org.springframework.cloud.release.internal.docs.DocumentationUpdater; import org.springframework.cloud.release.internal.git.ProjectGitHandler; import org.springframework.cloud.release.internal.github.ProjectGitHubHandler; import org.springframework.cloud.release.internal.postrelease.PostReleaseActions; import org.springframework.cloud.release.internal.project.ProjectCommandExecutor; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; import org.springframework.cloud.release.internal.sagan.SaganUpdater; import org.springframework.cloud.release.internal.template.TemplateGenerator; diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/MavenBomParserAccessor.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/MavenBomParserAccessor.java index dcd45b7a..dd8c8d96 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/MavenBomParserAccessor.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/MavenBomParserAccessor.java @@ -18,14 +18,14 @@ package org.springframework.cloud.release.internal.buildsystem; import java.util.Collections; -import org.springframework.cloud.release.cloud.buildsystem.SpringCloudMavenBomParser; +import org.springframework.cloud.release.cloud.buildsystem.SpringCloudMavenBomParserAccessor; import org.springframework.cloud.release.internal.ReleaserProperties; public class MavenBomParserAccessor { public static BomParser cloudMavenBomParser(ReleaserProperties properties) { return new MavenBomParser(properties, - Collections.singletonList(new SpringCloudMavenBomParser())); + Collections.singletonList(SpringCloudMavenBomParserAccessor.cloud())); } } diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/MavenBomParserTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/MavenBomParserTests.java index 502d9896..c5e8b37b 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/MavenBomParserTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/MavenBomParserTests.java @@ -24,6 +24,7 @@ import org.junit.Test; import org.springframework.cloud.release.internal.ReleaserProperties; import org.springframework.cloud.release.internal.git.GitRepoTests; +import org.springframework.cloud.release.internal.project.Project; import static org.assertj.core.api.BDDAssertions.then; import static org.assertj.core.api.BDDAssertions.thenThrownBy; diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/PomReaderTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/PomReaderTests.java index 3bfe6a33..1660972f 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/PomReaderTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/PomReaderTests.java @@ -27,6 +27,7 @@ import org.junit.Before; import org.junit.Test; import org.springframework.cloud.release.internal.git.GitRepoTests; +import org.springframework.cloud.release.internal.tech.PomReader; import static org.assertj.core.api.BDDAssertions.then; import static org.assertj.core.api.BDDAssertions.thenThrownBy; diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/PomUpdaterTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/PomUpdaterTests.java index a7190a00..8c641298 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/PomUpdaterTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/PomUpdaterTests.java @@ -33,6 +33,8 @@ import org.junit.rules.TemporaryFolder; import org.springframework.boot.test.rule.OutputCapture; import org.springframework.cloud.release.internal.ReleaserProperties; import org.springframework.cloud.release.internal.git.GitRepoTests; +import org.springframework.cloud.release.internal.project.Project; +import org.springframework.cloud.release.internal.tech.PomReader; import org.springframework.util.FileSystemUtils; /** diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/ProjectPomUpdaterTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/ProjectPomUpdaterTests.java index 9652dad5..e26839ab 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/ProjectPomUpdaterTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/ProjectPomUpdaterTests.java @@ -27,6 +27,7 @@ import org.mockito.BDDMockito; import org.springframework.cloud.release.internal.ReleaserProperties; import org.springframework.cloud.release.internal.git.ProjectGitHandler; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; /** diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/ProjectVersionTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/ProjectVersionTests.java index 9bf465f5..548e7ad5 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/ProjectVersionTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/ProjectVersionTests.java @@ -26,6 +26,7 @@ import org.junit.Before; import org.junit.Test; import org.springframework.cloud.release.internal.git.GitRepoTests; +import org.springframework.cloud.release.internal.project.ProjectVersion; import static org.assertj.core.api.BDDAssertions.then; import static org.assertj.core.api.BDDAssertions.thenThrownBy; diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/ProjectsTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/ProjectsTests.java index 389dbe66..47b44a5b 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/ProjectsTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/ProjectsTests.java @@ -25,6 +25,7 @@ import java.util.Set; import org.junit.Test; import org.springframework.cloud.release.internal.ReleaserProperties; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; import static org.assertj.core.api.BDDAssertions.then; diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/PropertyStorerTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/PropertyStorerTests.java index 1202752d..a47d4010 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/PropertyStorerTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/PropertyStorerTests.java @@ -25,6 +25,8 @@ import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; +import org.springframework.cloud.release.internal.project.Project; + import static org.mockito.BDDMockito.then; /** diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/PropertyVersionChangerTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/PropertyVersionChangerTests.java index 7ef94b42..36011c85 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/PropertyVersionChangerTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/PropertyVersionChangerTests.java @@ -28,6 +28,7 @@ import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import org.springframework.cloud.release.internal.ReleaserProperties; +import org.springframework.cloud.release.internal.project.Project; import static org.mockito.ArgumentMatchers.any; import static org.mockito.BDDMockito.then; diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/VersionsFromBomTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/VersionsFromBomTests.java index c2ef2ab2..5dd50a87 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/VersionsFromBomTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/buildsystem/VersionsFromBomTests.java @@ -23,8 +23,9 @@ import java.util.Set; import org.junit.Test; -import org.springframework.cloud.release.cloud.buildsystem.SpringCloudMavenBomParser; +import org.springframework.cloud.release.cloud.buildsystem.SpringCloudMavenBomParserAccessor; import org.springframework.cloud.release.internal.ReleaserProperties; +import org.springframework.cloud.release.internal.project.Project; import static org.assertj.core.api.BDDAssertions.then; @@ -41,7 +42,8 @@ public class VersionsFromBomTests { public void should_add_boot_to_versions_when_version_is_created() { VersionsFromBom versionsFromBom = new VersionsFromBomBuilder() .releaserProperties(new ReleaserProperties()) - .parsers(Collections.singletonList(new SpringCloudMavenBomParser())) + .parsers(Collections + .singletonList(SpringCloudMavenBomParserAccessor.cloud())) .retrieveFromBom(); versionsFromBom.setVersion("spring-boot", "1.2.3.RELEASE"); @@ -246,7 +248,8 @@ public class VersionsFromBomTests { private VersionsFromBom mixedVersions() { return new VersionsFromBomBuilder().releaserProperties(new ReleaserProperties()) - .parsers(Collections.singletonList(new SpringCloudMavenBomParser())) + .parsers(Collections + .singletonList(SpringCloudMavenBomParserAccessor.cloud())) .projects(mixedProjects()).merged(); } diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/docs/ReleaseTrainContentsGeneratorTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/docs/ReleaseTrainContentsGeneratorTests.java index 88dd34f4..dca05753 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/docs/ReleaseTrainContentsGeneratorTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/docs/ReleaseTrainContentsGeneratorTests.java @@ -23,7 +23,7 @@ import org.assertj.core.api.BDDAssertions; import org.junit.Test; import org.springframework.cloud.release.internal.ReleaserProperties; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; /** diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/docs/ReleaseTrainContentsUpdaterTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/docs/ReleaseTrainContentsUpdaterTests.java index c8c6ebc1..cc00da83 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/docs/ReleaseTrainContentsUpdaterTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/docs/ReleaseTrainContentsUpdaterTests.java @@ -29,11 +29,11 @@ import org.junit.Test; import org.junit.rules.TemporaryFolder; import org.springframework.cloud.release.internal.ReleaserProperties; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; import org.springframework.cloud.release.internal.buildsystem.TestUtils; import org.springframework.cloud.release.internal.git.GitTestUtils; import org.springframework.cloud.release.internal.git.ProjectGitHandler; import org.springframework.cloud.release.internal.github.ProjectGitHubHandler; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; import org.springframework.cloud.release.internal.template.TemplateGenerator; import org.springframework.util.FileSystemUtils; diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/docs/RowTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/docs/RowTests.java index 80de7df7..190b3369 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/docs/RowTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/docs/RowTests.java @@ -21,7 +21,7 @@ import java.util.List; import org.assertj.core.api.BDDAssertions; import org.junit.Test; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; /** diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/git/ProjectGitHandlerTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/git/ProjectGitHandlerTests.java index 0a79cd55..9c875fc6 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/git/ProjectGitHandlerTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/git/ProjectGitHandlerTests.java @@ -25,7 +25,7 @@ import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import org.springframework.cloud.release.internal.ReleaserProperties; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; +import org.springframework.cloud.release.internal.project.ProjectVersion; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/github/GithubIssuesTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/github/GithubIssuesTests.java index 2f779e25..f4eb4e79 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/github/GithubIssuesTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/github/GithubIssuesTests.java @@ -33,7 +33,7 @@ import org.mockito.BDDMockito; import org.springframework.boot.test.rule.OutputCapture; import org.springframework.cloud.release.internal.ReleaserProperties; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; import static org.assertj.core.api.BDDAssertions.then; diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/github/GithubMilestonesTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/github/GithubMilestonesTests.java index bffabfe5..d9afc0cf 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/github/GithubMilestonesTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/github/GithubMilestonesTests.java @@ -30,7 +30,7 @@ import org.junit.rules.TemporaryFolder; import org.springframework.boot.test.rule.OutputCapture; import org.springframework.cloud.release.internal.ReleaserProperties; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; +import org.springframework.cloud.release.internal.project.ProjectVersion; import static org.assertj.core.api.BDDAssertions.then; import static org.assertj.core.api.BDDAssertions.thenThrownBy; diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/gradle/GradleUpdaterTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/gradle/GradleUpdaterTests.java index 03108174..1efb5984 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/gradle/GradleUpdaterTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/gradle/GradleUpdaterTests.java @@ -30,7 +30,7 @@ import org.junit.rules.TemporaryFolder; import org.springframework.cloud.release.internal.ReleaserProperties; import org.springframework.cloud.release.internal.buildsystem.GradleUpdater; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; import org.springframework.util.FileSystemUtils; diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/postrelease/PostReleaseActionsTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/postrelease/PostReleaseActionsTests.java index b4875b5b..5441a3b4 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/postrelease/PostReleaseActionsTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/postrelease/PostReleaseActionsTests.java @@ -39,15 +39,15 @@ import org.mockito.BDDMockito; import org.springframework.cloud.release.internal.PomUpdateAcceptanceTests; import org.springframework.cloud.release.internal.ReleaserProperties; import org.springframework.cloud.release.internal.buildsystem.GradleUpdater; -import org.springframework.cloud.release.internal.buildsystem.PomReader; import org.springframework.cloud.release.internal.buildsystem.ProjectPomUpdater; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; import org.springframework.cloud.release.internal.buildsystem.TestUtils; import org.springframework.cloud.release.internal.git.GitTestUtils; import org.springframework.cloud.release.internal.git.ProjectGitHandler; import org.springframework.cloud.release.internal.project.ProcessedProject; import org.springframework.cloud.release.internal.project.ProjectCommandExecutor; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; +import org.springframework.cloud.release.internal.tech.PomReader; import org.springframework.cloud.release.internal.versions.VersionsFetcher; import org.springframework.util.FileSystemUtils; import org.springframework.util.LinkedMultiValueMap; diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/project/ProjectCommandExecutorTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/project/ProjectCommandExecutorTests.java index 4771e173..9c0fb29e 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/project/ProjectCommandExecutorTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/project/ProjectCommandExecutorTests.java @@ -32,7 +32,6 @@ import org.junit.rules.TemporaryFolder; import org.springframework.boot.test.rule.OutputCapture; import org.springframework.cloud.release.internal.PomUpdateAcceptanceTests; import org.springframework.cloud.release.internal.ReleaserProperties; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; import org.springframework.cloud.release.internal.buildsystem.TestUtils; import org.springframework.util.FileSystemUtils; diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/sagan/SaganUpdaterTest.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/sagan/SaganUpdaterTest.java index db7ea565..709cdc1f 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/sagan/SaganUpdaterTest.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/sagan/SaganUpdaterTest.java @@ -31,7 +31,7 @@ import org.mockito.BDDMockito; import org.mockito.Mockito; import org.springframework.cloud.release.internal.ReleaserProperties; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; +import org.springframework.cloud.release.internal.project.ProjectVersion; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.BDDMockito.given; diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/template/TemplateGeneratorTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/template/TemplateGeneratorTests.java index 2ae29a55..4f5993a8 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/template/TemplateGeneratorTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/template/TemplateGeneratorTests.java @@ -24,8 +24,8 @@ import java.util.HashSet; import org.junit.Test; import org.springframework.cloud.release.internal.ReleaserProperties; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; import org.springframework.cloud.release.internal.github.ProjectGitHubHandler; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; import static org.assertj.core.api.BDDAssertions.then; @@ -118,8 +118,8 @@ public class TemplateGeneratorTests { .contains("The release can be found in [Maven Central]") .contains("### Spring Cloud Sleuth") .contains( - "| Spring Cloud Sleuth | 1.0.0.RELEASE | ([issues](https://foo.bar.com))") - .contains("| Spring Cloud Foo\t| 1.0.2.RELEASE\t|  ") + "| Spring Cloud Sleuth | 1.0.0.RELEASE | ([issues](https://foo.bar.com))") + .contains("| Spring Cloud Foo | 1.0.2.RELEASE |  ") .contains("Dalston.RELEASE").contains( "mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Dalston.RELEASE'"); } @@ -143,7 +143,7 @@ public class TemplateGeneratorTests { .contains("The release can be found in [Maven Central]") .contains("### Spring Cloud Sleuth") .contains( - "| Spring Cloud Sleuth\t| 1.0.0.RELEASE\t| ([issues](https://foo.bar.com))") + "| Spring Cloud Sleuth | 1.0.0.RELEASE | ([issues](https://foo.bar.com))") .contains("Dalston.RELEASE").contains( "mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Dalston.RELEASE'"); } @@ -167,7 +167,7 @@ public class TemplateGeneratorTests { .contains("The release can be found in [Maven Central]") .contains("### Spring Cloud Sleuth") .contains( - "| Spring Cloud Sleuth | 1.0.0.RELEASE | ([issues](https://foo.bar.com))") + "| Spring Cloud Sleuth | 1.0.0.RELEASE | ([issues](https://foo.bar.com))") .contains("Dalston.SR1").contains( "mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Dalston.SR1'"); } @@ -191,7 +191,7 @@ public class TemplateGeneratorTests { .contains("The release can be found in [Maven Central]") .contains("### Spring Cloud Sleuth") .contains( - "| Spring Cloud Sleuth | 1.0.0.RELEASE | ([issues](https://foo.bar.com))") + "| Spring Cloud Sleuth | 1.0.0.RELEASE | ([issues](https://foo.bar.com))") .contains("Dalston.SR1").contains( "mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Dalston.SR1'"); } @@ -215,7 +215,7 @@ public class TemplateGeneratorTests { .contains("The release can be found in [Spring Milestone]") .contains("### Spring Cloud Sleuth") .contains( - "| Spring Cloud Sleuth\t| 1.0.0.M1\t| ([issues](https://foo.bar.com))") + "| Spring Cloud Sleuth | 1.0.0.M1 | ([issues](https://foo.bar.com))") .contains("spring-milestones") .contains("url 'https://repo.spring.io/milestone'") .contains("Dalston.M1").contains( @@ -241,7 +241,7 @@ public class TemplateGeneratorTests { .contains("The release can be found in [Spring Milestone]") .contains("### Spring Cloud Sleuth") .contains( - "| Spring Cloud Sleuth\t| 1.0.0.M1\t| ([issues](https://foo.bar.com))") + "| Spring Cloud Sleuth | 1.0.0.M1 | ([issues](https://foo.bar.com))") .contains("spring-milestones") .contains("url 'https://repo.spring.io/milestone'") .contains("Dalston.M1").contains( @@ -267,7 +267,7 @@ public class TemplateGeneratorTests { .contains("The release can be found in [Spring Milestone]") .contains("### Spring Cloud Sleuth") .contains( - "| Spring Cloud Sleuth\t| 1.0.0.RC1\t| ([issues](https://foo.bar.com))") + "| Spring Cloud Sleuth | 1.0.0.RC1 | ([issues](https://foo.bar.com))") .contains("spring-milestones") .contains("url 'https://repo.spring.io/milestone'") .contains("Dalston.RC1").contains( @@ -293,7 +293,7 @@ public class TemplateGeneratorTests { .contains("The release can be found in [Spring Milestone]") .contains("### Spring Cloud Sleuth") .contains( - "| Spring Cloud Sleuth\t| 1.0.0.RC1\t| ([issues](https://foo.bar.com))") + "| Spring Cloud Sleuth | 1.0.0.RC1 | ([issues](https://foo.bar.com))") .contains("spring-milestones") .contains("url 'https://repo.spring.io/milestone'") .contains("Dalston.RC1").contains( diff --git a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/versions/VersionsFromBomFetcherTests.java b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/versions/VersionsFromBomFetcherTests.java index 3a96ed76..beda2144 100644 --- a/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/versions/VersionsFromBomFetcherTests.java +++ b/spring-cloud-release-tools-core/src/test/java/org/springframework/cloud/release/internal/versions/VersionsFromBomFetcherTests.java @@ -31,8 +31,8 @@ import org.junit.jupiter.api.Test; import org.springframework.cloud.release.internal.ReleaserProperties; import org.springframework.cloud.release.internal.buildsystem.MavenBomParserAccessor; import org.springframework.cloud.release.internal.buildsystem.ProjectPomUpdater; -import org.springframework.cloud.release.internal.buildsystem.ProjectVersion; import org.springframework.cloud.release.internal.buildsystem.TestUtils; +import org.springframework.cloud.release.internal.project.ProjectVersion; import org.springframework.cloud.release.internal.project.Projects; import org.springframework.util.FileSystemUtils; diff --git a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/bootstrap/src/test/java/demo/BootstrapClientApplicationTests.java b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/bootstrap/src/test/java/demo/BootstrapClientApplicationTests.java index 2b2235bc..c297cbd6 100644 --- a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/bootstrap/src/test/java/demo/BootstrapClientApplicationTests.java +++ b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/bootstrap/src/test/java/demo/BootstrapClientApplicationTests.java @@ -38,7 +38,8 @@ public class BootstrapClientApplicationTests { public 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()); + assertThat("application") + .isEqualTo(this.server.getServlet().getApplicationDisplayName()); } } diff --git a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/config-client-decrypt/src/test/java/demo/BootstrapDecryptionClientApplicationTests.java b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/config-client-decrypt/src/test/java/demo/BootstrapDecryptionClientApplicationTests.java index c716cb03..c4c04465 100644 --- a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/config-client-decrypt/src/test/java/demo/BootstrapDecryptionClientApplicationTests.java +++ b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/config-client-decrypt/src/test/java/demo/BootstrapDecryptionClientApplicationTests.java @@ -26,8 +26,6 @@ import org.springframework.cloud.config.client.ConfigServicePropertySourceLocato import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.junit4.SpringRunner; -import static org.junit.Assert.assertNotNull; - @RunWith(SpringRunner.class) @SpringBootTest @DirtiesContext @@ -41,7 +39,8 @@ public class BootstrapDecryptionClientApplicationTests { @Test public void contextLoads() throws Exception { - assertThat(new String[] { "http://localhost:8888" }).isEqualTo(this.config.getUri()); + 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(); } diff --git a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/config-retry/src/test/java/demo/StandaloneClientApplicationTests.java b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/config-retry/src/test/java/demo/StandaloneClientApplicationTests.java index 140c6cba..01726a9c 100644 --- a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/config-retry/src/test/java/demo/StandaloneClientApplicationTests.java +++ b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/config-retry/src/test/java/demo/StandaloneClientApplicationTests.java @@ -52,6 +52,7 @@ import static org.junit.Assert.fail; public class StandaloneClientApplicationTests { private static ConfigurableApplicationContext context; + @Autowired private ConfigServicePropertySourceLocator locator; diff --git a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/commit-msg.sample b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/commit-msg.sample index b58d1184..bc8d07cb 100755 --- a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/commit-msg.sample +++ b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/commit-msg.sample @@ -18,7 +18,7 @@ # This example catches duplicate Signed-off-by lines. test "" = "$(grep '^Signed-off-by: ' "$1" | - sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { - echo >&2 Duplicate Signed-off-by lines. - exit 1 + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 } diff --git a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/pre-commit.sample b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/pre-commit.sample index 68d62d54..6c55be87 100755 --- a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/pre-commit.sample +++ b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/pre-commit.sample @@ -7,12 +7,11 @@ # # To enable this hook, rename this file to "pre-commit". -if git rev-parse --verify HEAD >/dev/null 2>&1 -then - against=HEAD +if git rev-parse --verify HEAD >/dev/null 2>&1; then + against=HEAD else - # Initial commit: diff against an empty tree object - against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 + # Initial commit: diff against an empty tree object + against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 fi # If you want to allow non-ASCII filenames set this variable to true. @@ -25,13 +24,12 @@ exec 1>&2 # them from being added to the repository. We exploit the fact that the # printable range starts at the space character and ends with tilde. if [ "$allownonascii" != "true" ] && - # Note that the use of brackets around a tr range is ok here, (it's - # even required, for portability to Solaris 10's /usr/bin/tr), since - # the square bracket bytes happen to fall in the designated range. - test $(git diff --cached --name-only --diff-filter=A -z $against | - LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 -then - cat <<\EOF + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test $(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0; then + cat <<\EOF Error: Attempt to add a non-ASCII file name. This can cause problems if you want to work with people on other platforms. @@ -42,7 +40,7 @@ If you know what you are doing you can disable this check using: git config hooks.allownonascii true EOF - exit 1 + exit 1 fi # If there are whitespace errors, print the offending file names and fail. diff --git a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/pre-push.sample b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/pre-push.sample index 6187dbf4..29d0a57a 100755 --- a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/pre-push.sample +++ b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/pre-push.sample @@ -24,30 +24,26 @@ url="$2" z40=0000000000000000000000000000000000000000 -while read local_ref local_sha remote_ref remote_sha -do - if [ "$local_sha" = $z40 ] - then - # Handle delete - : - else - if [ "$remote_sha" = $z40 ] - then - # New branch, examine all commits - range="$local_sha" - else - # Update to existing branch, examine new commits - range="$remote_sha..$local_sha" - fi +while read local_ref local_sha remote_ref remote_sha; do + if [ "$local_sha" = $z40 ]; then + # Handle delete + : + else + if [ "$remote_sha" = $z40 ]; then + # New branch, examine all commits + range="$local_sha" + else + # Update to existing branch, examine new commits + range="$remote_sha..$local_sha" + fi - # Check for WIP commit - commit=`git rev-list -n 1 --grep '^WIP' "$range"` - if [ -n "$commit" ] - then - echo >&2 "Found WIP commit in $local_ref, not pushing" - exit 1 - fi - fi + # Check for WIP commit + commit=$(git rev-list -n 1 --grep '^WIP' "$range") + if [ -n "$commit" ]; then + echo >&2 "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi done exit 0 diff --git a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/pre-rebase.sample b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/pre-rebase.sample index 6cbef5c3..e2532c61 100755 --- a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/pre-rebase.sample +++ b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/pre-rebase.sample @@ -17,20 +17,19 @@ publish=next basebranch="$1" -if test "$#" = 2 -then - topic="refs/heads/$2" +if test "$#" = 2; then + topic="refs/heads/$2" else - topic=`git symbolic-ref HEAD` || - exit 0 ;# we do not interrupt rebasing detached HEAD + topic=$(git symbolic-ref HEAD) || + exit 0 # we do not interrupt rebasing detached HEAD fi case "$topic" in -refs/heads/??/*) - ;; +refs/heads/??/*) ;; + *) - exit 0 ;# we do not interrupt others. - ;; + exit 0 # we do not interrupt others. + ;; esac # Now we are dealing with a topic branch being rebased @@ -38,34 +37,31 @@ esac # Does the topic really exist? git show-ref -q "$topic" || { - echo >&2 "No such branch $topic" - exit 1 + echo >&2 "No such branch $topic" + exit 1 } # Is topic fully merged to master? -not_in_master=`git rev-list --pretty=oneline ^master "$topic"` -if test -z "$not_in_master" -then - echo >&2 "$topic is fully merged to master; better remove it." - exit 1 ;# we could allow it, but there is no point. +not_in_master=$(git rev-list --pretty=oneline ^master "$topic") +if test -z "$not_in_master"; then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 # we could allow it, but there is no point. fi # Is topic ever merged to next? If so you should not be rebasing it. -only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` -only_next_2=`git rev-list ^master ${publish} | sort` -if test "$only_next_1" = "$only_next_2" -then - not_in_topic=`git rev-list "^$topic" master` - if test -z "$not_in_topic" - then - echo >&2 "$topic is already up to date with master" - exit 1 ;# we could allow it, but there is no point. - else - exit 0 - fi +only_next_1=$(git rev-list ^master "^$topic" ${publish} | sort) +only_next_2=$(git rev-list ^master ${publish} | sort) +if test "$only_next_1" = "$only_next_2"; then + not_in_topic=$(git rev-list "^$topic" master) + if test -z "$not_in_topic"; then + echo >&2 "$topic is already up to date with master" + exit 1 # we could allow it, but there is no point. + else + exit 0 + fi else - not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` - /usr/bin/perl -e ' + not_in_next=$(git rev-list --pretty=oneline ^${publish} "$topic") + /usr/bin/perl -e ' my $topic = $ARGV[0]; my $msg = "* $topic has commits already merged to public branch:\n"; my (%not_in_next) = map { @@ -85,7 +81,7 @@ else } } ' "$topic" "$not_in_next" "$not_in_master" - exit 1 + exit 1 fi <<\DOC_END diff --git a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/pre-receive.sample b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/pre-receive.sample index a1fd29ec..66107d96 100755 --- a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/pre-receive.sample +++ b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/pre-receive.sample @@ -6,19 +6,18 @@ # # To enable this hook, rename this file to "pre-receive". -if test -n "$GIT_PUSH_OPTION_COUNT" -then - i=0 - while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" - do - eval "value=\$GIT_PUSH_OPTION_$i" - case "$value" in - echoback=*) - echo "echo from the pre-receive-hook: ${value#*=}" >&2 - ;; - reject) - exit 1 - esac - i=$((i + 1)) - done +if test -n "$GIT_PUSH_OPTION_COUNT"; then + i=0 + while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"; do + eval "value=\$GIT_PUSH_OPTION_$i" + case "$value" in + echoback=*) + echo "echo from the pre-receive-hook: ${value#*=}" >&2 + ;; + reject) + exit 1 + ;; + esac + i=$((i + 1)) + done fi diff --git a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/update.sample b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/update.sample index 80ba9413..68a5e634 100755 --- a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/update.sample +++ b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/git/hooks/update.sample @@ -31,15 +31,15 @@ newrev="$3" # --- Safety check if [ -z "$GIT_DIR" ]; then - echo "Don't run this script from the command line." >&2 - echo " (if you want, you could supply GIT_DIR then run" >&2 - echo " $0 )" >&2 - exit 1 + echo "Don't run this script from the command line." >&2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 )" >&2 + exit 1 fi if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then - echo "usage: $0 " >&2 - exit 1 + echo "usage: $0 " >&2 + exit 1 fi # --- Config @@ -53,75 +53,74 @@ allowmodifytag=$(git config --bool hooks.allowmodifytag) projectdesc=$(sed -e '1q' "$GIT_DIR/description") case "$projectdesc" in "Unnamed repository"* | "") - echo "*** Project description file hasn't been set" >&2 - exit 1 - ;; + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; esac # --- Check types # if $newrev is 0000...0000, it's a commit to delete a ref. zero="0000000000000000000000000000000000000000" if [ "$newrev" = "$zero" ]; then - newrev_type=delete + newrev_type=delete else - newrev_type=$(git cat-file -t $newrev) + newrev_type=$(git cat-file -t $newrev) fi case "$refname","$newrev_type" in - refs/tags/*,commit) - # un-annotated tag - short_refname=${refname##refs/tags/} - if [ "$allowunannotated" != "true" ]; then - echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 - echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 - exit 1 - fi - ;; - refs/tags/*,delete) - # delete tag - if [ "$allowdeletetag" != "true" ]; then - echo "*** Deleting a tag is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/tags/*,tag) - # annotated tag - if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 - then - echo "*** Tag '$refname' already exists." >&2 - echo "*** Modifying a tag is not allowed in this repository." >&2 - exit 1 - fi - ;; - refs/heads/*,commit) - # branch - if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then - echo "*** Creating a branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/heads/*,delete) - # delete branch - if [ "$allowdeletebranch" != "true" ]; then - echo "*** Deleting a branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/remotes/*,commit) - # tracking branch - ;; - refs/remotes/*,delete) - # delete tracking branch - if [ "$allowdeletebranch" != "true" ]; then - echo "*** Deleting a tracking branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - *) - # Anything else (is there anything else?) - echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 - exit 1 - ;; +refs/tags/*,commit) + # un-annotated tag + short_refname=${refname##refs/tags/} + if [ "$allowunannotated" != "true" ]; then + echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; +refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; +refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname >/dev/null 2>&1; then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; +refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; +refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; +refs/remotes/*,commit) + # tracking branch + ;; +refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; +*) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; esac # --- Finished diff --git a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/mvnw b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/mvnw index d0275e2c..f79acbc0 100755 --- a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/mvnw +++ b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/mvnw @@ -34,151 +34,158 @@ # MAVEN_SKIP_RC - flag to disable loading of mavenrc files # ---------------------------------------------------------------------------- -if [ -z "$MAVEN_SKIP_RC" ] ; then +if [ -z "$MAVEN_SKIP_RC" ]; then - if [ -f /etc/mavenrc ] ; then + if [ -f /etc/mavenrc ]; then . /etc/mavenrc fi - if [ -f "$HOME/.mavenrc" ] ; then + if [ -f "$HOME/.mavenrc" ]; then . "$HOME/.mavenrc" fi fi # OS specific support. $var _must_ be set to either true or false. -cygwin=false; -darwin=false; +cygwin=false +darwin=false mingw=false -case "`uname`" in - CYGWIN*) cygwin=true ;; - MINGW*) mingw=true;; - Darwin*) darwin=true - # - # Look for the Apple JDKs first to preserve the existing behaviour, and then look - # for the new JDKs provided by Oracle. - # - if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then - # - # Apple JDKs - # - export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home - fi +case "$(uname)" in +CYGWIN*) cygwin=true ;; +MINGW*) mingw=true ;; +Darwin*) + darwin=true + # + # Look for the Apple JDKs first to preserve the existing behaviour, and then look + # for the new JDKs provided by Oracle. + # + if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ]; then + # + # Apple JDKs + # + export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home + fi - if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then - # - # Apple JDKs - # - export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home - fi + if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ]; then + # + # Apple JDKs + # + export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home + fi - if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then - # - # Oracle JDKs - # - export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home - fi + if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ]; then + # + # Oracle JDKs + # + export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home + fi - if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then - # - # Apple JDKs - # - export JAVA_HOME=`/usr/libexec/java_home` - fi - ;; + if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then + # + # Apple JDKs + # + export JAVA_HOME=$(/usr/libexec/java_home) + fi + ;; esac -if [ -z "$JAVA_HOME" ] ; then - if [ -r /etc/gentoo-release ] ; then - JAVA_HOME=`java-config --jre-home` +if [ -z "$JAVA_HOME" ]; then + if [ -r /etc/gentoo-release ]; then + JAVA_HOME=$(java-config --jre-home) fi fi -if [ -z "$M2_HOME" ] ; then +if [ -z "$M2_HOME" ]; then ## resolve links - $0 may be a link to maven's home PRG="$0" # need this for relative symlinks - while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then + while [ -h "$PRG" ]; do + ls=$(ls -ld "$PRG") + link=$(expr "$ls" : '.*-> \(.*\)$') + if expr "$link" : '/.*' >/dev/null; then PRG="$link" else - PRG="`dirname "$PRG"`/$link" + PRG="$(dirname "$PRG")/$link" fi done - saveddir=`pwd` + saveddir=$(pwd) - M2_HOME=`dirname "$PRG"`/.. + M2_HOME=$(dirname "$PRG")/.. # make it fully qualified - M2_HOME=`cd "$M2_HOME" && pwd` + M2_HOME=$(cd "$M2_HOME" && pwd) cd "$saveddir" # echo Using m2 at $M2_HOME fi # For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then +if $cygwin; then [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --unix "$M2_HOME"` + M2_HOME=$(cygpath --unix "$M2_HOME") [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + JAVA_HOME=$(cygpath --unix "$JAVA_HOME") [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --unix "$CLASSPATH"` + CLASSPATH=$(cygpath --path --unix "$CLASSPATH") fi # For Migwn, ensure paths are in UNIX format before anything is touched -if $mingw ; then +if $mingw; then [ -n "$M2_HOME" ] && - M2_HOME="`(cd "$M2_HOME"; pwd)`" + M2_HOME="$( ( + cd "$M2_HOME" + pwd + ))" [ -n "$JAVA_HOME" ] && - JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + JAVA_HOME="$( ( + cd "$JAVA_HOME" + pwd + ))" # TODO classpath? fi if [ -z "$JAVA_HOME" ]; then - javaExecutable="`which javac`" - if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + javaExecutable="$(which javac)" + if [ -n "$javaExecutable" ] && ! [ "$(expr \"$javaExecutable\" : '\([^ ]*\)')" = "no" ]; then # readlink(1) is not available as standard on Solaris 10. - readLink=`which readlink` - if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then - if $darwin ; then - javaHome="`dirname \"$javaExecutable\"`" - javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + readLink=$(which readlink) + if [ ! $(expr "$readLink" : '\([^ ]*\)') = "no" ]; then + if $darwin; then + javaHome="$(dirname \"$javaExecutable\")" + javaExecutable="$(cd \"$javaHome\" && pwd -P)/javac" else - javaExecutable="`readlink -f \"$javaExecutable\"`" + javaExecutable="$(readlink -f \"$javaExecutable\")" fi - javaHome="`dirname \"$javaExecutable\"`" - javaHome=`expr "$javaHome" : '\(.*\)/bin'` + javaHome="$(dirname \"$javaExecutable\")" + javaHome=$(expr "$javaHome" : '\(.*\)/bin') JAVA_HOME="$javaHome" export JAVA_HOME fi fi fi -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then +if [ -z "$JAVACMD" ]; then + if [ -n "$JAVA_HOME" ]; then + if [ -x "$JAVA_HOME/jre/sh/java" ]; then # IBM's JDK on AIX uses strange locations for the executables JAVACMD="$JAVA_HOME/jre/sh/java" else JAVACMD="$JAVA_HOME/bin/java" fi else - JAVACMD="`which java`" + JAVACMD="$(which java)" fi fi -if [ ! -x "$JAVACMD" ] ; then +if [ ! -x "$JAVACMD" ]; then echo "Error: JAVA_HOME is not defined correctly." >&2 echo " We cannot execute $JAVACMD" >&2 exit 1 fi -if [ -z "$JAVA_HOME" ] ; then +if [ -z "$JAVA_HOME" ]; then echo "Warning: JAVA_HOME environment variable is not set." fi @@ -187,11 +194,11 @@ CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher # For Cygwin, switch paths to Windows format before running java if $cygwin; then [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --path --windows "$M2_HOME"` + M2_HOME=$(cygpath --path --windows "$M2_HOME") [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME") [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + CLASSPATH=$(cygpath --path --windows "$CLASSPATH") fi # traverses directory structure from process work directory to filesystem root @@ -199,12 +206,15 @@ fi find_maven_basedir() { local basedir=$(pwd) local wdir=$(pwd) - while [ "$wdir" != '/' ] ; do - if [ -d "$wdir"/.mvn ] ; then + while [ "$wdir" != '/' ]; do + if [ -d "$wdir"/.mvn ]; then basedir=$wdir break fi - wdir=$(cd "$wdir/.."; pwd) + wdir=$( + cd "$wdir/.." + pwd + ) done echo "${basedir}" } @@ -212,7 +222,7 @@ find_maven_basedir() { # concatenates all lines of a file concat_lines() { if [ -f "$1" ]; then - echo "$(tr -s '\n' ' ' < "$1")" + echo "$(tr -s '\n' ' ' <"$1")" fi } @@ -227,15 +237,15 @@ export MAVEN_CMD_LINE_ARGS WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain echo "Running version check" -VERSION=$( sed '\!//' -e 's!.*$!!' ) +VERSION=$(sed '\!//' -e 's!.*$!!') echo "The found version is [${VERSION}]" if echo $VERSION | egrep -q 'M|RC'; then - echo Activating \"milestone\" profile for version=\"$VERSION\" - echo $MAVEN_ARGS | grep -q milestone || MAVEN_ARGS="$MAVEN_ARGS -Pmilestone" + echo Activating \"milestone\" profile for version=\"$VERSION\" + echo $MAVEN_ARGS | grep -q milestone || MAVEN_ARGS="$MAVEN_ARGS -Pmilestone" else - echo Deactivating \"milestone\" profile for version=\"$VERSION\" - echo $MAVEN_ARGS | grep -q milestone && MAVEN_ARGS=$(echo $MAVEN_ARGS | sed -e 's/-Pmilestone//') + echo Deactivating \"milestone\" profile for version=\"$VERSION\" + echo $MAVEN_ARGS | grep -q milestone && MAVEN_ARGS=$(echo $MAVEN_ARGS | sed -e 's/-Pmilestone//') fi exec "$JAVACMD" \ diff --git a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/oauth2-zuul/src/test/java/demo/ZuulApplicationTests.java b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/oauth2-zuul/src/test/java/demo/ZuulApplicationTests.java index 8074285c..5cc75497 100644 --- a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/oauth2-zuul/src/test/java/demo/ZuulApplicationTests.java +++ b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/oauth2-zuul/src/test/java/demo/ZuulApplicationTests.java @@ -36,6 +36,7 @@ public class ZuulApplicationTests { @Value("${local.server.port}") int port; + private TestRestTemplate restTemplate = new TestRestTemplate(); @Test diff --git a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/scripts/runTests.sh b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/scripts/runTests.sh index ca283221..cfd4a74b 100755 --- a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/scripts/runTests.sh +++ b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/scripts/runTests.sh @@ -6,7 +6,7 @@ REPO_URL="${REPO_URL:-https://github.com/spring-cloud-samples/tests.git}" REPO_BRANCH="${REPO_BRANCH:-master}" if [[ -d zuul-config-discovery ]]; then REPO_LOCAL="${REPO_LOCAL:-.}" -else +else REPO_LOCAL="${REPO_LOCAL:-tests}" fi WAIT_TIME="${WAIT_TIME:-5}" @@ -15,31 +15,31 @@ DEFAULT_VERSION="${DEFAULT_VERSION:-1.0.0.BUILD-SNAPSHOT}" # Parse the script arguments while getopts ":r" opt; do - case $opt in - r) - RESET=0 - ;; - \?) - echo "Invalid option: -$OPTARG" >&2 - exit 1 - ;; - :) - echo "Option -$OPTARG requires an argument." >&2 - exit 1 - ;; - esac + case $opt in + r) + RESET=0 + ;; + \?) + echo "Invalid option: -$OPTARG" >&2 + exit 1 + ;; + :) + echo "Option -$OPTARG requires an argument." >&2 + exit 1 + ;; + esac done # Clone or update the repository if [[ ! -e "${REPO_LOCAL}/.git" ]]; then - git clone "${REPO_URL}" "${REPO_LOCAL}" - cd "${REPO_LOCAL}" + git clone "${REPO_URL}" "${REPO_LOCAL}" + cd "${REPO_LOCAL}" else - cd "${REPO_LOCAL}" - if [[ $RESET ]]; then - git reset --hard - git pull "${REPO_URL}" "${REPO_BRANCH}" - fi + cd "${REPO_LOCAL}" + if [[ $RESET ]]; then + git reset --hard + git pull "${REPO_URL}" "${REPO_BRANCH}" + fi fi ./mvnw --fail-at-end clean package diff --git a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/test.sh b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/test.sh index 52450669..6c98ed33 100755 --- a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/test.sh +++ b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-core-tests/test.sh @@ -1 +1 @@ -touch generate.log \ No newline at end of file +touch generate.log diff --git a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-release/README.adoc b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-release/README.adoc index 1a3aca67..55acd58a 100644 --- a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-release/README.adoc +++ b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-release/README.adoc @@ -1,63 +1,55 @@ // Do not edit this file (e.g. go instead to src/main/asciidoc) -Spring Cloud Release Train is a curated set of dependencies across a -range of Spring Cloud projects. You consume it by using the -spring-cloud-dependencies POM to manage dependencies in Maven or -Gradle. The release trains have names, not versions, to avoid -confusion with the sub-projects. The names are an alphabetic sequence -(so you can sort them chronologically) with names of London Tube -stations ("Angel" is the first release, "Brixton" is the second). +Spring Cloud Release Train is a curated set of dependencies across a range of Spring Cloud projects. +You consume it by using the spring-cloud-dependencies POM to manage dependencies in Maven or Gradle. +The release trains have names, not versions, to avoid confusion with the sub-projects. +The names are an alphabetic sequence (so you can sort them chronologically) with names of London Tube stations ("Angel" is the first release, "Brixton" is the second). == Contributing -Spring Cloud is released under the non-restrictive Apache 2.0 license, -and follows a very standard Github development process, using Github -tracker for issues and merging pull requests into master. If you want -to contribute even something trivial please do not hesitate, but -follow the guidelines below. +Spring Cloud is released under the non-restrictive Apache 2.0 license, and follows a very standard Github development process, using Github tracker for issues and merging pull requests into master. +If you want to contribute even something trivial please do not hesitate, but follow the guidelines below. === Sign the Contributor License Agreement + Before we accept a non-trivial patch or pull request we will need you to sign the https://cla.pivotal.io/sign/spring[Contributor License Agreement]. -Signing the contributor's agreement does not grant anyone commit rights to the main -repository, but it does mean that we can accept your contributions, and you will get an -author credit if we do. Active contributors might be asked to join the core team, and -given the ability to merge pull requests. +Signing the contributor's agreement does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do. +Active contributors might be asked to join the core team, and given the ability to merge pull requests. === Code of Conduct + This project adheres to the Contributor Covenant https://github.com/spring-cloud/spring-cloud-build/blob/master/docs/src/main/asciidoc/code-of-conduct.adoc[code of -conduct]. By participating, you are expected to uphold this code. Please report -unacceptable behavior to spring-code-of-conduct@pivotal.io. +conduct]. +By participating, you are expected to uphold this code. +Please report unacceptable behavior to spring-code-of-conduct@pivotal.io. === Code Conventions and Housekeeping -None of these is essential for a pull request, but they will all help. They can also be -added after the original pull request but before a merge. -* Use the Spring Framework code format conventions. If you use Eclipse - you can import formatter settings using the +None of these is essential for a pull request, but they will all help. +They can also be added after the original pull request but before a merge. + +* Use the Spring Framework code format conventions. +If you use Eclipse you can import formatter settings using the `eclipse-code-formatter.xml` file from the https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-dependencies-parent/eclipse-code-formatter.xml[Spring - Cloud Build] project. If using IntelliJ, you can use the + Cloud Build] project. +If using IntelliJ, you can use the https://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter Plugin] to import the same file. * Make sure all new `.java` files to have a simple Javadoc class comment with at least an - `@author` tag identifying you, and preferably at least a paragraph on what the class is - for. -* Add the ASF license header comment to all new `.java` files (copy from existing files - in the project) -* Add yourself as an `@author` to the .java files that you modify substantially (more - than cosmetic changes). + `@author` tag identifying you, and preferably at least a paragraph on what the class is for. +* Add the ASF license header comment to all new `.java` files (copy from existing files in the project) +* Add yourself as an `@author` to the .java files that you modify substantially (more than cosmetic changes). * Add some Javadocs and, if you change the namespace, some XSD doc elements. * A few unit tests would help a lot as well -- someone has to do it. -* If no-one else is using your branch, please rebase it against the current master (or - other target branch in the main project). -* When writing a commit message please follow https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions], - if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit - message (where XXXX is the issue number). +* If no-one else is using your branch, please rebase it against the current master (or other target branch in the main project). +* When writing a commit message please follow https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions], if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit message (where XXXX is the issue number). == Building and Deploying -Since there is no code to compile in the starters they should do not need to compile, but a compiler has to be available because they are built and deployed as JAR artifacts. To install locally: +Since there is no code to compile in the starters they should do not need to compile, but a compiler has to be available because they are built and deployed as JAR artifacts. +To install locally: ---- diff --git a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-release/docs/src/main/asciidoc/README.adoc b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-release/docs/src/main/asciidoc/README.adoc index 454dda11..114be509 100644 --- a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-release/docs/src/main/asciidoc/README.adoc +++ b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-release/docs/src/main/asciidoc/README.adoc @@ -6,7 +6,8 @@ include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/maste == Building and Deploying -Since there is no code to compile in the starters they should do not need to compile, but a compiler has to be available because they are built and deployed as JAR artifacts. To install locally: +Since there is no code to compile in the starters they should do not need to compile, but a compiler has to be available because they are built and deployed as JAR artifacts. +To install locally: ---- diff --git a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-release/docs/src/main/asciidoc/intro.adoc b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-release/docs/src/main/asciidoc/intro.adoc index 5ae66a35..eb7c9f8d 100644 --- a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-release/docs/src/main/asciidoc/intro.adoc +++ b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-release/docs/src/main/asciidoc/intro.adoc @@ -1,7 +1,4 @@ -Spring Cloud Release Train is a curated set of dependencies across a -range of Spring Cloud projects. You consume it by using the -spring-cloud-dependencies POM to manage dependencies in Maven or -Gradle. The release trains have names, not versions, to avoid -confusion with the sub-projects. The names are an alphabetic sequence -(so you can sort them chronologically) with names of London Tube -stations ("Angel" is the first release, "Brixton" is the second). \ No newline at end of file +Spring Cloud Release Train is a curated set of dependencies across a range of Spring Cloud projects. +You consume it by using the spring-cloud-dependencies POM to manage dependencies in Maven or Gradle. +The release trains have names, not versions, to avoid confusion with the sub-projects. +The names are an alphabetic sequence (so you can sort them chronologically) with names of London Tube stations ("Angel" is the first release, "Brixton" is the second). \ No newline at end of file diff --git a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-release/docs/src/main/asciidoc/spring-cloud-starters.adoc b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-release/docs/src/main/asciidoc/spring-cloud-starters.adoc index 4d473a4a..2bebbf91 100644 --- a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-release/docs/src/main/asciidoc/spring-cloud-starters.adoc +++ b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-release/docs/src/main/asciidoc/spring-cloud-starters.adoc @@ -11,7 +11,8 @@ include::intro.adoc[] == Using Spring Cloud Dependencies with Spring IO Platform -The Spring IO Platform is a modular, enterprise-grade curated set of dependencies. To use the Spring Cloud Starters with Spring IO Platform, you must import the Spring Cloud Dependencies bill of materials (BOM) first. +The Spring IO Platform is a modular, enterprise-grade curated set of dependencies. +To use the Spring Cloud Starters with Spring IO Platform, you must import the Spring Cloud Dependencies bill of materials (BOM) first. To use version {springioplatformversion} of the Spring IO Platform and Spring Cloud Release Train {springcloudversion} with Maven, update the pom.xml as follows: diff --git a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-static/current/index.html b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-static/current/index.html index d499456d..0e3ecb98 100644 --- a/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-static/current/index.html +++ b/spring-cloud-release-tools-core/src/test/resources/projects/spring-cloud-static/current/index.html @@ -1,7 +1,7 @@ - +