Skip to content

Commit

Permalink
Merge branch 'main' into distinguish-non-instantiable-builditem-in-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
edeandrea authored Jul 19, 2024
2 parents f55a493 + 4a385dc commit 600cb27
Show file tree
Hide file tree
Showing 120 changed files with 2,781 additions and 1,801 deletions.
4 changes: 2 additions & 2 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<extension>
<groupId>com.gradle</groupId>
<artifactId>develocity-maven-extension</artifactId>
<version>1.21.5</version>
<version>1.21.6</version>
</extension>
<extension>
<groupId>com.gradle</groupId>
Expand All @@ -12,7 +12,7 @@
<extension>
<groupId>com.gradle</groupId>
<artifactId>quarkus-build-caching-extension</artifactId>
<version>1.5</version>
<version>1.6</version>
</extension>
<extension>
<groupId>io.quarkus.develocity</groupId>
Expand Down
22 changes: 11 additions & 11 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<microprofile-lra.version>2.0</microprofile-lra.version>
<microprofile-openapi.version>3.1.1</microprofile-openapi.version>
<smallrye-common.version>2.5.0</smallrye-common.version>
<smallrye-config.version>3.8.3</smallrye-config.version>
<smallrye-config.version>3.9.0</smallrye-config.version>
<smallrye-health.version>4.1.0</smallrye-health.version>
<smallrye-metrics.version>4.0.0</smallrye-metrics.version>
<smallrye-open-api.version>3.10.0</smallrye-open-api.version>
Expand All @@ -61,7 +61,7 @@
<smallrye-context-propagation.version>2.1.2</smallrye-context-propagation.version>
<smallrye-reactive-streams-operators.version>1.0.13</smallrye-reactive-streams-operators.version>
<smallrye-reactive-types-converter.version>3.0.1</smallrye-reactive-types-converter.version>
<smallrye-mutiny-vertx-binding.version>3.13.2</smallrye-mutiny-vertx-binding.version>
<smallrye-mutiny-vertx-binding.version>3.14.0</smallrye-mutiny-vertx-binding.version>
<smallrye-reactive-messaging.version>4.23.0</smallrye-reactive-messaging.version>
<smallrye-stork.version>2.6.0</smallrye-stork.version>
<jakarta.activation.version>2.1.3</jakarta.activation.version>
Expand Down Expand Up @@ -94,8 +94,8 @@
<gizmo.version>1.8.0</gizmo.version>
<jackson-bom.version>2.17.2</jackson-bom.version>
<commons-logging-jboss-logging.version>1.0.0.Final</commons-logging-jboss-logging.version>
<commons-lang3.version>3.14.0</commons-lang3.version>
<commons-codec.version>1.17.0</commons-codec.version>
<commons-lang3.version>3.15.0</commons-lang3.version>
<commons-codec.version>1.17.1</commons-codec.version>
<classmate.version>1.7.0</classmate.version>
<!-- See root POM for hibernate-orm.version, hibernate-reactive.version, hibernate-validator.version,
hibernate-search.version, antlr.version, bytebuddy.version, hibernate-commons-annotations.version -->
Expand Down Expand Up @@ -148,7 +148,7 @@
<scala.version>2.13.14</scala.version>
<aws-lambda-java.version>1.2.3</aws-lambda-java.version>
<aws-lambda-java-events.version>3.11.6</aws-lambda-java-events.version>
<aws-xray.version>2.16.0</aws-xray.version>
<aws-xray.version>2.17.0</aws-xray.version>
<azure-functions-java-library.version>3.1.0</azure-functions-java-library.version>
<azure-functions-java-spi.version>1.0.0</azure-functions-java-spi.version>
<kotlin.version>2.0.0</kotlin.version>
Expand All @@ -171,7 +171,7 @@
<proton-j.version>0.34.1</proton-j.version>
<javaparser.version>3.26.1</javaparser.version>
<hibernate-quarkus-local-cache.version>0.3.0</hibernate-quarkus-local-cache.version>
<flapdoodle.mongo.version>4.16.0</flapdoodle.mongo.version>
<flapdoodle.mongo.version>4.16.1</flapdoodle.mongo.version>
<quarkus-spring-api.version>6.1.SP2</quarkus-spring-api.version>
<quarkus-spring-data-api.version>3.2.SP2</quarkus-spring-data-api.version>
<quarkus-spring-security-api.version>6.2</quarkus-spring-security-api.version>
Expand All @@ -182,7 +182,7 @@
<keycloak.version>25.0.0</keycloak.version>
<logstash-gelf.version>1.15.1</logstash-gelf.version>
<checker-qual.version>3.45.0</checker-qual.version>
<error-prone-annotations.version>2.28.0</error-prone-annotations.version>
<error-prone-annotations.version>2.29.1</error-prone-annotations.version>
<jib-core.version>0.27.0</jib-core.version>
<google-http-client.version>1.44.2</google-http-client.version>
<scram-client.version>2.1</scram-client.version>
Expand All @@ -197,10 +197,10 @@
<avro.version>1.11.3</avro.version>
<apicurio-registry.version>2.5.10.Final</apicurio-registry.version>
<apicurio-common-rest-client.version>0.1.18.Final</apicurio-common-rest-client.version> <!-- must be the version Apicurio Registry uses -->
<testcontainers.version>1.19.8</testcontainers.version> <!-- Make sure to also update docker-java.version to match its needs -->
<docker-java.version>3.3.6</docker-java.version> <!-- must be the version Testcontainers use -->
<testcontainers.version>1.20.0</testcontainers.version> <!-- Make sure to also update docker-java.version to match its needs -->
<docker-java.version>3.4.0</docker-java.version> <!-- must be the version Testcontainers use: https://central.sonatype.com/artifact/org.testcontainers/testcontainers -->
<!-- Check the compatibility matrix (https://github.com/opensearch-project/opensearch-testcontainers) before upgrading: -->
<opensearch-testcontainers.version>2.0.0</opensearch-testcontainers.version>
<opensearch-testcontainers.version>2.0.2</opensearch-testcontainers.version>
<com.dajudge.kindcontainer>1.4.6</com.dajudge.kindcontainer>
<aesh.version>2.8.2</aesh.version>
<aesh-readline.version>2.6</aesh-readline.version>
Expand All @@ -220,7 +220,7 @@
<!-- keep in-sync, if possible, with Micrometer registry Prometheus -->
<prometheus.version>0.16.0</prometheus.version>
<!-- Dev UI -->
<importmap.version>1.0.10</importmap.version>
<importmap.version>1.0.11</importmap.version>
</properties>

<dependencyManagement>
Expand Down
2 changes: 1 addition & 1 deletion bom/dev-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<description>Dependency management for dev-ui. Importable by third party extension developers.</description>

<properties>
<vaadin.version>24.3.13</vaadin.version>
<vaadin.version>24.4.2</vaadin.version>
<lit.version>3.1.4</lit.version>
<lit-element.version>4.0.6</lit-element.version>
<lit-html.version>3.1.4</lit-html.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 @@ -59,7 +59,7 @@
<!-- These 2 properties are used by CreateProjectMojo to add the Maven Wrapper -->
<proposed-maven-version>3.9.8</proposed-maven-version>
<maven-wrapper.version>3.2.0</maven-wrapper.version>
<gradle-wrapper.version>8.8</gradle-wrapper.version>
<gradle-wrapper.version>8.9</gradle-wrapper.version>
<quarkus-gradle-plugin.version>${project.version}</quarkus-gradle-plugin.version>
<quarkus-maven-plugin.version>${project.version}</quarkus-maven-plugin.version>
<maven-plugin-plugin.version>3.8.1</maven-plugin-plugin.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import org.jboss.jandex.IndexView;

import io.quarkus.bootstrap.model.AppArtifactKey;
import io.quarkus.bootstrap.model.PathsCollection;
import io.quarkus.maven.dependency.ArtifactKey;
import io.quarkus.maven.dependency.ResolvedDependency;
Expand Down Expand Up @@ -72,12 +71,6 @@ public interface ApplicationArchive {
*/
PathCollection getResolvedPaths();

/**
* @deprecated in favor of {@link #getKey()}
* @return the artifact key or null if not available
*/
AppArtifactKey getArtifactKey();

/**
*
* @return the artifact key or null if not available
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import org.jboss.jandex.IndexView;

import io.quarkus.bootstrap.model.AppArtifactKey;
import io.quarkus.bootstrap.model.PathsCollection;
import io.quarkus.builder.item.MultiBuildItem;
import io.quarkus.maven.dependency.ArtifactKey;
Expand Down Expand Up @@ -62,21 +61,6 @@ public PathCollection getResolvedPaths() {
return PathList.from(openTree.getOriginalTree().getRoots());
}

@Override
@Deprecated
/**
* @deprecated in favor of {@link #getKey()}
* @return archive key
*/
public AppArtifactKey getArtifactKey() {
if (resolvedDependency == null) {
return null;
}
ArtifactKey artifactKey = resolvedDependency.getKey();
return new AppArtifactKey(artifactKey.getGroupId(), artifactKey.getArtifactId(), artifactKey.getClassifier(),
artifactKey.getType());
}

@Override
public ArtifactKey getKey() {
return resolvedDependency != null ? resolvedDependency.getKey() : null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
import static io.quarkus.deployment.util.ReflectUtil.toError;
import static io.quarkus.deployment.util.ReflectUtil.typeOfParameter;
import static io.quarkus.deployment.util.ReflectUtil.unwrapInvocationTargetException;
import static io.quarkus.runtime.configuration.PropertiesUtil.filterPropertiesInRoots;
import static io.quarkus.runtime.configuration.PropertiesUtil.isPropertyInRoots;
import static io.smallrye.config.ConfigMappings.ConfigClassWithPrefix.configClassWithPrefix;
import static io.smallrye.config.Expressions.withoutExpansion;
import static io.smallrye.config.PropertiesConfigSourceProvider.classPathSources;
import static io.smallrye.config.SmallRyeConfig.SMALLRYE_CONFIG_PROFILE;
import static io.smallrye.config.SmallRyeConfig.SMALLRYE_CONFIG_PROFILE_PARENT;
import static io.smallrye.config.SmallRyeConfigBuilder.META_INF_MICROPROFILE_CONFIG_PROPERTIES;
import static java.util.stream.Collectors.toSet;

import java.io.IOException;
Expand Down Expand Up @@ -79,9 +77,8 @@
import io.smallrye.config.ConfigMappings.ConfigClassWithPrefix;
import io.smallrye.config.ConfigValue;
import io.smallrye.config.Converters;
import io.smallrye.config.DefaultValuesConfigSource;
import io.smallrye.config.EnvConfigSource;
import io.smallrye.config.KeyMap;
import io.smallrye.config.KeyMapBackedConfigSource;
import io.smallrye.config.ProfileConfigSourceInterceptor;
import io.smallrye.config.PropertiesConfigSource;
import io.smallrye.config.SecretKeys;
Expand Down Expand Up @@ -386,25 +383,21 @@ public List<ConfigClassWithPrefix> getBuildTimeVisibleMappings() {
public SmallRyeConfig initConfiguration(LaunchMode launchMode, Properties buildSystemProps,
Map<String, String> platformProperties) {
// now prepare & load the build configuration
final SmallRyeConfigBuilder builder = ConfigUtils.configBuilder(false, launchMode);
SmallRyeConfigBuilder builder = ConfigUtils.configBuilder(false, launchMode);
if (classLoader != null) {
builder.forClassLoader(classLoader);
}

final DefaultValuesConfigurationSource ds1 = new DefaultValuesConfigurationSource(getBuildTimePatternMap());
final DefaultValuesConfigurationSource ds2 = new DefaultValuesConfigurationSource(getBuildTimeRunTimePatternMap());
final PropertiesConfigSource pcs = new PropertiesConfigSource(buildSystemProps, "Build system");
DefaultValuesConfigurationSource ds1 = new DefaultValuesConfigurationSource(getBuildTimePatternMap());
DefaultValuesConfigurationSource ds2 = new DefaultValuesConfigurationSource(getBuildTimeRunTimePatternMap());
PropertiesConfigSource pcs = new PropertiesConfigSource(buildSystemProps, "Build system");
if (platformProperties.isEmpty()) {
builder.withSources(ds1, ds2, pcs);
} else {
final KeyMap<String> props = new KeyMap<>(platformProperties.size());
for (Map.Entry<String, String> prop : platformProperties.entrySet()) {
props.findOrAdd(new io.smallrye.config.NameIterator(prop.getKey())).putRootValue(prop.getValue());
}
final KeyMapBackedConfigSource platformConfigSource = new KeyMapBackedConfigSource("Quarkus platform",
// Our default value configuration source is using an ordinal of Integer.MIN_VALUE
// (see io.quarkus.deployment.configuration.DefaultValuesConfigurationSource)
Integer.MIN_VALUE + 1000, props);
// Our default value configuration source is using an ordinal of Integer.MIN_VALUE
// (see io.quarkus.deployment.configuration.DefaultValuesConfigurationSource)
DefaultValuesConfigSource platformConfigSource = new DefaultValuesConfigSource(platformProperties,
"Quarkus platform", Integer.MIN_VALUE + 1000);
builder.withSources(ds1, ds2, platformConfigSource, pcs);
}

Expand Down Expand Up @@ -536,7 +529,7 @@ ReadResult run() {
}

NameIterator ni = new NameIterator(propertyName);
if (ni.hasNext() && PropertiesUtil.isPropertyInRoot(registeredRoots, ni)) {
if (ni.hasNext() && PropertiesUtil.isPropertyInRoots(propertyName, registeredRoots)) {
// build time patterns
Container matched = buildTimePatternMap.match(ni);
boolean knownProperty = matched != null;
Expand Down Expand Up @@ -1051,7 +1044,7 @@ private Set<String> getAllProperties(final Set<String> registeredRoots) {
unprofiledProperty = property.substring(profileDot + 1);
}
}
if (filterPropertiesInRoots(List.of(unprofiledProperty), registeredRoots).iterator().hasNext()) {
if (PropertiesUtil.isPropertyInRoots(unprofiledProperty, registeredRoots)) {
sourcesProperties.add(property);
}
}
Expand Down Expand Up @@ -1130,8 +1123,7 @@ private SmallRyeConfig getConfigForRuntimeRecording() {
builder.setAddDefaultSources(false)
// Customizers may duplicate sources, but not much we can do about it, we need to run them
.addDiscoveredCustomizers()
// Read microprofile-config.properties, because we disabled the default sources
.withSources(classPathSources(META_INF_MICROPROFILE_CONFIG_PROPERTIES, classLoader));
.addPropertiesSources();

// TODO - Should we reset quarkus.config.location to not record from these sources?
for (ConfigSource configSource : config.getConfigSources()) {
Expand Down Expand Up @@ -1166,7 +1158,7 @@ public String getValue(final String propertyName) {
return config.getConfigValue(propertyName).getValue();
}
return null;
};
}
});
return builder.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
import io.quarkus.dev.testing.TestWatchedFiles;
import io.quarkus.maven.dependency.ResolvedDependency;
import io.quarkus.paths.PathList;
import io.quarkus.runtime.configuration.ApplicationPropertiesConfigSourceLoader;
import io.smallrye.config.DotEnvConfigSourceProvider;
import io.smallrye.config.SmallRyeConfig;
import io.smallrye.config.SmallRyeConfigBuilder;

Expand Down Expand Up @@ -565,11 +563,7 @@ private void handleApplicationPropertiesChange() {
}

private static SmallRyeConfig getMinimalConfig() {
return new SmallRyeConfigBuilder()
.addDefaultSources()
.withSources(new ApplicationPropertiesConfigSourceLoader.InFileSystem())
.withSources(new ApplicationPropertiesConfigSourceLoader.InClassPath())
.withSources(new DotEnvConfigSourceProvider()).build();
return new SmallRyeConfigBuilder().addDefaultSources().build();
}

private Optional<List<String>> getTrimmedListFromConfig(SmallRyeConfig updatedConfig, String property) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,12 @@ public interface NativeConfig {
String fileEncoding();

/**
* If all character sets should be added to the native image. This increases image size
* If all character sets should be added to the native executable.
* <p>
* Note that some extensions (e.g. the Oracle JDBC driver) also take this setting into account to enable support for all
* charsets at the extension level.
* <p>
* This increases image size.
*/
@WithDefault("false")
boolean addAllCharsets();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ public final class NativeImageBuildItem extends SimpleBuildItem {

private final Path path;
private final GraalVMVersion graalVMVersion;
private final boolean reused;

public NativeImageBuildItem(Path path, GraalVMVersion graalVMVersion) {
public NativeImageBuildItem(Path path, GraalVMVersion graalVMVersion, boolean reused) {
this.path = path;
this.graalVMVersion = graalVMVersion;
this.reused = reused;
}

public Path getPath() {
Expand All @@ -24,6 +26,10 @@ public GraalVMVersion getGraalVMInfo() {
return graalVMVersion;
}

public boolean isReused() {
return reused;
}

public static class GraalVMVersion {
private final String fullVersion;
private final String version;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ public NativeImageBuildItem build(NativeConfig nativeConfig, LocalesBuildTimeCon
if (nativeConfig.reuseExisting()) {
if (Files.exists(finalExecutablePath)) {
return new NativeImageBuildItem(finalExecutablePath,
NativeImageBuildItem.GraalVMVersion.unknown());
NativeImageBuildItem.GraalVMVersion.unknown(),
true);
}
}

Expand Down Expand Up @@ -297,7 +298,8 @@ public NativeImageBuildItem build(NativeConfig nativeConfig, LocalesBuildTimeCon
new NativeImageBuildItem.GraalVMVersion(graalVMVersion.fullVersion,
graalVMVersion.getVersionAsString(),
graalVMVersion.javaVersion.feature(),
graalVMVersion.distribution.name()));
graalVMVersion.distribution.name()),
false);
} catch (ImageGenerationFailureException e) {
throw e;
} catch (Exception e) {
Expand Down
Loading

0 comments on commit 600cb27

Please sign in to comment.