Spring Boot 1.3 snapshots had changed the id of the Gradle plugin from
spring-boot to org.springframework.boot.spring-boot. This change has
since been reverted.
This commit updates the Initializr to revert back to using the old id,
spring-boot. Some custom Spring Boot 1.3 logic remains: the dependency
management plugin is not applied to a Boot 1.3 project as Spring Boot
1.3 applies it automatically.
BOM id and version range can now be shared at the group level. If no
specific attribute is set, the defaults from the group are inherited.
Closes gh-105
Add explicit support for Bill Of Materials. When a dependency defines a
bom ID, the related bom is added to the project. The metadata are
validated on startup to make sure a dependency does not refer to an
unknown bom entry.
Closes gh-99
Add support for the dependency management plugin for Gradle so that BOMs
can be added to the project if needed.
Also, the Gradle plugin as from Spring Boot 1.3 has changed and this
commit brings a transparent support for it.
Closes gh-98
InitializrMetadataBuilder can now merge a number of resources into a
single meta-data instance. A new `/metadata/service` endpoint is now
available and exposes the service meta-data of the current instance.
Combining those two, it is now possible to bootstrap an instance without
a single line of configuration; instead, the meta-data are built from the
content of a json document describing the service meta-data. This
document can be fetched remotely (via the new endpoint) or loaded from
a local file.
Each capability, including the InitializrConfiguration has now a `merge`
method with a "last wins" strategy. For collections, only unknown
elements are added.
Closes gh-88
Provide a more flexible meta-data contract and clearly separate the
service configuration from the options used to generate a project.
The meta-data now defines a fixed set of core service capabilities. Each
capability has an id, a type, a description and a 'content'. The
following capability types are supported:
* text: single value
* single-select: a list of values, one value should be chosen
* hierarchical-multi-select: values of values, many values can be chosen
* action: a specific single-select that defines the action to invoke
An extension can now build its own meta-data instance more easily.
Closes gh-87
Add an extra group with the databases that Boot supports out-of-the-box.
This is a first step of a better user experience when someone selects
the `data-jpa` or `jdbc` starter as it requires a Database to operate and
none is provided by default.
Closes gh-84
Add an extra 'scope' attribute to any dependency (defaults to 'compile').
Update maven and gradle build templates to support compile, runtime,
provided and test dependencies. Also, dependencies are now sorted
according to their ids.
Closes gh-83
Previously, specifying a baseDir with a value holding a sub-directory
would fail as only the first directory got created. This commit allows
baseDir to hold a sub-directory as well (e.g. something like 'foo/bar').
Fixes gh-81
Previously, if a user choose 'SpringBoot' or 'Spring' as the name of the
project, the service will generate a `SpringBootApplication` or
`SpringApplication` respectively. Both of which leads to a compilation
failure since those names are already used in the current context.
The generation of the application name based on the project's name have
been moved to InitializrMetadata and two new properties have been
introduced:
* env.fallbackApplicationName defines the name of the application if the
one that was generated was invalid for some reasons
* env.invalidApplicationNames defines a list of application names that
should flagged as invalid. When the current candidate is equal to one of
them, the fallback should be used instead
These properties have default values that prevent such issue to happen
by default.
Fixes gh-79
Command line tools are invited to discover the HAL-compliant links
defined in the meta-data while Spring Boot CLI is a working client
application and requires a description of the capabilities in a more
high-level format.
Capabilities are now customized for those use cases.
Closes gh-77
Provide a polished version of the command-line service capabilities
with tables and support for the new version range.
Also support SpringBootCli explicitly so that the service capabilities
are rendered directly by the server instead of having the client parsing
the meta-data manually.
Closes gh-76
Previously, it was not possible to define the Spring Boot version that
a dependency requires. As a result, many new starters implemented as part
of Spring Boot 1.2 are not available.
Each dependency can now define a `versionRange` attribute that defines
the Spring Boot version range that it supports. The range is defined
either as a single version, in which case it defines that version and
any later versions or using brackets. A square bracket (`[` or `]`)
denotes an inclusive range while a round bracket (`(` or `)`) denotes an
exclusive range.
Bumped the current-metadata format to 2.1 to include this additional
`versionRange` attribute, that is
application/vnd.initializr.v2.1+json
Existing clients requesting v2 will not get any dependency that defines
a `versionRange` attribute.
Closes gh-62
This commit introduces zepto.js as a minimal front-end library to
manipulate the DOM and a lightweight library `Versions` to parse and
compare version ranges (OSGI style).
With this change, only Boot starter dependencies that are compatible
with the selected Boot version should be displayed in the UI.
Partial fix for #62
Since Htmlunit does not provide a complete support for Javascript, smoke
tests are migrated to Gab (i.e. using Selenium and an actual browser).
This present a major challenge: it is not easy to assert the content of
a file that the browser downloads when it submits a form. First, the
browser should be configured to download the file directly instead of
opening a (native) pop-up asking the users where to download it. Then,
the tests should be aware of the location of the file in order to assert
it.
Hopefully, Firefox can be configured to achieve this goal.
Closes gh-75
A groovy-based project on Maven provides a better developer experience
if the sources are located in src/main/java and src/test/java.
This commit updates the generator to use this new location while keeping
the existing src/main/groovy project for Gradle builds.
Fixes gh-71
Remove `type` as a template variable since each action actually defines
the related type. This commit however does not address all the concerns
raised in gh-69; since the configuration is generic, there is no way to
know that a particular action handles one and only one type so removing
the type because it is redundant is not really possible.
Besides, the zip and tgz endpoints aren't exposed via configuration
either so offering such choice via the HAL-urls is not possible either.
Partially fixes gh-69
This commit improves the page layout:
* use lighter fonts for the curl command line
* align download buttons
* dependency choices are now using "col-xs-*" classes for mobile devices