Instead of checking that the timestamp was between 2 seconds ago and now,
we can get the actual timestamp from the event and assert on that.
Closes gh-954
Previously, hasExecutableFile only checked if the
file exists and not if it was executable. This commit
ensures that the file exists and is executable using
ExecTask as Unzip and Untar do not preserve file permissions.
See gh-937
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