Commit Graph

9 Commits

Author SHA1 Message Date
Stephane Nicoll
95441ef19c Redirect Spring cli distribution bundle
This commit adds the '/spring' endpoint that is used to download the
Spring CLI distribution bundle. Instead of relying on the presence of
a local 'spring.zip' file uploaded as part of the application, a
redirect to a configurable repository is used.

It is possible to download both the zip and the tar.gz distribution
by specifying the extension in the url (i.e. /spring.tar.gz provides
the tar.gz distribution.

Fixes gh-31
2014-08-19 16:41:24 +02:00
Stephane Nicoll
766a5fef89 Add json validation tests
This commit adds JSON structure validation tests to ensure that the
output is backward compatible with older versions if we enhance it
in the future.

Partly fixes gh-21
2014-08-19 13:50:41 +02:00
Stephane Nicoll
ccbfde3b5e Add support for dependency facet
This commit allows any dependency to be tagged with a facet. A facet
is a simple name that can be used to further tune the project request
if necessary.

Prior to this commit, the list of dependencies that were related to the
web was hardcoded. This was used for special handling such as adding
a dependency automatically if necessary of creating additional
resources in the project.

This logic was moved to a standard 'web' facet that any dependency
can declare through configuration.

Fixes gh-30
2014-08-19 13:28:27 +02:00
Stephane Nicoll
b5845ab3c4 Add dependency alias support
This commit allows to specify an arbitrary number of aliases for a
dependency. A project can be generated using that dependency either
referring to its main id or any of its registered aliases.

Fixes gh-29
2014-08-19 11:56:36 +02:00
Stephane Nicoll
3849a7b5b9 Add support for custom dependency
Prior to this commit, only spring boot starters can be added as project
dependency using a simple String denoting the suffix of the artifactId.
The standard 'org.springframework.boot' and 'spring-boot-starter-'
artifactId prefix were assumed.

This commit allows to define arbitrary dependencies with arbitrary
identifiers; the groupId, artifactId and version of the dependency can
be specified. Internally, all dependencies are converted to that format
even the ones defined as standard spring boot starters.

To allow that, a ProjectRequest is now resolved against the initializr
metadata. If a request defines an unknown dependency, a simple String
will be still considered a spring-boot-starter but a more complex
unknown id will lead to an exception (e.g. 'org.foo:bar').

Fixes gh-17
2014-08-19 04:07:47 +02:00
Stephane Nicoll
964aef8bdb polishing 2014-08-19 02:56:49 +02:00
Stephane Nicoll
c22e357ee9 Add more configurable defaults
This commit introduces a set of customizable defaults for the generated
project, that is: groupId, artifactId, version, name, description and
packageName.

This complement the existing configurable defaults that are already
provided for action type, build type, language, java version and spring
boot version.

Fixes gh-19
2014-08-19 02:50:58 +02:00
Stephane Nicoll
a748819900 Fix indent 2014-08-19 02:15:27 +02:00
Stephane Nicoll
1ea33488f6 Initializr library
This commit splits the single file script in a library that can be
released and published to the central repository.

This allows anyone to start its own initializr instance with a
proper configuration file and the following simple script:

package app

@Grab('io.spring.initalizr:initializr:1.0.0.BUILD-SNAPSHOT')
class InitializerService { }

The integration tests have been migrated so that they run as
part of the build. Additional tests have been added to extract
the content of the generated archive and assert the directory
structure as well as the content of key files.

Fixes gh-20
2014-08-18 17:50:21 +02:00