Skip to content

Commit ac43aae

Browse files
authored
Merge pull request #31598 from gsmet/update-command
Make printed update command compatible with Windows
2 parents 2f927eb + e5c57fa commit ac43aae

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/handlers/UpdateProjectCommandHandler.java

+18-5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import java.util.List;
1414
import java.util.Map;
1515
import java.util.Objects;
16+
import java.util.Set;
1617
import java.util.stream.Collectors;
1718

1819
import io.quarkus.bootstrap.model.ApplicationModel;
@@ -70,6 +71,14 @@ public QuarkusCommandOutcome execute(QuarkusCommandInvocation invocation) throws
7071
logUpdates(currentState, latestCatalog, false, perModule, invocation.getQuarkusProject().log());
7172

7273
if (generateRewriteConfig) {
74+
Set<String> additionalSourceFiles = Set.of("**/META-INF/services/**",
75+
"**/*.txt",
76+
"**/*.adoc",
77+
"**/*.md",
78+
"**/src/main/codestarts/**/*.java",
79+
"**/src/test/resources/__snapshots__/**/*.java",
80+
"**/*.kt");
81+
7382
QuarkusUpdates.ProjectUpdateRequest request = new QuarkusUpdates.ProjectUpdateRequest(
7483
projectQuarkusPlatformBom.getVersion(), targetPlatformVersion);
7584
try {
@@ -78,11 +87,15 @@ public QuarkusCommandOutcome execute(QuarkusCommandInvocation invocation) throws
7887
QuarkusProjectHelper.artifactResolver(), request);
7988
invocation.log().info("Project update recipe has been created:\n%s", tempFile.toString());
8089

81-
invocation.log().info("The command to update this project: \n" +
82-
"mvn org.openrewrite.maven:rewrite-maven-plugin:4.39.0:run \\\n" +
83-
" -Drewrite.configLocation=%s \\\n" +
84-
" -DactiveRecipes=%s -e",
85-
tempFile.toString(), RECIPE_IO_QUARKUS_OPENREWRITE_QUARKUS);
90+
invocation.log().info("The commands to update this project: \n" +
91+
"./mvnw -e org.openrewrite.maven:rewrite-maven-plugin:4.39.0:run \\\n" +
92+
" -D\"rewrite.configLocation=%s\" \\\n" +
93+
" -D\"activeRecipes=%s\" \\\n" +
94+
" -D\"plainTextMasks=%s\" \\\n" +
95+
" -D\"rewrite.pomCacheEnabled=false\" \n" +
96+
"./mvnw process-sources",
97+
tempFile.toString(), RECIPE_IO_QUARKUS_OPENREWRITE_QUARKUS,
98+
String.join(",", additionalSourceFiles));
8699

87100
} catch (IOException e) {
88101
throw new QuarkusCommandException("Failed to create project update recipe", e);

0 commit comments

Comments
 (0)