It works?
This commit is contained in:
@@ -60,6 +60,10 @@ public class SpringCloudMavenBomParser implements CustomBomParser {
|
||||
public VersionsFromBom parseBom(File root, ReleaserProperties properties) {
|
||||
VersionsFromBom springCloudBuild = springCloudBuild(root, properties);
|
||||
VersionsFromBom boot = bootVersion(root, properties);
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("Added Spring Cloud Build [{}] and boot versions [{}]",
|
||||
springCloudBuild, boot);
|
||||
}
|
||||
return new VersionsFromBomBuilder().thisProjectRoot(root)
|
||||
.releaserProperties(properties).projects(springCloudBuild, boot).merged();
|
||||
}
|
||||
|
||||
@@ -226,7 +226,8 @@ public class ProjectPomUpdater implements ReleaserPropertiesAware {
|
||||
&& !this.pomUpdater.hasSkipDeployment(model.model)) {
|
||||
log.debug(
|
||||
"Update is a non-snapshot one. Checking if no snapshot versions remained in the pom");
|
||||
Scanner scanner = new Scanner(asString(path));
|
||||
String text = asString(path);
|
||||
Scanner scanner = new Scanner(text);
|
||||
int lineNumber = 0;
|
||||
while (scanner.hasNextLine()) {
|
||||
String line = scanner.nextLine();
|
||||
@@ -238,6 +239,9 @@ public class ProjectPomUpdater implements ReleaserPropertiesAware {
|
||||
&& pattern.matcher(line).matches())
|
||||
.findFirst().orElse(null);
|
||||
if (matchingPattern != null) {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("File text \n" + text);
|
||||
}
|
||||
throw new IllegalStateException("The file [" + path
|
||||
+ "] matches the [ " + matchingPattern.pattern()
|
||||
+ "] pattern in line number [" + lineNumber + "]\n\n"
|
||||
|
||||
@@ -258,15 +258,14 @@ public class SpringReleaser {
|
||||
}
|
||||
else {
|
||||
ProjectVersion originalVersion = new ProjectVersion(project);
|
||||
String fixedVersionForProject = this.properties.getFixedVersions()
|
||||
.get(project.getName());
|
||||
Projects fixedVersions = this.releaser.fixedVersions();
|
||||
String fixedVersionForProject = fixedVersions
|
||||
.forName(project.getName()).version;
|
||||
versionFromBom = StringUtils.hasText(fixedVersionForProject)
|
||||
? new ProjectVersion(originalVersion.projectName,
|
||||
fixedVersionForProject)
|
||||
: new ProjectVersion(project);
|
||||
projectsToUpdate = this.properties.getFixedVersions().entrySet().stream()
|
||||
.map(entry -> new ProjectVersion(entry.getKey(), entry.getValue()))
|
||||
.collect(Collectors.toCollection(Projects::new));
|
||||
projectsToUpdate = fixedVersions;
|
||||
projectsToUpdate.add(versionFromBom);
|
||||
printSettingVersionFromFixedVersions(projectsToUpdate);
|
||||
}
|
||||
|
||||
@@ -39,8 +39,7 @@ class TestCustomProjectDocumentationUpdater
|
||||
|
||||
private final String version;
|
||||
|
||||
public TestCustomProjectDocumentationUpdater(ProjectGitHandler gitHandler,
|
||||
String version) {
|
||||
TestCustomProjectDocumentationUpdater(ProjectGitHandler gitHandler, String version) {
|
||||
super(gitHandler);
|
||||
this.version = version;
|
||||
}
|
||||
@@ -62,4 +61,4 @@ class TestCustomProjectDocumentationUpdater
|
||||
+ this.version + "/'>link to latest release</a>\n";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user