Add support for SemVer and CalVer versions

This commit improves the version parser to handle qualifiers that are
separated by either a `.` or a `-`. This makes the parsing of
`1.2.0-RC1` or `2020.0.0-M1` possible.

Closes gh-1083
This commit is contained in:
Stephane Nicoll
2020-05-26 11:25:32 +02:00
parent 9255ae9fbe
commit 0b7614c4f0
5 changed files with 107 additions and 71 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 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.
@@ -44,7 +44,7 @@ class SpringBootVersionRepositoriesBuildCustomizer implements BuildCustomizer<Bu
@Override
public void customize(Build build) {
build.repositories().add("maven-central");
String qualifier = this.springBootVersion.getQualifier().getQualifier();
String qualifier = this.springBootVersion.getQualifier().getId();
if (!"RELEASE".equals(qualifier)) {
addMilestoneRepository(build);
if ("BUILD-SNAPSHOT".equals(qualifier)) {