Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.15.0 backports 2 #29713

Merged
merged 28 commits into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b5ac295
OutboundSseEvent is not correctly serialized
Dec 1, 2022
75652ea
Update the description copied from non-reactive variants
rsvoboda Dec 2, 2022
98d0d2d
Do not remove ConfigMappings marked as not removable via build item
radcortez Dec 2, 2022
82edba6
Adding additional logic to catch and address invalid JSON input.
damonsutherland Dec 3, 2022
959e0f7
Introduce the UniAsserter API to the Hibernate Reactive documentation
geoand Dec 5, 2022
91f7485
Rest Client: Add property to skip hostname verification
Sgitario Nov 2, 2022
a3c0e70
Upgrade to Jandex 3.0.5
Ladicek Dec 2, 2022
47adaf9
Add a paragraph about tiered compilation in the snapstart guide.
cescoffier Dec 5, 2022
c190ed8
Revert "Reactive Rest Client closing connections after server failures"
Sgitario Dec 5, 2022
9032b25
Add further details about podman
janderssonse Dec 2, 2022
b6fb71c
Fix vertx otel sdk reload in devmode with Delegate on tracer factory
brunobat Oct 18, 2022
fe0b43a
Take conditional annotation into account for @ServerExceptionMapper
geoand Nov 23, 2022
1a28ab3
Add hibernate.query.in_clause_parameter_padding as a supported config…
zedbeit Nov 30, 2022
bc6cf9c
Introduce @Separator annotation for query parameters
geoand Nov 29, 2022
f0117a1
Add spec.metadata.labels in Deployment resource for OpenShift
Sgitario Dec 5, 2022
8c25ae9
Allow defining additional data passed to codestarts for project creation
gsmet Dec 2, 2022
fd96c5b
Fix ordering of option in CreateApp
gsmet Dec 2, 2022
6bc15d7
Support setting name and description in CreateCli
gsmet Dec 2, 2022
7c6405b
Add a test for new --data feature of CLI project creation
ia3andy Dec 5, 2022
0b15f5b
Simplify CliDriver.readFileAsString signature
gsmet Dec 5, 2022
c84d537
ArC - introduce immutable bean archive index
mkouba Dec 2, 2022
20c883c
Allow using Gradle addExtension task without property file
glefloch Dec 5, 2022
b7eb75e
Polish Kubernetes Service Binding
geoand Dec 6, 2022
613b58a
Fix wrong extension reference on WebauthN documentation
Dec 5, 2022
e39cee3
Update CORS Access-Control-Allow-Headers test
sberyozkin Dec 4, 2022
1ae0666
Return allowed CORS headers in the letter case they were submitted in
sberyozkin Dec 5, 2022
bb7a01f
Introduce support for the `uri` file in k8s service binding
geoand Dec 6, 2022
15c75c5
Fix ClientProxyGenerator
mkouba Dec 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<bouncycastle.fips.version>1.0.2.3</bouncycastle.fips.version>
<bouncycastle.tls.fips.version>1.0.14</bouncycastle.tls.fips.version>
<findbugs.version>3.0.2</findbugs.version>
<jandex.version>3.0.4</jandex.version>
<jandex.version>3.0.5</jandex.version>
<resteasy.version>4.7.7.Final</resteasy.version>
<opentracing.version>0.33.0</opentracing.version>
<opentracing-jdbc.version>0.2.4</opentracing-jdbc.version>
Expand Down
2 changes: 1 addition & 1 deletion build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<failsafe-plugin.version>${version.surefire.plugin}</failsafe-plugin.version>

<!-- Jandex versions -->
<jandex.version>3.0.4</jandex.version>
<jandex.version>3.0.5</jandex.version>
<jandex-gradle-plugin.version>1.0.0</jandex-gradle-plugin.version>

<asciidoctorj.version>2.5.7</asciidoctorj.version>
Expand Down
20 changes: 13 additions & 7 deletions devtools/cli/src/main/java/io/quarkus/cli/CreateApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.HashSet;
import java.util.Set;

import io.quarkus.cli.common.DataOptions;
import io.quarkus.cli.common.PropertiesOptions;
import io.quarkus.cli.common.TargetQuarkusVersionGroup;
import io.quarkus.cli.create.BaseCreateCommand;
Expand Down Expand Up @@ -31,26 +32,29 @@ public class CreateApp extends BaseCreateCommand {
"--extension", "--extensions" }, description = "Extension(s) to add to the project.", split = ",")
Set<String> extensions = new HashSet<>();

@CommandLine.Option(paramLabel = "NAME", names = { "--name" }, description = "Name of the project.")
@CommandLine.Option(order = 2, paramLabel = "NAME", names = { "--name" }, description = "Name of the project.")
String name;

@CommandLine.Option(paramLabel = "DESCRIPTION", names = {
@CommandLine.Option(order = 3, paramLabel = "DESCRIPTION", names = {
"--description" }, description = "Description of the project.")
String description;

@CommandLine.ArgGroup(order = 2, heading = "%nQuarkus version:%n")
@CommandLine.ArgGroup(order = 4, heading = "%nQuarkus version:%n")
TargetQuarkusVersionGroup targetQuarkusVersion = new TargetQuarkusVersionGroup();

@CommandLine.ArgGroup(order = 3, heading = "%nBuild tool (Maven):%n")
@CommandLine.ArgGroup(order = 5, heading = "%nBuild tool (Maven):%n")
TargetBuildToolGroup targetBuildTool = new TargetBuildToolGroup();

@CommandLine.ArgGroup(order = 4, exclusive = false, heading = "%nTarget language:%n")
@CommandLine.ArgGroup(order = 6, exclusive = false, heading = "%nTarget language:%n")
TargetLanguageGroup targetLanguage = new TargetLanguageGroup();

@CommandLine.ArgGroup(order = 5, exclusive = false, heading = "%nCode Generation:%n")
@CommandLine.ArgGroup(order = 7, exclusive = false, heading = "%nCode Generation:%n")
CodeGenerationGroup codeGeneration = new CodeGenerationGroup();

@CommandLine.ArgGroup(order = 6, exclusive = false, validate = false)
@CommandLine.ArgGroup(order = 8, exclusive = false, validate = false)
DataOptions dataOptions = new DataOptions();

@CommandLine.ArgGroup(order = 9, exclusive = false, validate = false)
PropertiesOptions propertiesOptions = new PropertiesOptions();

@Override
Expand All @@ -72,6 +76,7 @@ public Integer call() throws Exception {
setCodegenOptions(codeGeneration);
setValue(CreateProjectKey.PROJECT_NAME, name);
setValue(CreateProjectKey.PROJECT_DESCRIPTION, description);
setValue(CreateProjectKey.DATA, dataOptions.data);

QuarkusCommandInvocation invocation = build(buildTool, targetQuarkusVersion,
propertiesOptions.properties, extensions);
Expand Down Expand Up @@ -112,6 +117,7 @@ public String toString() {
+ ", name=" + name
+ ", description=" + description
+ ", project=" + super.toString()
+ ", data=" + dataOptions.data
+ ", properties=" + propertiesOptions.properties
+ '}';
}
Expand Down
26 changes: 21 additions & 5 deletions devtools/cli/src/main/java/io/quarkus/cli/CreateCli.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
import java.util.HashSet;
import java.util.Set;

import io.quarkus.cli.common.DataOptions;
import io.quarkus.cli.common.PropertiesOptions;
import io.quarkus.cli.common.TargetQuarkusVersionGroup;
import io.quarkus.cli.create.BaseCreateCommand;
import io.quarkus.cli.create.CodeGenerationGroup;
import io.quarkus.cli.create.TargetBuildToolGroup;
import io.quarkus.cli.create.TargetGAVGroup;
import io.quarkus.cli.create.TargetLanguageGroup;
import io.quarkus.devtools.commands.CreateProject.CreateProjectKey;
import io.quarkus.devtools.commands.SourceType;
import io.quarkus.devtools.commands.data.QuarkusCommandInvocation;
import io.quarkus.devtools.commands.handlers.CreateJBangProjectCommandHandler;
Expand All @@ -30,19 +32,29 @@ public class CreateCli extends BaseCreateCommand {
"--extension", "--extensions" }, description = "Extension(s) to add to the project.", split = ",")
Set<String> extensions = new HashSet<>();

@CommandLine.ArgGroup(order = 2, heading = "%nQuarkus version:%n")
@CommandLine.Option(order = 2, paramLabel = "NAME", names = { "--name" }, description = "Name of the project.")
String name;

@CommandLine.Option(order = 3, paramLabel = "DESCRIPTION", names = {
"--description" }, description = "Description of the project.")
String description;

@CommandLine.ArgGroup(order = 4, heading = "%nQuarkus version:%n")
TargetQuarkusVersionGroup targetQuarkusVersion = new TargetQuarkusVersionGroup();

@CommandLine.ArgGroup(order = 3, heading = "%nBuild tool (Maven):%n")
@CommandLine.ArgGroup(order = 5, heading = "%nBuild tool (Maven):%n")
TargetBuildToolGroup targetBuildTool = new TargetBuildToolGroup();

@CommandLine.ArgGroup(order = 4, exclusive = false, heading = "%nTarget language:%n")
@CommandLine.ArgGroup(order = 6, exclusive = false, heading = "%nTarget language:%n")
TargetLanguageGroup targetLanguage = new TargetLanguageGroup();

@CommandLine.ArgGroup(order = 5, exclusive = false, heading = "%nCode Generation:%n")
@CommandLine.ArgGroup(order = 7, exclusive = false, heading = "%nCode Generation:%n")
CodeGenerationGroup codeGeneration = new CodeGenerationGroup();

@CommandLine.ArgGroup(order = 6, exclusive = false, validate = false)
@CommandLine.ArgGroup(order = 8, exclusive = false, validate = false)
DataOptions dataOptions = new DataOptions();

@CommandLine.ArgGroup(order = 9, exclusive = false, validate = false)
PropertiesOptions propertiesOptions = new PropertiesOptions();

@Override
Expand All @@ -64,6 +76,9 @@ public Integer call() throws Exception {
setJavaVersion(sourceType, targetLanguage.getJavaVersion());
setSourceTypeExtensions(extensions, sourceType);
setCodegenOptions(codeGeneration);
setValue(CreateProjectKey.PROJECT_NAME, name);
setValue(CreateProjectKey.PROJECT_DESCRIPTION, description);
setValue(CreateProjectKey.DATA, dataOptions.data);

QuarkusCommandInvocation invocation = build(buildTool, targetQuarkusVersion,
propertiesOptions.properties, extensions);
Expand Down Expand Up @@ -101,6 +116,7 @@ public String toString() {
+ ", codeGeneration=" + codeGeneration
+ ", extensions=" + extensions
+ ", project=" + super.toString()
+ ", data=" + dataOptions.data
+ ", properties=" + propertiesOptions.properties
+ '}';
}
Expand Down
21 changes: 21 additions & 0 deletions devtools/cli/src/main/java/io/quarkus/cli/common/DataOptions.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package io.quarkus.cli.common;

import java.util.HashMap;
import java.util.Map;

import picocli.CommandLine;

public class DataOptions {

public Map<String, String> data = new HashMap<>();

@CommandLine.Option(names = "--data", mapFallbackValue = "", description = "Additional data")
void setData(Map<String, String> data) {
this.data = data;
}

@Override
public String toString() {
return data.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ String validateBasicIdentifiers(Path pom, String group, String artifact, String
Assertions.assertTrue(pom.toFile().exists(),
"pom.xml should exist: " + pom.toAbsolutePath().toString());

String pomContent = CliDriver.readFileAsString(project, pom);
String pomContent = CliDriver.readFileAsString(pom);
Assertions.assertTrue(pomContent.contains("<groupId>" + group + "</groupId>"),
pom + " should contain group id " + group + ":\n" + pomContent);
Assertions.assertTrue(pomContent.contains("<artifactId>" + artifact + "</artifactId>"),
Expand Down
12 changes: 6 additions & 6 deletions devtools/cli/src/test/java/io/quarkus/cli/CliDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public static void deleteDir(Path path) throws Exception {
Assertions.assertFalse(path.toFile().exists());
}

public static String readFileAsString(Path projectRoot, Path path) throws Exception {
public static String readFileAsString(Path path) throws Exception {
return new String(Files.readAllBytes(path));
}

Expand Down Expand Up @@ -293,7 +293,7 @@ public static Result invokeExtensionAddQute(Path projectRoot, Path file) throws
Assertions.assertTrue(result.stdout.contains("quarkus-qute"),
"Expected quarkus-qute to be in the list of extensions. Result:\n" + result);

String content = readFileAsString(projectRoot, file);
String content = readFileAsString(file);
Assertions.assertTrue(content.contains("quarkus-qute"),
"quarkus-qute should be listed as a dependency. Result:\n" + content);

Expand All @@ -311,7 +311,7 @@ public static Result invokeExtensionRemoveQute(Path projectRoot, Path file) thro
Assertions.assertFalse(result.stdout.contains("quarkus-qute"),
"Expected quarkus-qute to be missing from the list of extensions. Result:\n" + result);

String content = readFileAsString(projectRoot, file);
String content = readFileAsString(file);
Assertions.assertFalse(content.contains("quarkus-qute"),
"quarkus-qute should not be listed as a dependency. Result:\n" + content);

Expand All @@ -333,7 +333,7 @@ public static Result invokeExtensionAddMultiple(Path projectRoot, Path file) thr
Assertions.assertTrue(result.stdout.contains("quarkus-jackson"),
"Expected quarkus-jackson to be in the list of extensions. Result:\n" + result);

String content = CliDriver.readFileAsString(projectRoot, file);
String content = CliDriver.readFileAsString(file);
Assertions.assertTrue(content.contains("quarkus-qute"),
"quarkus-qute should still be listed as a dependency. Result:\n" + content);
Assertions.assertTrue(content.contains("quarkus-amazon-lambda-http"),
Expand All @@ -359,7 +359,7 @@ public static Result invokeExtensionRemoveMultiple(Path projectRoot, Path file)
Assertions.assertFalse(result.stdout.contains("quarkus-jackson"),
"quarkus-jackson should not be in the list of extensions. Result:\n" + result);

String content = CliDriver.readFileAsString(projectRoot, file);
String content = CliDriver.readFileAsString(file);
Assertions.assertFalse(content.contains("quarkus-qute"),
"quarkus-qute should not be listed as a dependency. Result:\n" + content);
Assertions.assertFalse(content.contains("quarkus-amazon-lambda-http"),
Expand Down Expand Up @@ -455,7 +455,7 @@ public static void validateApplicationProperties(Path projectRoot, List<String>
Path properties = projectRoot.resolve("src/main/resources/application.properties");
Assertions.assertTrue(properties.toFile().exists(),
"application.properties should exist: " + properties.toAbsolutePath().toString());
String propertiesFile = CliDriver.readFileAsString(projectRoot, properties);
String propertiesFile = CliDriver.readFileAsString(properties);
configs.forEach(conf -> Assertions.assertTrue(propertiesFile.contains(conf),
"Properties file should contain " + conf + ". Found:\n" + propertiesFile));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public void testExtensionList() throws Exception {
Assertions.assertEquals(CommandLine.ExitCode.OK, result.exitCode, "Expected OK return code." + result);

Path buildGradle = project.resolve("build.gradle");
String buildGradleContent = CliDriver.readFileAsString(project, buildGradle);
String buildGradleContent = CliDriver.readFileAsString(buildGradle);
Assertions.assertFalse(buildGradleContent.contains("quarkus-qute"),
"Dependencies should not contain qute extension by default. Found:\n" + buildGradleContent);

Expand Down Expand Up @@ -379,7 +379,7 @@ public void testCreateArgJava11() throws Exception {
Assertions.assertEquals(CommandLine.ExitCode.OK, result.exitCode, "Expected OK return code." + result);

Path buildGradle = project.resolve("build.gradle");
String buildGradleContent = CliDriver.readFileAsString(project, buildGradle);
String buildGradleContent = CliDriver.readFileAsString(buildGradle);
Assertions.assertTrue(buildGradleContent.contains("sourceCompatibility = JavaVersion.VERSION_11"),
"Java 11 should be used when specified. Found:\n" + buildGradle);
}
Expand All @@ -394,7 +394,7 @@ public void testCreateArgJava17() throws Exception {
Assertions.assertEquals(CommandLine.ExitCode.OK, result.exitCode, "Expected OK return code." + result);

Path buildGradle = project.resolve("build.gradle");
String buildGradleContent = CliDriver.readFileAsString(project, buildGradle);
String buildGradleContent = CliDriver.readFileAsString(buildGradle);

Assertions.assertTrue(buildGradleContent.contains("sourceCompatibility = JavaVersion.VERSION_17"),
"Java 17 should be used when specified. Found:\n" + buildGradleContent);
Expand All @@ -405,7 +405,7 @@ String validateBasicGradleGroovyIdentifiers(Path project, String group, String a
Assertions.assertTrue(buildGradle.toFile().exists(),
"build.gradle should exist: " + buildGradle.toAbsolutePath().toString());

String buildContent = CliDriver.readFileAsString(project, buildGradle);
String buildContent = CliDriver.readFileAsString(buildGradle);
Assertions.assertTrue(buildContent.contains("group '" + group + "'"),
"build.gradle should include the group id:\n" + buildContent);
Assertions.assertTrue(buildContent.contains("version '" + version + "'"),
Expand All @@ -414,7 +414,7 @@ String validateBasicGradleGroovyIdentifiers(Path project, String group, String a
Path settings = project.resolve("settings.gradle");
Assertions.assertTrue(settings.toFile().exists(),
"settings.gradle should exist: " + settings.toAbsolutePath().toString());
String settingsContent = CliDriver.readFileAsString(project, settings);
String settingsContent = CliDriver.readFileAsString(settings);
Assertions.assertTrue(settingsContent.contains(artifact),
"settings.gradle should include the artifact id:\n" + settingsContent);

Expand All @@ -426,7 +426,7 @@ String validateBasicGradleKotlinIdentifiers(Path project, String group, String a
Assertions.assertTrue(buildGradle.toFile().exists(),
"build.gradle.kts should exist: " + buildGradle.toAbsolutePath().toString());

String buildContent = CliDriver.readFileAsString(project, buildGradle);
String buildContent = CliDriver.readFileAsString(buildGradle);
Assertions.assertTrue(buildContent.contains("group = \"" + group + "\""),
"build.gradle.kts should include the group id:\n" + buildContent);
Assertions.assertTrue(buildContent.contains("version = \"" + version + "\""),
Expand All @@ -435,7 +435,7 @@ String validateBasicGradleKotlinIdentifiers(Path project, String group, String a
Path settings = project.resolve("settings.gradle.kts");
Assertions.assertTrue(settings.toFile().exists(),
"settings.gradle.kts should exist: " + settings.toAbsolutePath().toString());
String settingsContent = CliDriver.readFileAsString(project, settings);
String settingsContent = CliDriver.readFileAsString(settings);
Assertions.assertTrue(settingsContent.contains(artifact),
"settings.gradle.kts should include the artifact id:\n" + settingsContent);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void testCreateAppDefaults() throws Exception {

Path javaMain = valdiateJBangSourcePackage(project, ""); // no package name

String source = CliDriver.readFileAsString(project, javaMain);
String source = CliDriver.readFileAsString(javaMain);
Assertions.assertTrue(source.contains("quarkus-resteasy"),
"Generated source should reference resteasy. Found:\n" + source);

Expand Down Expand Up @@ -89,7 +89,7 @@ public void testCreateAppOverrides() throws Exception {
validateBasicIdentifiers(project, "silly", "my-project", "0.1.0");
Path javaMain = valdiateJBangSourcePackage(project, "");

String source = CliDriver.readFileAsString(project, javaMain);
String source = CliDriver.readFileAsString(javaMain);
Assertions.assertTrue(source.contains("quarkus-reactive-routes"),
"Generated source should reference quarkus-reactive-routes. Found:\n" + source);

Expand All @@ -114,7 +114,7 @@ public void testCreateCliDefaults() throws Exception {

Path javaMain = valdiateJBangSourcePackage(project, ""); // no package name

String source = CliDriver.readFileAsString(project, javaMain);
String source = CliDriver.readFileAsString(javaMain);
Assertions.assertFalse(source.contains("quarkus-resteasy"),
"Generated source should reference resteasy. Found:\n" + source);
Assertions.assertTrue(source.contains("quarkus-picocli"),
Expand Down Expand Up @@ -178,7 +178,7 @@ public void testCreateArgJava11() throws Exception {

Path javaMain = valdiateJBangSourcePackage(project, ""); // no package name

String source = CliDriver.readFileAsString(project, javaMain);
String source = CliDriver.readFileAsString(javaMain);
Assertions.assertTrue(source.contains("//JAVA 11"),
"Generated source should contain //JAVA 11. Found:\n" + source);
}
Expand All @@ -193,7 +193,7 @@ public void testCreateArgJava17() throws Exception {
Assertions.assertEquals(CommandLine.ExitCode.OK, result.exitCode, "Expected OK return code." + result);

Path javaMain = valdiateJBangSourcePackage(project, ""); // no package name
String source = CliDriver.readFileAsString(project, javaMain);
String source = CliDriver.readFileAsString(javaMain);
Assertions.assertTrue(source.contains("//JAVA 17"),
"Generated source should contain //JAVA 17. Found:\n" + source);
}
Expand Down
Loading