Skip to content

Commit

Permalink
Merge pull request #28356 from gsmet/2.13.1-backports-1
Browse files Browse the repository at this point in the history
2.13.1 backports 1
  • Loading branch information
gsmet authored Oct 3, 2022
2 parents ba09361 + 5d6b3a3 commit c26ea0e
Show file tree
Hide file tree
Showing 164 changed files with 3,049 additions and 1,075 deletions.
2 changes: 1 addition & 1 deletion adr/0001-community-discussions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ User looking for a job involving Quarkus - where do he go look ?
Not proposed since it is just another waterhose of info with no good ability to ignore/consume as needed/wanted.

=== enable discussions on github.com/quarkusio/quarkus-insights
Considered as quarkus insights is an existing "community" and let us have separate permissons for moderators/triage but some suggested it might be hard to find.
Considered as quarkus insights is an existing "community" and let us have separate permissions for moderators/triage but some suggested it might be hard to find.

=== enable discussions on github.com/quarkusio/community
Downside is that labels etc. would need to be kept in sync and that searches in github.com/quarkusio would not show up community/discussions.
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,8 +51,8 @@
<smallrye-context-propagation.version>1.2.2</smallrye-context-propagation.version>
<smallrye-reactive-streams-operators.version>1.0.13</smallrye-reactive-streams-operators.version>
<smallrye-reactive-types-converter.version>2.7.0</smallrye-reactive-types-converter.version>
<smallrye-mutiny-vertx-binding.version>2.26.0</smallrye-mutiny-vertx-binding.version>
<smallrye-reactive-messaging.version>3.18.0</smallrye-reactive-messaging.version>
<smallrye-mutiny-vertx-binding.version>2.27.0</smallrye-mutiny-vertx-binding.version>
<smallrye-reactive-messaging.version>3.20.0</smallrye-reactive-messaging.version>
<smallrye-stork.version>1.1.2</smallrye-stork.version>
<jakarta.activation.version>1.2.1</jakarta.activation.version>
<jakarta.annotation-api.version>1.3.5</jakarta.annotation-api.version>
Expand Down Expand Up @@ -88,9 +88,9 @@
<commons-lang3.version>3.12.0</commons-lang3.version>
<commons-codec.version>1.15</commons-codec.version>
<classmate.version>1.5.1</classmate.version>
<hibernate-orm.version>5.6.11.Final</hibernate-orm.version> <!-- When updating, align bytebuddy.version to Hibernate needs as well (just below): -->
<hibernate-orm.version>5.6.12.Final</hibernate-orm.version> <!-- When updating, align bytebuddy.version to Hibernate needs as well (just below): -->
<bytebuddy.version>1.12.9</bytebuddy.version> <!-- Version controlled by Hibernate ORM's needs -->
<hibernate-reactive.version>1.1.7.Final</hibernate-reactive.version>
<hibernate-reactive.version>1.1.8.Final</hibernate-reactive.version>
<hibernate-validator.version>6.2.5.Final</hibernate-validator.version>
<hibernate-search.version>6.1.7.Final</hibernate-search.version>
<narayana.version>5.13.1.Alpha1</narayana.version>
Expand All @@ -109,7 +109,7 @@
<wildfly-client-config.version>1.0.1.Final</wildfly-client-config.version>
<wildfly-elytron.version>1.20.1.Final</wildfly-elytron.version>
<jboss-threads.version>3.4.3.Final</jboss-threads.version>
<vertx.version>4.3.3</vertx.version>
<vertx.version>4.3.4</vertx.version>

<httpclient.version>4.5.13</httpclient.version>
<httpcore.version>4.4.15</httpcore.version>
Expand All @@ -118,7 +118,7 @@
<quartz.version>2.3.2</quartz.version>
<h2.version>2.1.214</h2.version>
<postgresql-jdbc.version>42.5.0</postgresql-jdbc.version>
<mariadb-jdbc.version>3.0.7</mariadb-jdbc.version>
<mariadb-jdbc.version>3.0.8</mariadb-jdbc.version>
<mysql-jdbc.version>8.0.30</mysql-jdbc.version>
<mssql-jdbc.version>11.2.0.jre11</mssql-jdbc.version>
<adal4j.version>1.6.7</adal4j.version>
Expand All @@ -127,10 +127,10 @@
<db2-jdbc.version>11.5.7.0</db2-jdbc.version>
<shrinkwrap.version>1.2.6</shrinkwrap.version>
<rest-assured.version>4.5.1</rest-assured.version>
<junit.jupiter.version>5.9.0</junit.jupiter.version>
<junit.jupiter.version>5.9.1</junit.jupiter.version>
<junit-pioneer.version>1.5.0</junit-pioneer.version>
<testng.version>6.14.2</testng.version>
<infinispan.version>13.0.10.Final</infinispan.version>
<infinispan.version>13.0.11.Final</infinispan.version>
<infinispan.protostream.version>4.4.3.Final</infinispan.protostream.version>
<caffeine.version>2.9.3</caffeine.version>
<netty.version>4.1.79.Final</netty.version>
Expand All @@ -156,10 +156,10 @@
<maven-invoker.version>3.2.0</maven-invoker.version>
<awaitility.version>4.2.0</awaitility.version>
<jboss-logmanager.version>1.0.10</jboss-logmanager.version>
<flyway.version>9.3.0</flyway.version>
<flyway.version>9.3.1</flyway.version>
<yasson.version>1.0.11</yasson.version>
<liquibase.version>4.16.0</liquibase.version>
<snakeyaml.version>1.32</snakeyaml.version>
<liquibase.version>4.16.1</liquibase.version>
<snakeyaml.version>1.33</snakeyaml.version>
<osgi.version>6.0.0</osgi.version>
<mongo-client.version>4.7.1</mongo-client.version>
<mongo-crypt.version>1.5.2</mongo-crypt.version>
Expand Down
5 changes: 5 additions & 0 deletions build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,11 @@
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>${asciidoctor-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>de.thetaphi</groupId>
<artifactId>forbiddenapis</artifactId>
<version>${forbiddenapis-maven-plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down
3 changes: 3 additions & 0 deletions core/deployment/banned-signatures.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@defaultMessage Don't use Maven classes. They won't be available when using Gradle.
org.apache.maven.**
org.codehaus.plexus.**
22 changes: 22 additions & 0 deletions core/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,28 @@
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>de.thetaphi</groupId>
<artifactId>forbiddenapis</artifactId>
<executions>
<execution>
<id>verify-forbidden-apis</id>
<configuration>
<!-- if the used Java version is too new, don't fail, just do nothing: -->
<failOnUnsupportedJava>false</failOnUnsupportedJava>
<signaturesFiles>
<signaturesFile>./banned-signatures.txt</signaturesFile>
</signaturesFiles>
<failOnMissingClasses>false</failOnMissingClasses>
<ignoreSignaturesOfMissingClasses>true</ignoreSignaturesOfMissingClasses>
</configuration>
<phase>compile</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,18 @@ public class DebugConfig {
*/
@ConfigItem
Optional<String> generatedClassesDir;

/**
* If set to a directory, all transformed classes (e.g. Panache entities) will be written into that directory
*/
@ConfigItem
Optional<String> transformedClassesDir;

/**
* If set to a directory, ZIG files for generated code will be written into that directory.
* <p>
* A ZIG file is a textual representation of the generated code that is referenced in the stacktraces.
*/
@ConfigItem
Optional<String> generatedSourcesDir;
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public class QuarkusAugmentor {
private final Path targetDir;
private final ApplicationModel effectiveModel;
private final String baseName;
private final String originalBaseName;
private final boolean rebuild;
private final boolean auxiliaryApplication;
private final Optional<DevModeType> auxiliaryDevModeType;
Expand All @@ -75,6 +76,7 @@ public class QuarkusAugmentor {
this.targetDir = builder.targetDir;
this.effectiveModel = builder.effectiveModel;
this.baseName = builder.baseName;
this.originalBaseName = builder.originalBaseName;
this.deploymentClassLoader = builder.deploymentClassLoader;
this.rebuild = builder.rebuild;
this.devModeType = builder.devModeType;
Expand Down Expand Up @@ -149,7 +151,7 @@ public BuildResult run() throws Exception {
.produce(new LaunchModeBuildItem(launchMode,
devModeType == null ? Optional.empty() : Optional.of(devModeType), auxiliaryApplication,
auxiliaryDevModeType, test))
.produce(new BuildSystemTargetBuildItem(targetDir, baseName, rebuild,
.produce(new BuildSystemTargetBuildItem(targetDir, baseName, originalBaseName, rebuild,
buildSystemProperties == null ? new Properties() : buildSystemProperties))
.produce(new AppModelProviderBuildItem(effectiveModel));
for (PathCollection i : additionalApplicationArchives) {
Expand Down Expand Up @@ -194,6 +196,8 @@ public static Builder builder() {

public static final class Builder {

private static final String QUARKUS_APPLICATION = "quarkus-application";

public DevModeType auxiliaryDevModeType;
boolean rebuild;
List<PathCollection> additionalApplicationArchives = new ArrayList<>();
Expand All @@ -208,7 +212,8 @@ public static final class Builder {
Properties buildSystemProperties;

ApplicationModel effectiveModel;
String baseName = "quarkus-application";
String baseName = QUARKUS_APPLICATION;
String originalBaseName = QUARKUS_APPLICATION;
ClassLoader deploymentClassLoader;
DevModeType devModeType;
boolean test;
Expand Down Expand Up @@ -302,6 +307,11 @@ public Builder setBaseName(String baseName) {
return this;
}

public Builder setOriginalBaseName(String originalBaseName) {
this.originalBaseName = originalBaseName;
return this;
}

public Properties getBuildSystemProperties() {
return buildSystemProperties;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,23 @@
public final class NativeImageResourceBundleBuildItem extends MultiBuildItem {

private final String bundleName;
private final String moduleName;

public NativeImageResourceBundleBuildItem(String bundleName) {
this.bundleName = bundleName;
this.moduleName = null;
}

public NativeImageResourceBundleBuildItem(String bundleName, String moduleName) {
this.bundleName = bundleName;
this.moduleName = moduleName;
}

public String getBundleName() {
return bundleName;
}

public String getModuleName() {
return moduleName;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import java.util.function.Consumer;
import java.util.function.Predicate;

import org.apache.maven.shared.utils.cli.CommandLineException;
import org.apache.maven.shared.utils.cli.CommandLineUtils;
import org.eclipse.microprofile.config.spi.ConfigProviderResolver;
import org.jboss.logging.Logger;
import org.jboss.logmanager.formatters.ColorPatternFormatter;
Expand All @@ -47,6 +45,7 @@
import io.quarkus.deployment.dev.testing.MessageFormat;
import io.quarkus.deployment.dev.testing.TestSupport;
import io.quarkus.deployment.steps.ClassTransformingBuildStep;
import io.quarkus.deployment.util.CommandLineUtil;
import io.quarkus.dev.appstate.ApplicationStartException;
import io.quarkus.dev.console.DevConsoleManager;
import io.quarkus.dev.spi.DeploymentFailedStartHandler;
Expand Down Expand Up @@ -122,8 +121,8 @@ public void accept(Integer integer) {
public void accept(String args) {
try {
context.setArgs(
CommandLineUtils.translateCommandline(args));
} catch (CommandLineException e) {
CommandLineUtil.translateCommandline(args));
} catch (Exception e) {
log.error("Failed to parse command line", e);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;

import org.apache.maven.shared.utils.cli.CommandLineUtils;
import org.jboss.logging.Logger;

import io.quarkus.bootstrap.app.QuarkusBootstrap;
import io.quarkus.deployment.dev.DevModeContext.ModuleInfo;
import io.quarkus.deployment.util.CommandLineUtil;
import io.quarkus.maven.dependency.ArtifactKey;
import io.quarkus.runtime.logging.JBossVersion;
import io.quarkus.runtime.util.JavaVersionUtil;
Expand Down Expand Up @@ -476,7 +476,7 @@ protected void prepare() throws Exception {
args.add("-jar");
args.add(tempFile.getAbsolutePath());
if (applicationArgs != null) {
args.addAll(Arrays.asList(CommandLineUtils.translateCommandline(applicationArgs)));
args.addAll(Arrays.asList(CommandLineUtil.translateCommandline(applicationArgs)));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import org.jboss.jandex.Indexer;
import org.jboss.logging.Logger;

import io.quarkus.bootstrap.runner.DevModeMediator;
import io.quarkus.bootstrap.runner.Timing;
import io.quarkus.changeagent.ClassChangeAgent;
import io.quarkus.deployment.dev.DevModeContext.ModuleInfo;
Expand Down Expand Up @@ -602,15 +603,22 @@ public Set<String> syncState(Map<String, String> fileHashes) {
ret.add(i.getKey());
}
}
List<Path> removedFiles = List.of();
for (Map.Entry<String, String> remaining : ourHashes.entrySet()) {
String file = remaining.getKey();
if (file.endsWith("META-INF/MANIFEST.MF") || file.contains("META-INF/maven")
|| !file.contains("/")) {
//we have some filters, for files that we don't want to delete
continue;
}
log.info("Deleting removed file " + file);
Files.deleteIfExists(applicationRoot.resolve(file));
log.info("Scheduled for removal " + file);
if (removedFiles.isEmpty()) {
removedFiles = new ArrayList<>();
}
removedFiles.add(applicationRoot.resolve(file));
}
if (!removedFiles.isEmpty()) {
DevModeMediator.removedFiles.addLast(removedFiles);
}
return ret;
} catch (IOException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ ApplicationArchivesBuildItem build(
removedResources.put(new GACT(entry.getKey().split(":")), entry.getValue());
}

// Add resources removed from the classpath by extensions
removedResources.putAll(curateOutcomeBuildItem.getApplicationModel().getRemovedResources());

List<ApplicationArchive> applicationArchives = scanForOtherIndexes(buildCloseables,
appMarkers, root, additionalApplicationArchiveBuildItem, indexDependencyBuildItems, indexCache,
curateOutcomeBuildItem, removedResources);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,13 @@ public Index apply(PathVisit visit) {
}
try (InputStream in = Files.newInputStream(visit.getPath())) {
IndexReader reader = new IndexReader(in);
if (reader.getIndexVersion() < REQUIRED_INDEX_VERSION) {
log.warnf(
"Re-indexing %s - at least Jandex 2.1 must be used to index an application dependency",
visit.getPath());
return null;
}
try {
if (reader.getIndexVersion() < REQUIRED_INDEX_VERSION) {
log.warnf(
"Re-indexing %s - at least Jandex 2.1 must be used to index an application dependency",
visit.getPath());
return null;
}
return reader.read();
} catch (UnsupportedVersion e) {
throw new UnsupportedVersion(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ public void accept(CuratedApplication curatedApplication, Map<String, Object> re
if (quarkusBootstrap.getBaseName() != null) {
builder.setBaseName(quarkusBootstrap.getBaseName());
}
if (quarkusBootstrap.getOriginalBaseName() != null) {
builder.setOriginalBaseName(quarkusBootstrap.getOriginalBaseName());
}

boolean auxiliaryApplication = curatedApplication.getQuarkusBootstrap().isAuxiliaryApplication();
builder.setAuxiliaryApplication(auxiliaryApplication);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,28 @@ public final class BuildSystemTargetBuildItem extends SimpleBuildItem {

private final Path outputDirectory;
private final String baseName;
private final String originalBaseName;
private final boolean rebuild;
private final Properties buildSystemProps;

/**
* @deprecated in favor of {@link #BuildSystemTargetBuildItem(Path, String, String, boolean, Properties)}
*
* @param outputDirectory build output directory
* @param baseName base runner name
* @param rebuild indicates whether the application is being re-built
* @param buildSystemProps build system properties
*/
@Deprecated(forRemoval = true)
public BuildSystemTargetBuildItem(Path outputDirectory, String baseName, boolean rebuild, Properties buildSystemProps) {
this(outputDirectory, baseName, baseName, rebuild, buildSystemProps);
}

public BuildSystemTargetBuildItem(Path outputDirectory, String baseName, String originalBaseName, boolean rebuild,
Properties buildSystemProps) {
this.outputDirectory = outputDirectory;
this.baseName = baseName;
this.originalBaseName = originalBaseName;
this.rebuild = rebuild;
this.buildSystemProps = buildSystemProps;
}
Expand All @@ -30,6 +46,10 @@ public String getBaseName() {
return baseName;
}

public String getOriginalBaseName() {
return originalBaseName;
}

public boolean isRebuild() {
return rebuild;
}
Expand Down
Loading

0 comments on commit c26ea0e

Please sign in to comment.