Skip to content

Commit

Permalink
Merge branch 'quarkusio:main' into convert-otel-duration-props
Browse files Browse the repository at this point in the history
  • Loading branch information
mcruzdev authored Jun 10, 2023
2 parents 0e73e2d + 55fb3b2 commit a5da80b
Show file tree
Hide file tree
Showing 77 changed files with 952 additions and 692 deletions.
2 changes: 1 addition & 1 deletion .mvn/extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<extension>
<groupId>com.gradle</groupId>
<artifactId>common-custom-user-data-maven-extension</artifactId>
<version>1.11.1</version>
<version>1.12</version>
</extension>
</extensions>
13 changes: 4 additions & 9 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<jakarta.authentication-api>3.0.0</jakarta.authentication-api>
<jakarta.authorization-api.version>2.1.0</jakarta.authorization-api.version>
<jakarta.el-api.version>5.0.1</jakarta.el-api.version>
<jakarta.json-api.version>2.1.1</jakarta.json-api.version>
<jakarta.json-api.version>2.1.2</jakarta.json-api.version>
<jakarta.ws.rs-api.version>3.1.0</jakarta.ws.rs-api.version>
<jandex.version>3.1.1</jandex.version>
<jandex.version>3.1.2</jandex.version>
<javax.annotation-api.version>1.3.2</javax.annotation-api.version>
<javax.inject.version>1</javax.inject.version>
<parsson.version>1.1.1</parsson.version>
Expand Down Expand Up @@ -60,14 +60,14 @@
<smallrye-health.version>4.0.2</smallrye-health.version>
<smallrye-metrics.version>4.0.0</smallrye-metrics.version>
<smallrye-open-api.version>3.3.4</smallrye-open-api.version>
<smallrye-graphql.version>2.2.0</smallrye-graphql.version>
<smallrye-graphql.version>2.2.1</smallrye-graphql.version>
<smallrye-opentracing.version>3.0.3</smallrye-opentracing.version>
<smallrye-fault-tolerance.version>6.2.3</smallrye-fault-tolerance.version>
<smallrye-jwt.version>4.2.1</smallrye-jwt.version>
<smallrye-context-propagation.version>2.1.0</smallrye-context-propagation.version>
<smallrye-reactive-streams-operators.version>1.0.13</smallrye-reactive-streams-operators.version>
<smallrye-reactive-types-converter.version>3.0.0</smallrye-reactive-types-converter.version>
<smallrye-mutiny-vertx-binding.version>3.4.1</smallrye-mutiny-vertx-binding.version>
<smallrye-mutiny-vertx-binding.version>3.4.2</smallrye-mutiny-vertx-binding.version>
<smallrye-reactive-messaging.version>4.6.0</smallrye-reactive-messaging.version>
<smallrye-stork.version>2.2.0</smallrye-stork.version>
<jakarta.activation.version>2.1.2</jakarta.activation.version>
Expand Down Expand Up @@ -5119,11 +5119,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-context-propagation</artifactId>
<version>${resteasy.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy.spring</groupId>
<artifactId>resteasy-spring-web</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<failsafe-plugin.version>${version.surefire.plugin}</failsafe-plugin.version>

<!-- Jandex versions -->
<jandex.version>3.1.1</jandex.version>
<jandex.version>3.1.2</jandex.version>
<jandex-gradle-plugin.version>1.0.0</jandex-gradle-plugin.version>

<asciidoctorj.version>2.5.8</asciidoctorj.version>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ private void assembleFastJar() {
getLogger().info("Synchronizing Quarkus build for {} packaging from {} and {} into {}", packageType(),
appBuildDir, depBuildDir, appTargetDir);
getFileSystemOperations().sync(sync -> {
sync.eachFile(new CopyActionDeleteNonWriteableTarget(appTargetDir.toPath()));
sync.into(appTargetDir);
sync.from(appBuildDir, depBuildDir);
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
package io.quarkus.gradle.tasks;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Map;
import java.util.stream.Collectors;

import javax.inject.Inject;

import org.gradle.api.Action;
import org.gradle.api.GradleException;
import org.gradle.api.file.FileCollection;
import org.gradle.api.file.FileCopyDetails;
import org.gradle.api.file.FileSystemOperations;
import org.gradle.api.logging.LogLevel;
import org.gradle.api.tasks.Classpath;
Expand Down Expand Up @@ -168,6 +172,9 @@ void generateBuild() {
PackageConfig.BuiltInType packageType = packageType();
getLogger().info("Building Quarkus app for package type {} in {}", packageType, genDir);

// Need to delete app-cds.jsa specially, because it's usually read-only and Gradle's delete file-system
// operation doesn't delete "read only" files :(
deleteFileIfExists(genDir.resolve(outputDirectory()).resolve("app-cds.jsa"));
getFileSystemOperations().delete(delete -> {
// Caching and "up-to-date" checks depend on the inputs, this 'delete()' should ensure that the up-to-date
// checks work against "clean" outputs, considering that the outputs depend on the package-type.
Expand Down Expand Up @@ -223,6 +230,7 @@ void generateBuild() {
getFileSystemOperations().copy(copy -> {
copy.from(buildDir);
copy.into(genDir);
copy.eachFile(new CopyActionDeleteNonWriteableTarget(genDir));
switch (packageType) {
case NATIVE:
copy.include(nativeRunnerFileName());
Expand Down Expand Up @@ -261,4 +269,32 @@ void abort(String message, Object... args) {
});
throw new StopExecutionException();
}

public static final class CopyActionDeleteNonWriteableTarget implements Action<FileCopyDetails> {
private final Path destDir;

public CopyActionDeleteNonWriteableTarget(Path destDir) {
this.destDir = destDir;
}

@Override
public void execute(FileCopyDetails details) {
// Delete a pre-existing non-writeable file, otherwise a copy or sync operation would fail.
// This situation happens for 'app-cds.jsa' files, which are created as "read only" files,
// prefer to keep those files read-only.

Path destFile = destDir.resolve(details.getPath());
if (Files.exists(destFile) && !Files.isWritable(destFile)) {
deleteFileIfExists(destFile);
}
}
}

protected static void deleteFileIfExists(Path file) {
try {
Files.deleteIfExists(file);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.gradle.api.file.FileCollection;
import org.gradle.api.tasks.CacheableTask;
import org.gradle.api.tasks.CompileClasspath;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.InputFiles;
import org.gradle.api.tasks.OutputDirectory;
import org.gradle.api.tasks.PathSensitive;
Expand Down Expand Up @@ -62,6 +63,11 @@ public void setCompileClasspath(Configuration compileClasspath) {
this.compileClasspath = compileClasspath;
}

@Input
public Map<String, String> getCachingRelevantInput() {
return extension().baseConfig().quarkusProperties();
}

@InputFiles
@PathSensitive(PathSensitivity.RELATIVE)
public Set<File> getInputDirectory() {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/cdi-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ public class Processor {
<1> The injected instance is an _immutable list_ of the contextual references of the _disambiguated_ beans.
<2> For this injection point the required type is `Service` and no additional qualifiers are declared.

TIP: The list is sorted by priority as defined by `io.quarkus.arc.InjectableBean#getPriority()`. Higher priority goes first. In general, the `@jakarta.annotation.Priority` and `@io.quarkus.arc.Priority` annotations can be used to assign the priority to a class bean, producer method or producer field.
TIP: The list is sorted by priority as defined by `io.quarkus.arc.InjectableBean#getPriority()`. Higher priority goes first. In general, the `@jakarta.annotation.Priority` annotation can be used to assign the priority to a class bean, producer method or producer field.

If an injection point declares no other qualifier than `@All` then `@Any` is used, i.e. the behavior is equivalent to `@Inject @Any Instance<Service>`.

Expand Down
2 changes: 2 additions & 0 deletions docs/src/main/asciidoc/rest-client-reactive.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1364,6 +1364,8 @@ quarkus.rest-client.logging.body-limit=50
quarkus.log.category."org.jboss.resteasy.reactive.client.logging".level=DEBUG
----

TIP: REST Client Reactive uses a default `ClientLogger` implementation. You can change it by providing a custom `ClientLogger` instance through CDI or when programmatically creating your client.

== Mocking the client for tests
If you use a client injected with the `@RestClient` annotation, you can easily mock it for tests.
You can do it with Mockito's `@InjectMock` or with `QuarkusMock`.
Expand Down

This file was deleted.

Loading

0 comments on commit a5da80b

Please sign in to comment.