-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Solve ClassPathResourceLoader issue with jar
Copying a few lines of code from `ClassPathUtils.processAsPath`
- Loading branch information
Showing
74 changed files
with
1,017 additions
and
471 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
...uildtool/gradle/base/settings.qute.gradle → ...uildtool/gradle/base/settings.qute.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package bundled.buildtool.gradle.base | ||
|
||
pluginManagement { | ||
repositories { | ||
mavenLocal() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...e/buildtool/gradle/java/build.qute.gradle → ...s/buildtool/gradle/java/build.qute.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package bundled.buildtool.gradle.java | ||
|
||
{#include build-layout} | ||
{#plugins} | ||
plugins { | ||
|
2 changes: 2 additions & 0 deletions
2
...buildtool/gradle/kotlin/build.qute.gradle → ...buildtool/gradle/kotlin/build.qute.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package bundled.buildtool.gradle.kotlin | ||
|
||
{#include build-layout} | ||
{#plugins} | ||
plugins { | ||
|
2 changes: 2 additions & 0 deletions
2
.../buildtool/gradle/scala/build.qute.gradle → .../buildtool/gradle/scala/build.qute.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package bundled.buildtool.gradle.scala | ||
|
||
{#include build-layout} | ||
{#plugins} | ||
plugins { | ||
|
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...starts/base/buildtool/maven/codestart.yml → ...-codestarts/buildtool/maven/codestart.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...se/config/config-properties/codestart.yml → ...odestarts/config/properties/codestart.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
--- | ||
name: config-properties | ||
type: config | ||
default: true | ||
type-fallback: true |
2 changes: 1 addition & 1 deletion
2
...rts/base/config/config-yaml/codestart.yml → ...dled-codestarts/config/yaml/codestart.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
--- | ||
name: config-yaml | ||
type: config | ||
type: config |
2 changes: 1 addition & 1 deletion
2
...destarts/base/language/java/codestart.yml → ...ed-codestarts/language/java/codestart.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
--- | ||
name: java | ||
type: language | ||
default: true | ||
type-fallback: true |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
...platform-descriptor-json/src/main/resources/bundled-codestarts/other/docker/codestart.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
name: docker | ||
preselected: true |
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...starts/base/project/quarkus/codestart.yml → ...-codestarts/project/quarkus/codestart.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
name: quarkus | ||
type: project | ||
default: true | ||
type-fallback: true | ||
spec: | ||
base: | ||
shared-data: | ||
|
3 changes: 0 additions & 3 deletions
3
...latform-descriptor-json/src/main/resources/codestarts/base/codestart/docker/codestart.yml
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
= Quarkus - Codestarts | ||
|
||
This guide explains how to create and configure a Quarkus Codestart for an extension. | ||
|
||
== Description | ||
|
||
"Codestarts" is the name we gave to our Quarkus quickstart code generation system. Codestarts are meant to provide a personalized Quarkus getting started experience and really show the Quarkus breadth. | ||
Quarkus extension are able to provide one or more well defined codestarts which will contain all the necessary resources to bring user who pick that extension, everything he needs to get started with it. | ||
|
||
== How it works | ||
|
||
There are two kinds of codestarts contributing to generating a project, | ||
the kind where we require to have only one for a project (called single) and the others (called other). | ||
|
||
Singles: | ||
|
||
* project: The base (ex: a Quarkus project) | ||
* buildtool: The build tool (ex: Maven, Gradle, Gradle with Kotlin DSL) | ||
* language: The coding language (ex: Java, Kotlin, Scala) | ||
* config: The config type (ex: yaml, properties) | ||
* [custom]: Any custom type that must be single | ||
|
||
Others: Whats comes on top as addition (ex: dockerfiles, example code for extensions, ...) | ||
|
||
Each codestart consists of: | ||
|
||
. a specific directory | ||
. a codestart.yml file | ||
. optionally some templates which follow a structure and naming conventions | ||
|
||
*NOTE* The codestart.yml file and the directory structure follow the same principle, it can optionally contain a base and/or some language overrides. | ||
|
||
=== Example codestart: | ||
|
||
Directory structure | ||
|
||
* my-codestart/codestart.yml | ||
* my-codestart/base/ | ||
* my-codestart/java/ | ||
* my-codestart/kotlin/ | ||
|
||
codestart.yml: | ||
[source,yaml] | ||
---- | ||
name: my-codestart | ||
spec: | ||
base: | ||
... | ||
java: | ||
... | ||
---- | ||
|
||
=== Project generation | ||
|
||
When generating a Quarkus project: | ||
|
||
. codestarts to use are resolved depending on the input | ||
. codestarts shared data is processed to make it available for all codestarts | ||
. The relevant files are processed: | ||
** Only the files that are related to the selected language are processed | ||
** The files are processed differently based on a naming convention. | ||
** The data is used to render Qute templates | ||
** We always process in this order: language, project, buildtool, config, custom, other. | ||
|
||
The data used to generate a specific codestart is a merge of: | ||
|
||
. The data of the codestart to generate | ||
. All codestarts "shared" data | ||
. The user input | ||
. Some specific post processing (ex: adding dependencies) | ||
|
||
*NOTE* The data (shared or not) can also be specific to a language. | ||
|
||
=== Directory structure | ||
|
||
*NOTE* `codestart.yml` is the only required file. | ||
|
||
* codestart.yml must be at the root of the codestart | ||
* `./base` contains all the files that will be processed | ||
* `./[languageName]` contains all the files that will be processed if the specified language has been selected (overriding base) | ||
|
||
=== codestart.yml | ||
|
||
codestart.yml: | ||
[source,yaml] | ||
---- | ||
name: the unique name - REQUIRED | ||
ref: the reference name (not unique) to use for extension matching (else the name is used) | ||
type: the type [other (default), project, buildtool, language, config] or any custom type | ||
type-fallback: flag to indicate that it should be selected as fallback when no codestart has been selected with type - SINGLE | ||
preselected: flag to indicate that it should be pre-selected - OTHER. | ||
example: flag to indicate that it is optional example code that can be disabled by the user - OTHER. | ||
spec: | ||
[base or language name]: the specification (base, java, ...) | ||
data: a flat map of data to use only for this codestart | ||
shared-data: a flat map of data to use accross all codestarts | ||
dependencies: a list of dependencies to add when this is selected | ||
test-dependencies: a list of test dependencies to add when this is selected | ||
---- | ||
|
||
=== Files naming convention | ||
|
||
* containing `.qute` will be processed with Qute | ||
* containing `.include-qute` is used as a Qute template for inclusion. | ||
|
||
Example: When using `{#include [name]}` in a template, it will look for `[name].include-qute` in the language dir, then in the base dir. | ||
|
||
* containing `.append` will be appended together | ||
* other files are just copied | ||
|
||
*NOTE* there is also something specific for `pom.xml` but this should not be available out of internal codestarts. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-tools-parent</artifactId> | ||
<version>999-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>quarkus-devtools-codestarts</artifactId> | ||
<name>Quarkus - Dev tools - Codestarts</name> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.quarkus.qute</groupId> | ||
<artifactId>qute-generator</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-bootstrap-app-model</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-platform-descriptor-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>maven-model-helper</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.dataformat</groupId> | ||
<artifactId>jackson-dataformat-yaml</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-io</groupId> | ||
<artifactId>commons-io</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.assertj</groupId> | ||
<artifactId>assertj-core</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
4 changes: 2 additions & 2 deletions
4
...project/codegen/codestarts/Codestart.java → ...uarkus/devtools/codestarts/Codestart.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ect/codegen/codestarts/CodestartData.java → ...us/devtools/codestarts/CodestartData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...odegen/codestarts/CodestartException.java → ...vtools/codestarts/CodestartException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.