Skip to content

Commit

Permalink
quarkus update - Add a clean in mvn process-sources
Browse files Browse the repository at this point in the history
We need to clean the project before the next compilation as things have
changed a lot (e.g. in the case of a Quarkus 2.x -> 3.x update).
  • Loading branch information
gsmet committed Nov 30, 2023
1 parent e3ba23c commit c6ad1fb
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ public static void handle(MessageWriter log, BuildTool buildTool, Path baseDir,
}
}

private static void runMavenUpdate(MessageWriter log, Path baseDir, String rewritePluginVersion, String recipesGAV,
Path recipe,
boolean dryRun) {
final String mvnBinary = findMvnBinary(baseDir);
executeCommand(baseDir, getMavenUpdateCommand(mvnBinary, rewritePluginVersion, recipesGAV, recipe, dryRun), log);

// format the sources
executeCommand(baseDir, getMavenProcessSourcesCommand(mvnBinary), log);
}

private static void runGradleUpdate(MessageWriter log, Path baseDir, String rewritePluginVersion, String recipesGAV,
Path recipe, boolean dryRun) {
Path tempInit = null;
Expand Down Expand Up @@ -120,19 +130,10 @@ private static void propagateSystemPropertyIfSet(String name, List<String> comma
}
}

private static void runMavenUpdate(MessageWriter log, Path baseDir, String rewritePluginVersion, String recipesGAV,
Path recipe,
boolean dryRun) {
final String mvnBinary = findMvnBinary(baseDir);
executeCommand(baseDir, getMavenUpdateCommand(mvnBinary, rewritePluginVersion, recipesGAV, recipe, dryRun), log);

// format the sources
executeCommand(baseDir, getMavenProcessSourcesCommand(mvnBinary), log);
}

private static List<String> getMavenProcessSourcesCommand(String mvnBinary) {
List<String> command = new ArrayList<>();
command.add(mvnBinary);
command.add("clean");
command.add("process-sources");
final String mavenSettings = getMavenSettingsArg();
if (mavenSettings != null) {
Expand Down

0 comments on commit c6ad1fb

Please sign in to comment.