This commit moves project-based assertions to regular AssertJ Assert
classes. `ProjectStructure` is now an assert provider so that it can
be used with the standard `assertThat` method.
Specialized assertions are provided for the supported build systems as
well as text-based content.
Closes gh-764
This commit extracts various test utilities to a dedicated
initializr-generator-test module for easier consumption. The previous
test-jar are no longer published and a dependency to this new module
should be equivalent.
This commit also cleans various resources that were located in the wrong
place. In particular initializr-generator does not know anything about
metadata anymore.
Closes gh-988
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
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
Given that Web UIs can be implemented in many different ways and that
the start.spring.io UI is about to change dramatically.
Since Web UIs can be rendered on the server, or on the client side (or a
mix of both), provivind a default UI or tools to build a generally
useful one is not easy.
This commit removes all the Web UI specific code and leaves the Web
endpoints for REST access and metadata access.
See gh-860
* Fix stylesheet for Safari
* Fix quick links not displayed on a single line on Safari browser
* Improve responsive layout for quick links bar
* Fix "Generate project" keyboard shortcut information
* Fix the "Generate button" keyboard shortcut action
This commit updates the design of the Web UI, with the following
changes:
* drop Twitter Bootstrap and the custom typeahead widget build
* use js-search, sass and a webpack build instead
* fully delegate version range management to the client application
* do not show the full list of dependencies anymore
This commit adds for now the packaged version of the application, but
this will change with gh-854 and the whole Web UI is likely to move to
start.spring.io proper.
This commit adds support for an `HelpDocument` that can be generated
alongside the project. Such document can hold an arbitrary number of
sections with pre-defined sections such as "Getting Started" and "Next
Steps".
A default contributor retrieves the links for requested dependencies
and add them to the document.
Closes gh-353
Co-authored-by: Madhura Bhave <mbhave@pivotal.io>
This commit checks if a request for any of the text capability is set
with only whitespaces and replaces it with the metadata default
counterpart.
Closes gh-769
This commit removes the magic string comparision to identify the build
system in use. Rather than just returning the `Path` to the project, a
`ProjectGenerationResult` is now returned that contains the description
of the generated project.
Closes gh-817