Commit Graph

358 Commits

Author SHA1 Message Date
Stephane Nicoll
e9e9be36ac Update changelog 2016-02-13 09:40:59 +01:00
Stephane Nicoll
4d2fbfe856 Publish stats on project generation
If an elastic instance is available, publish a document to a
configurable index every time a `ProjectRequest` is handled by the
service.

In practice, this means that every attempt to generate a project leads to
a new document in the index. The document gathers the settings of the
required project, including invalid ones if any. If an exception is
thrown, the message of the cause is made available.

CloudFlare is explicitely supported and the IP and country of the request
is added to the document. If that information is not available and the
request contains a `X-Forwarded-For` header, the value is also associated
with the document. If an IPv4 is detected, it is set in a separate
`requestIpv4` property.

If for some reason the document could not be indexed, we attempt to retry
a configurable amount of times.

Closes gh-185
2016-02-13 09:38:15 +01:00
Stephane Nicoll
7f6d348a3b Remove explicit binding to Redis
A redis instance is only required to export the metrics. Such feature is
not required for development and staging environment.
2016-02-10 13:49:02 +01:00
Stephane Nicoll
caaa13a629 Fix user agent version check
Make sure that any additional information is not associated to the
version.
2016-02-09 11:21:49 +01:00
Dave Syer
de256e9caf Remove non-existent (for now) Consul Bus 2016-02-08 08:33:58 +00:00
Stephane Nicoll
1b62b3193c Update changelog 2016-02-06 22:00:42 +01:00
Stephane Nicoll
ac97fda208 Add clientId metrics
Parse the `User-Agent` http request header to determine if the client is
known. If that is the case, increment the relevant `client_id` counter.

A `ProjectRequest` had now a generic `parameters` array with all the
request headers by default. Since we don't want to accidentally map any
of those from a form input, `BasicProjectRequest` contains only "public"
fields and is the type exposed at the controller level.

Closes gh-193
2016-02-04 11:00:05 +01:00
Stephane Nicoll
dc570704c4 Merge pull request #191 from sdeleuze/remove-idea-gradle-plugin
* pr/191:
  Remove the now deprecated IDEA Gradle plugin
2016-02-03 11:50:47 +01:00
Sebastien Deleuze
75c363cd40 Remove the now deprecated IDEA Gradle plugin
Closes gh-191
2016-02-03 11:48:02 +01:00
Stephane Nicoll
953b4e8dd4 Polish contribution
`1.3.2.RELEASE` is available now so there is no need to have a version
range on the snapshot.  We don't need to copy/paste the version of the
bom in the actual dependency (that's the whole business of the bom
definition (including versions mapping according to the Spring Boot
version).

We want the `cloud-bom` to be automatically added when the data flow bom
is required so it is referenced as "additional BOM" as well.

Closes gh-189
2016-02-03 10:25:07 +01:00
Josh Long
85c2cd76a3 Add Spring Cloud Data Flow starter 2016-02-03 10:25:07 +01:00
Stephane Nicoll
5faf874bac Support of additional BOM
BOMs are structured in such a way than adding one to the project may
require another one(s) to be added to the project.

This commit adds an `additionalBoms` property to `BillOfMaterials` that
can be used to refer the BOM(s) that should be automatically added if
said BOM is added to the project.

Closes gh-190
2016-02-03 10:25:07 +01:00
Stephane Nicoll
9eeb1df4ba Use spring-cloud-dependencies
Previously, Spring Initializr was refering to
`spring-cloud-starter-parent` as the BOM source for any cloud-related
dependencies.

This pom actually inherits from a specific version of Spring Boot and
brings all its dependency management. If the chosen boot version and the
one that the cloud bom brings do not match, inconsistent versions can
appear in the project.

The underlying issue was fixed by providing a new BOM that only provides
dependency management for the cloud-related bits.

Closes gh-116
2016-02-03 10:22:24 +01:00
Stephane Nicoll
1d42661e11 Merge pull request #187 from joshlong/sleuth-and-zipkin-stream
* pr/187:
  Polish contribution
  Add sleuth and zipkin stream dependencies
2016-02-02 15:14:18 +01:00
Stephane Nicoll
7522b933a7 Polish contribution
Closes gh-187
2016-02-02 15:12:46 +01:00
Josh Long
d3db322303 Add sleuth and zipkin stream dependencies
See gh-187
2016-02-02 15:12:46 +01:00
Stephane Nicoll
c520f85a1f Fix cloud version range 2016-02-02 15:12:32 +01:00
Stephane Nicoll
77e1a0dd4f Add code of conduct 2016-02-02 08:25:01 +01:00
Stephane Nicoll
fdc2430eb7 Update changelog 2016-02-01 15:05:48 +01:00
Stephane Nicoll
f165405b26 Fire event if a project could not be generated
Previously, only an invalid type or an invalid dependency would lead to
an exception and in such case, no event is fired at all.

This commit adds validation for language and packaging as well as a new
event that is fired when the project could not be generated.

The metrics infrastructure has been updated to handle ProjectFailedEvent;
when such an event is fired, the 'failures' counter is increased and we
still record all the other metrics.

Closes gh-188
2016-02-01 15:03:03 +01:00
Stephane Nicoll
3f1b4eca13 Fix test names 2016-02-01 11:29:22 +01:00
Stephane Nicoll
33f91b0c64 Fix test 2016-02-01 11:27:13 +01:00
Stephane Nicoll
b1352ca264 Add ProjectGeneratedEvent
Replace `ProjectGenerationListener` by an event that is thrown via the
regular `ApplicationEventPublisher`. This allows any arbitrary bean to
listen to the event without the need of implementing an interface.

Closes gh-184
2016-02-01 11:09:08 +01:00
Stephane Nicoll
b443a08370 Fix typo 2016-02-01 11:08:48 +01:00
Stephane Nicoll
62d394d226 Polish 2016-01-31 11:13:14 +01:00
Stephane Nicoll
8b3cfcacf8 Upgrade to Spring Boot 1.3.2.RELEASE 2016-01-29 10:09:42 +01:00
Stephane Nicoll
dc2ad26865 Upgrade dependency management for lombok
As of Spring Boot 1.4, lombok is managed and we should no longer provide
a version for it. This commit makes sure to remove the version as of
Spring Boot 1.4

Closes gh-182
2016-01-27 11:10:39 +01:00
Stephane Nicoll
ca057da48e Support for spring-boot-starter-data-redis
Spring Boot 1.4 has renamed the `spring-boot-starter-redis` to
`spring-boot-starter-redis`. This commit adds support for the former up
to 1.4 (exclusive) and the later as from 1.4

Closes gh-174
2016-01-27 10:44:45 +01:00
Stephane Nicoll
891650a836 Add support for Google Analytics
If the `initializr.env.google-analytics-tracking-code` is specified with
the tracking code to use, the web UI automatically integrates with Google
Analytics.

Closes gh-180
2016-01-14 18:09:16 +01:00
Stephane Nicoll
9139d10669 Re-apply GMavenPlus support
Closes gh-90
2016-01-14 13:47:43 +01:00
Stephane Nicoll
9ea01d9424 Polish 2016-01-12 14:54:22 +01:00
Stephane Nicoll
e720ac8e64 Update changelog 2016-01-12 14:42:49 +01:00
Stephane Nicoll
9766fc5d21 Merge pull request #178 from sdeleuze/issue-177
* pr/178:
  Polish contribution
  Fix pre-filled form inconsistencies
2016-01-12 14:31:56 +01:00
Stephane Nicoll
6997571099 Polish contribution
Closes gh-178
2016-01-12 14:25:08 +01:00
Sebastien Deleuze
f73fc154ec Fix pre-filled form inconsistencies
Closes gh-177
2016-01-12 14:21:13 +01:00
Stephane Nicoll
73f1b7e244 Merge pull request #173 from sdeleuze/prefill-form
* pr/173:
  Polish contribution
  Pre-fill form based on URL hashbang parameters
2016-01-11 22:28:10 +01:00
Stephane Nicoll
4ce9c412bb Polish contribution
Closes gh-173
2016-01-11 22:24:56 +01:00
Sebastien Deleuze
d1fb4ad2d6 Pre-fill form based on URL hashbang parameters
This commit makes it possible to customize and display automatically form
inputs with this kind of hashbang parameters:
https://start.spring.io/#!language=groovy&name=Groovy%20Sample

type, groupId, artifactId, name, description, packageName,
packaging, javaVersion and language parameters are supported.

Closes gh-107
2016-01-11 17:48:54 +01:00
Stephane Nicoll
072a14d5ef Add test-jar generation 2016-01-05 10:57:31 +00:00
Stephane Nicoll
b8f8a43323 Revert GMavenPlus migration
GMavenPlus is not properly supported on Eclipse so a Groovy-based
project using Maven now breaks in that IDE. Let's revert the support
until we find a better solution.
2015-12-31 15:15:35 +01:00
Stephane Nicoll
8783ce013a Upgrade to Spring Boot 1.3.1.RELEASE 2015-12-30 09:30:52 +01:00
Stephane Nicoll
dc137d8058 Clean package name if necessary
This commit validates that the user provided package name is valid.

Closes gh-114
2015-12-30 09:27:54 +01:00
Stephane Nicoll
96288888dc Harmonize indent
Spring Initializr mostly uses tabs but some files were inconsistently
using spaces. This commit harmonizes the templates so that any generated
project uses tabs consistently.
2015-12-29 16:12:47 +01:00
Stephane Nicoll
b60ae74daf Update changelog 2015-12-29 15:59:58 +01:00
Stephane Nicoll
05565dee3f Upgrade to GMavenPlus
A groovy-based project using Maven now builds with GMavenPlus as the
Groovy Eclipse maven compiler does not seem to be maintained anymore.

This commit also harmonizes the location of the code to be
`src/main/groovy` for both Gradle and Maven builds.

Joint compilation is enabled by default so that you can create pure Java
code in `src/main/java` and refer to any class within the project.

Users of IntelliJ IDEA may want to install a plugin that automatically
adds `src/main/groovy` to the sources when the GMavenPlus plugin is
added to the pom, see https://plugins.jetbrains.com/plugin/7442

Closes gh-90
2015-12-29 15:55:41 +01:00
Stephane Nicoll
cc85d3f003 Migrate build to gmavenplus
See gh-90
2015-12-29 15:26:24 +01:00
Stephane Nicoll
cb10cea654 Fix MetricsExportTests 2015-12-26 13:27:26 +01:00
Stephane Nicoll
245fe8f07e Temporarily remove provided scope for Lombok
Spring Initializr does not support the provided scope properly with
Gradle as it relies on the `providedRuntime` configuration added by the
war plugin.

Lombok should be added with an optional flag anyway so until the
service properly supports it, lombok is defined again with the default
(compile) scope.

Closes gh-171
2015-12-26 09:46:19 +01:00
Dave Syer
8c6cc47b67 Bump Spring Cloud to Brixton.M4 2015-12-23 11:46:59 +00:00
Stephane Nicoll
8fa0e0103d Restore Java 7 compatibility 2015-12-15 11:21:34 +01:00