start.spring.io exposes an annotation processor (Lombok) that's quite
popular but is exposed as a compile/transitive dependency. This commit
introduces a `compileOnly` scope that maps to Gradle's `compileOnly`
scope and Maven's `optional` flag.
There is a case to support optional dependencies in general but
unfortunately, Gradle doesn't have support for such feature.
Closes gh-128
This commit improves the generator so that a `.gitignore` is added to
every project. The basic content of that file is determined by the build
system. If an agent is recognized, specific build tool settings are
added as well. This commit adds support for STS, IntelliJ IDEA and
NetBeans.
Closes gh-131
This commit improves massively class loading performance by caching all
templates used by the generator. GroovyTemplate is now a bean rather than
a private utility.
Templates are cached by default and the cache is disabled automatically
if Devtools is in use (via a check of spring.groovy.template.cache).
Closes gh-288
This commit upgrades to Spring Boot 1.4.0.RELEASE and bumps to Java8. It
also migrate the cache library from Guava to Caffeeine.
The git and build information are now exposed via the `info` endpoint.
Closes gh-251
Previously, if the sagan meta-data did not provide a default, the live
instance wouldn't have one either. This means that all requests that
do not provide an explicit boot version will fail as well.
This commit sets the first version as the default if no default exists.
Closes gh-267
This commit introduces `ProjectRequestPostProcessor` as a mean to modify
an incoming `ProjectRequest` before and after its resolution against the
meta-data.
By default, all beans of that type are invoked automatically and they
are ordered against their `@Order` or `Ordered` settings.
Closes gh-260
This commit allows to specify a property for the version of a BOM. If
that value is defined, a version property is automatically added to the
build to allow to easily configure the value.
Closes gh-181
This commit introduces a `buildProperties` property on the request that
can be used to specify Gradle/Maven build-specific properties as well as
an arbitrary number of version overrides.
Instead of hard-coding some properties in the templates, these defaults
are now inherited from the request itself.
Closes gh-259
Previously, if one invokes the service asking for dependency `foo` and
`foo` does not exist we created a starter for it, that is
`spring-boot-starter-foo`. This mechanism was put in place because we
don't know all starters and to offer a nice fallback for users who know
what they're doing.
That statement proved to be wrong since users actually discover new
starters via the service and don't seem to attempt to create such starter
that are located in the `org.springframework.boot` groupId anyway. Most
if not all of those are pilot errors.
This commit enables strict validation of dependencies and generate an
appropriate exception if it isn't defined in the meta-data.
Closes gh-234
This commit switches SingleSelectCapability content to
CopyOnWriteArrayList to prevent ArrayIndexOutOfBoundsException in case
of concurrent updates of boot versions.
Note that there is way to mitigate that in 1.4 with the use of the `sync`
attribute, see gh-251
Closes gh-229
As of Spring Boot 1.4.0.M3, `SpringBootServletInitializer` has been
relocated to the `org.springframework.boot.web.support` package. This
commit makes sure to use the new location if a project is generated for
Spring Boot `1.4.0.M3` or higher.
Closes gh-243
This commit improves the dependency mapping infrastructure to include the
groupId and artifactId attributes alongside the existing version. For
consistency, the attribute has been renamed from `versions` to
`mappings`.
This allows to better support the `redis` use case: the starter was
renamed from `spring-boot-starter-redis` to
`spring-boot-starter-data-redis` and previously we had two entries
excluding each other using version ranges.
Closes gh-219
Spring Boot `1.4.0.M2` brings a new test infrastructure with nice
defaults and deprecates `SpringBootConfiguration` in the process.
This commits automatically upgrades generated project to this new
infrastructure if Spring Boot `1.4.0.M2` or later is available.
Closes gh-215
This commit splits the feature of Spring Initializr in several modules:
* `initializr-generator` is a standalone library that is responsible for
generating projects based on a `File` directory. It has a minimal set of
dependencies and is not web-related
* `initializr-web` provides the web integration (project generation,
meta-data, etc)
* `initializr-actuator` is an optional module that can be added to
support project-generation-specific statistics
Closes gh-214