mirror of
https://gitee.com/dcren/initializr.git
synced 2025-09-18 09:44:47 +08:00
Move metadata to a dedicated module
This commit moves the `metadata` package to a dedicated `initializr-metadata` module so that it can be shared. Closes gh-804
This commit is contained in:
@@ -78,6 +78,12 @@
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.spring.initializr</groupId>
|
||||
<artifactId>initializr-metadata</artifactId>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.spring.initializr</groupId>
|
||||
<artifactId>initializr-web</artifactId>
|
||||
|
80
initializr-metadata/pom.xml
Normal file
80
initializr-metadata/pom.xml
Normal file
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>io.spring.initializr</groupId>
|
||||
<artifactId>initializr</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<artifactId>initializr-metadata</artifactId>
|
||||
<name>Spring Initializr :: Metadata</name>
|
||||
|
||||
<properties>
|
||||
<main.basedir>${basedir}/..</main.basedir>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.spring.initializr</groupId>
|
||||
<artifactId>initializr-generator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xmlunit</groupId>
|
||||
<artifactId>xmlunit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>test-jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
@@ -0,0 +1,13 @@
|
||||
initializr:
|
||||
groupId:
|
||||
value: org.foo
|
||||
artifactId:
|
||||
value: foo-bar
|
||||
version:
|
||||
value: 1.2.4-SNAPSHOT
|
||||
name:
|
||||
value: FooBar
|
||||
description:
|
||||
value: FooBar Project
|
||||
packageName:
|
||||
value: org.foo.demo
|
@@ -0,0 +1,9 @@
|
||||
initializr:
|
||||
env:
|
||||
artifactRepository: https://repo.spring.io/lib-release
|
||||
google-analytics-tracking-code: UA-1234567-89
|
||||
fallbackApplicationName: FooBarApplication
|
||||
invalidApplicationNames:
|
||||
- InvalidApplication
|
||||
kotlin:
|
||||
default-version: 1.0.0-beta-2423
|
@@ -0,0 +1,167 @@
|
||||
info:
|
||||
spring-boot:
|
||||
version: 2.1.4.RELEASE
|
||||
|
||||
initializr:
|
||||
env:
|
||||
boms:
|
||||
my-api-bom:
|
||||
groupId: org.acme
|
||||
artifactId: my-api-bom
|
||||
versionProperty: my-api.version
|
||||
additionalBoms: ['my-api-dependencies-bom']
|
||||
mappings:
|
||||
- versionRange: "[2.0.0.RELEASE,2.1.6.RELEASE)"
|
||||
version: 1.0.0.RELEASE
|
||||
repositories: my-api-repo-1
|
||||
- versionRange: "2.2.1.RELEASE"
|
||||
version: 2.0.0.RELEASE
|
||||
repositories: my-api-repo-2
|
||||
my-api-dependencies-bom:
|
||||
groupId: org.acme
|
||||
artifactId: my-api-dependencies-bom
|
||||
version: 1.0.0.RELEASE
|
||||
repositories: my-api-repo-3
|
||||
kotlin:
|
||||
defaultVersion: 1.2
|
||||
mappings:
|
||||
- versionRange: "[1.5.0.RELEASE,2.0.0.M1)"
|
||||
version: 1.0
|
||||
- versionRange: "[2.0.0.M1,2.1.0.M1)"
|
||||
version: 1.1
|
||||
repositories:
|
||||
my-api-repo-1:
|
||||
name: repo1
|
||||
url: http://example.com/repo1
|
||||
my-api-repo-2:
|
||||
name: repo2
|
||||
url: http://example.com/repo2
|
||||
my-api-repo-3:
|
||||
name: repo3
|
||||
url: http://example.com/repo3
|
||||
dependencies:
|
||||
- name: Core
|
||||
content:
|
||||
- name: Web
|
||||
id: web
|
||||
description: Web dependency description
|
||||
facets:
|
||||
- web
|
||||
links:
|
||||
- rel: guide
|
||||
href: https://example.com/guide
|
||||
description: Building a RESTful Web Service
|
||||
- rel: reference
|
||||
href: https://example.com/doc
|
||||
- name: Security
|
||||
id: security
|
||||
- name: Data JPA
|
||||
id: data-jpa
|
||||
aliases:
|
||||
- jpa
|
||||
- name: Other
|
||||
content:
|
||||
- name: Foo
|
||||
groupId: org.acme
|
||||
artifactId: foo
|
||||
version: 1.3.5
|
||||
weight: 42
|
||||
keywords:
|
||||
- thefoo
|
||||
- dafoo
|
||||
links:
|
||||
- rel: guide
|
||||
href: https://example.com/guide1
|
||||
- rel: reference
|
||||
href: https://example.com/{bootVersion}/doc
|
||||
- rel: guide
|
||||
href: https://example.com/guide2
|
||||
description: Some guide for foo
|
||||
- name: Bar
|
||||
id: org.acme:bar
|
||||
version: 2.1.0
|
||||
- name: Biz
|
||||
groupId: org.acme
|
||||
artifactId: biz
|
||||
scope: runtime
|
||||
version: 1.3.5
|
||||
versionRange: 2.2.0.BUILD-SNAPSHOT
|
||||
- name: Bur
|
||||
id: org.acme:bur
|
||||
version: 2.1.0
|
||||
scope: test
|
||||
versionRange: "[2.1.4.RELEASE,2.2.0.BUILD-SNAPSHOT)"
|
||||
- name: My API
|
||||
id : my-api
|
||||
groupId: org.acme
|
||||
artifactId: my-api
|
||||
scope: provided
|
||||
bom: my-api-bom
|
||||
types:
|
||||
- name: Maven POM
|
||||
id: maven-build
|
||||
sts-id: pom.xml
|
||||
tags:
|
||||
build: maven
|
||||
format: build
|
||||
default: false
|
||||
action: /pom.xml
|
||||
- name: Maven Project
|
||||
id: maven-project
|
||||
sts-id: starter.zip
|
||||
tags:
|
||||
build: maven
|
||||
format: project
|
||||
default: true
|
||||
action: /starter.zip
|
||||
- name: Gradle Config
|
||||
id: gradle-build
|
||||
sts-id: build.gradle
|
||||
tags:
|
||||
build: gradle
|
||||
format: build
|
||||
default: false
|
||||
action: /build.gradle
|
||||
- name: Gradle Project
|
||||
id: gradle-project
|
||||
sts-id: gradle.zip
|
||||
tags:
|
||||
build: gradle
|
||||
format: project
|
||||
default: false
|
||||
action: /starter.zip
|
||||
packagings:
|
||||
- name: Jar
|
||||
id: jar
|
||||
default: true
|
||||
- name: War
|
||||
id: war
|
||||
default: false
|
||||
javaVersions:
|
||||
- id: 1.6
|
||||
default: false
|
||||
- id: 1.7
|
||||
default: false
|
||||
- id: 1.8
|
||||
default: true
|
||||
languages:
|
||||
- name: Groovy
|
||||
id: groovy
|
||||
default: false
|
||||
- name: Java
|
||||
id: java
|
||||
default: true
|
||||
- name: Kotlin
|
||||
id: kotlin
|
||||
default: false
|
||||
bootVersions:
|
||||
- name : Latest SNAPSHOT
|
||||
id: 2.2.0.BUILD-SNAPSHOT
|
||||
default: false
|
||||
- name: 2.1.4
|
||||
id: 2.1.4.RELEASE
|
||||
default: true
|
||||
- name: 1.5.17
|
||||
id: 1.5.17.RELEASE
|
||||
default: false
|
||||
|
@@ -0,0 +1,3 @@
|
||||
initializr:
|
||||
env:
|
||||
forceSsl: true
|
7
initializr-metadata/src/test/resources/logback-test.xml
Normal file
7
initializr-metadata/src/test/resources/logback-test.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<include resource="org/springframework/boot/logging/logback/base.xml" />
|
||||
<root level="warn">
|
||||
<appender-ref ref="CONSOLE" />
|
||||
</root>
|
||||
</configuration>
|
@@ -18,6 +18,10 @@
|
||||
<groupId>io.spring.initializr</groupId>
|
||||
<artifactId>initializr-generator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.spring.initializr</groupId>
|
||||
<artifactId>initializr-metadata</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@@ -79,6 +83,12 @@
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.spring.initializr</groupId>
|
||||
<artifactId>initializr-metadata</artifactId>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.spring.initializr.experimental</groupId>
|
||||
<artifactId>initializr-generator</artifactId>
|
||||
|
12
pom.xml
12
pom.xml
@@ -51,6 +51,7 @@
|
||||
<module>initializr-actuator</module>
|
||||
<module>initializr-docs</module>
|
||||
<module>initializr-generator</module>
|
||||
<module>initializr-metadata</module>
|
||||
<module>initializr-web</module>
|
||||
</modules>
|
||||
|
||||
@@ -72,6 +73,17 @@
|
||||
<version>${revision}</version>
|
||||
<type>test-jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.spring.initializr</groupId>
|
||||
<artifactId>initializr-metadata</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.spring.initializr</groupId>
|
||||
<artifactId>initializr-metadata</artifactId>
|
||||
<version>${revision}</version>
|
||||
<type>test-jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.spring.initializr</groupId>
|
||||
<artifactId>initializr-web</artifactId>
|
||||
|
Reference in New Issue
Block a user