mirror of
https://gitee.com/dcren/initializr.git
synced 2025-09-19 18:22:26 +08:00
Support for dependency description
This commit updates the configuration format and JSON metadata output to support an additional description attribute. The description attribute is meant to further describe the purpose of the dependency. This is a minor update to the JSON format that is fully backward compatible. Fixes gh-40
This commit is contained in:
@@ -12,82 +12,109 @@ initializr:
|
||||
content:
|
||||
- name: Security
|
||||
id: security
|
||||
description: Support for spring-security
|
||||
- name: AOP
|
||||
id: aop
|
||||
description: Support for aspect-oriented programming including spring-aop and AspectJ
|
||||
- name: Data
|
||||
content:
|
||||
- name: JDBC
|
||||
id: jdbc
|
||||
description: Support for JDBC databases
|
||||
- name: JPA
|
||||
id: data-jpa
|
||||
description: Support for the Java Persistence API including spring-data-jpa, spring-orm and Hibernate
|
||||
aliases:
|
||||
- jpa
|
||||
- name: MongoDB
|
||||
id: data-mongodb
|
||||
description: Support for the MongoDB NoSQL Database, including spring-data-mongodb
|
||||
- name: Redis
|
||||
id: redis
|
||||
description: Support for the REDIS key-value data store, including spring-redis
|
||||
- name: Gemfire
|
||||
id: data-gemfire
|
||||
description: Support for the GemFire distributed data store including spring-data-gemfire
|
||||
- name: Solr
|
||||
id: data-solr
|
||||
description: Support for the Apache Solr search platform, including spring-data-solr
|
||||
- name: Elasticsearch
|
||||
id: data-elasticsearch
|
||||
description: Support for the Elasticsearch search and analytics engine including spring-data-elasticsearch
|
||||
- name: I/O
|
||||
content:
|
||||
- name: Batch
|
||||
id: batch
|
||||
description: Support for Spring Batch including HSQLDB database
|
||||
- name: Integration
|
||||
id: integration
|
||||
description: Support for common spring-integration modules
|
||||
- name: JMS
|
||||
id: hornetq
|
||||
description: Support for Java Message Service API via HornetQ
|
||||
- name: AMQP
|
||||
id: amqp
|
||||
description: Support for the Advanced Message Queuing Protocol via spring-rabbit
|
||||
- name: Web
|
||||
content:
|
||||
- name: Web
|
||||
id: web
|
||||
description: Support for full-stack web development, including Tomcat and spring-webmvc
|
||||
facets:
|
||||
- web
|
||||
- name: Websocket
|
||||
id: websocket
|
||||
description: Support for websocket development with Tomcat
|
||||
- name: WS
|
||||
id: ws
|
||||
description: Support for Spring Web Services
|
||||
- name: Rest Repositories
|
||||
id: data-rest
|
||||
description: Support for exposing Spring Data repositories over REST via spring-data-rest-webmvc
|
||||
- name: Mobile
|
||||
id: mobile
|
||||
description: Support for spring-mobile
|
||||
- name: Template Engines
|
||||
content:
|
||||
- name: Freemarker
|
||||
id: freemarker
|
||||
description: Support for the FreeMarker templating engine
|
||||
facets:
|
||||
- web
|
||||
- name: Velocity
|
||||
id: velocity
|
||||
description: Support for the Velocity templating engine
|
||||
facets:
|
||||
- web
|
||||
- name: Groovy Templates
|
||||
id: groovy-templates
|
||||
description: Support for the Groovy templating engine
|
||||
facets:
|
||||
- web
|
||||
- name: Thymeleaf
|
||||
id: thymeleaf
|
||||
description: Support for the Thymeleaf templating engine, including integration with Spring
|
||||
facets:
|
||||
- web
|
||||
- name: Social
|
||||
content:
|
||||
- name: Facebook
|
||||
id: social-facebook
|
||||
description: Support for spring-social-facebook
|
||||
- name: LinkedIn
|
||||
id: social-linkedin
|
||||
description: Support for spring-social-linkedin
|
||||
- name: Twitter
|
||||
id: social-twitter
|
||||
description: Support for spring-social-twitter
|
||||
- name: Ops
|
||||
content:
|
||||
- name: Actuator
|
||||
id: actuator
|
||||
description: Production ready features to help you monitor and manage your application
|
||||
- name: Remote Shell
|
||||
id: remote-shell
|
||||
description: Support for CRaSH
|
||||
types:
|
||||
- name: Maven POM
|
||||
id: maven-build
|
||||
|
@@ -206,6 +206,8 @@ class InitializrMetadata {
|
||||
@JsonIgnore
|
||||
String version
|
||||
|
||||
String description
|
||||
|
||||
/**
|
||||
* Specify if the dependency has its coordinates set, i.e. {@code groupId}
|
||||
* and {@code artifactId}.
|
||||
|
@@ -103,14 +103,14 @@ class MainControllerIntegrationTests extends AbstractInitializrControllerIntegra
|
||||
@Test // Test that the current output is exactly what we expect
|
||||
void validateCurrentProjectMetadata() {
|
||||
def json = restTemplate.getForObject(createUrl('/'), String.class)
|
||||
def expected = readJson('1.0')
|
||||
def expected = readJson('1.0.1')
|
||||
JSONAssert.assertEquals(expected, new JSONObject(json), JSONCompareMode.STRICT)
|
||||
}
|
||||
|
||||
@Test // Test that the current code complies "at least" with 1.0
|
||||
void validateProjectMetadata10() {
|
||||
@Test // Test that the current code complies "at least" with 1.0.0
|
||||
void validateProjectMetadata100() {
|
||||
def json = restTemplate.getForObject(createUrl('/'), String.class)
|
||||
def expected = readJson('1.0')
|
||||
def expected = readJson('1.0.0')
|
||||
JSONAssert.assertEquals(expected, new JSONObject(json), JSONCompareMode.LENIENT)
|
||||
}
|
||||
|
||||
|
@@ -9,6 +9,7 @@ initializr:
|
||||
content:
|
||||
- name: Web
|
||||
id: web
|
||||
description: Web dependency description
|
||||
facets:
|
||||
- web
|
||||
- name: Security
|
||||
|
125
initializr/src/test/resources/metadata/test-default-1.0.1.json
Normal file
125
initializr/src/test/resources/metadata/test-default-1.0.1.json
Normal file
@@ -0,0 +1,125 @@
|
||||
{"dependencies": [
|
||||
{
|
||||
"name": "Core",
|
||||
"content": [
|
||||
{
|
||||
"name": "Web",
|
||||
"id": "web",
|
||||
"description": "Web dependency description"
|
||||
},
|
||||
{
|
||||
"name": "Security",
|
||||
"id": "security"
|
||||
},
|
||||
{
|
||||
"name": "Data JPA",
|
||||
"id": "data-jpa"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Other",
|
||||
"content": [
|
||||
{
|
||||
"name": "Foo",
|
||||
"id": "org.acme:foo"
|
||||
},
|
||||
{
|
||||
"name": "Bar",
|
||||
"id": "org.acme:bar"
|
||||
}
|
||||
]
|
||||
}
|
||||
], "types": [
|
||||
{
|
||||
"name": "Maven POM",
|
||||
"id": "pom.xml",
|
||||
"action": "/pom.xml",
|
||||
"default": false
|
||||
},
|
||||
{
|
||||
"name": "Maven Project",
|
||||
"id": "starter.zip",
|
||||
"action": "/starter.zip",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"name": "Gradle Config",
|
||||
"id": "build.gradle",
|
||||
"action": "/build.gradle",
|
||||
"default": false
|
||||
},
|
||||
{
|
||||
"name": "Gradle Project",
|
||||
"id": "gradle.zip",
|
||||
"action": "/starter.zip",
|
||||
"default": false
|
||||
}
|
||||
], "packagings": [
|
||||
{
|
||||
"name": "Jar",
|
||||
"id": "jar",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"name": "War",
|
||||
"id": "war",
|
||||
"default": false
|
||||
}
|
||||
], "javaVersions": [
|
||||
{
|
||||
"name": "1.6",
|
||||
"id": "1.6",
|
||||
"default": false
|
||||
},
|
||||
{
|
||||
"name": "1.7",
|
||||
"id": "1.7",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"name": "1.8",
|
||||
"id": "1.8",
|
||||
"default": false
|
||||
}
|
||||
], "languages": [
|
||||
{
|
||||
"name": "Groovy",
|
||||
"id": "groovy",
|
||||
"default": false
|
||||
},
|
||||
{
|
||||
"name": "Java",
|
||||
"id": "java",
|
||||
"default": true
|
||||
}
|
||||
], "bootVersions": [
|
||||
{
|
||||
"name": "Latest SNAPSHOT",
|
||||
"id": "1.2.0.BUILD-SNAPSHOT",
|
||||
"default": false
|
||||
},
|
||||
{
|
||||
"name": "1.1.4",
|
||||
"id": "1.1.4.RELEASE",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"name": "1.0.2",
|
||||
"id": "1.0.2.RELEASE",
|
||||
"default": false
|
||||
}
|
||||
], "defaults": {
|
||||
"groupId": "org.test",
|
||||
"artifactId": "demo",
|
||||
"version": "0.0.1-SNAPSHOT",
|
||||
"name": "demo",
|
||||
"description": "Demo project for Spring Boot",
|
||||
"packageName": "demo",
|
||||
"type": "starter.zip",
|
||||
"packaging": "jar",
|
||||
"javaVersion": "1.7",
|
||||
"language": "java",
|
||||
"bootVersion": "1.1.4.RELEASE"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user