This commit introduces a new module, initializer-version-resolver,
that provides support for resolving versions from the dependency
management of a Maven bom. Providing with the bom's coordinates
(groupId, artifactId, and version) a map of groupId:artifactId to
version, derived from the bom's <dependencyManagement>, is returned.
Closes gh-934
Maven allows alphanumeric characters and `.`, `_`
and `-` for group id and artifact id. This commit cleans
the artifact id and group id if invalid characters are
found. For artifact id, the invalid characters are replaced
with a hyphen and for group id a dot is used. In cases where
the base directory matches the artifact id, the base directory
is also cleaned.
See gh-924
The main metadata endpoint is available at the root "/" path, for JSON
compatible media types. This endpoint is often requested by CLI and
IDEs. Initializr is setting HTTP response headers to tell clients to
cache the response body.
With this current situation, several HTTP caching issues can happen.
1. Since many formats are available at the same path, proxies can cache
the response body and redistribute it to many clients, even if they
don't request the same media type. To fix that, we need to add a
`Vary: Accept` response header; with that, proxies will cache responses
but take into account that different Accept request headers might yield
different responses.
2. Browsers have very specific caching implementations, and exposing
that metadata endpoint on "/" and at the same time an HTML page will
create issues related to HTTP caching. Navigation and refreshes might
result with strange problems. To fix that, we need to reinstate the
`/metadata/client` endpoint as a first class citizen (and not just a
redirect). This way, Web UIs can freely use that path to request the
metadata, without risking caching issues.
See gh-914
This commit provides a better test infrastructure when JUnit 5 is
available:
* The default test class uses JUnit Jupiter API
* The vintage engine that the Spring Boot starter provides is excluded
so that only the Junit Jupiter API is available on the classpath
Closes gh-905
In particular, this commit replaces the GradleKts dedicated build system
in favor of a dedicated build system dialect.
Closes gh-851
Co-authored-by: Andy Wilkinson <awilkinson@pivotal.io>