Skip to content

Commit be6bb23

Browse files
committed
Upgrade to Quarkus 3.7.4
1 parent 20c293d commit be6bb23

File tree

7 files changed

+1200
-1193
lines changed

7 files changed

+1200
-1193
lines changed

generated-platform-project/quarkus-maven-plugin/src/main/java/io/quarkus/maven/CreateProjectMojo.java

+18-12
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,10 @@ public void execute() throws MojoExecutionException {
276276
}
277277

278278
askTheUserForMissingValues();
279-
if (projectArtifactId != DEFAULT_ARTIFACT_ID && !OK_ID.matcher(projectArtifactId).matches()) {
279+
if (!DEFAULT_ARTIFACT_ID.equals(projectArtifactId) && !OK_ID.matcher(projectArtifactId).matches()) {
280280
throw new MojoExecutionException(String.format(BAD_IDENTIFIER, "artifactId", projectArtifactId));
281281
}
282-
if (projectGroupId != DEFAULT_GROUP_ID && !OK_ID.matcher(projectGroupId).matches()) {
282+
if (!DEFAULT_GROUP_ID.equals(projectGroupId) && !OK_ID.matcher(projectGroupId).matches()) {
283283
throw new MojoExecutionException(String.format(BAD_IDENTIFIER, "groupId", projectGroupId));
284284
}
285285

@@ -389,16 +389,7 @@ private void askTheUserForMissingValues() throws MojoExecutionException {
389389
// If the user has disabled the interactive mode or if the user has specified the artifactId, disable the
390390
// user interactions.
391391
if (!session.getRequest().isInteractiveMode() || shouldUseDefaults()) {
392-
if (isBlank(projectArtifactId)) {
393-
// we need to set it for the project directory
394-
projectArtifactId = DEFAULT_ARTIFACT_ID;
395-
}
396-
if (isBlank(projectGroupId)) {
397-
projectGroupId = DEFAULT_GROUP_ID;
398-
}
399-
if (isBlank(projectVersion)) {
400-
projectVersion = DEFAULT_VERSION;
401-
}
392+
setProperDefaults();
402393
return;
403394
}
404395

@@ -427,12 +418,27 @@ private void askTheUserForMissingValues() throws MojoExecutionException {
427418
input -> noCode = input.startsWith("n"));
428419

429420
prompter.collectInput();
421+
} else {
422+
setProperDefaults();
430423
}
431424
} catch (IOException e) {
432425
throw new MojoExecutionException("Unable to get user input", e);
433426
}
434427
}
435428

429+
private void setProperDefaults() {
430+
if (isBlank(projectArtifactId)) {
431+
// we need to set it for the project directory
432+
projectArtifactId = DEFAULT_ARTIFACT_ID;
433+
}
434+
if (isBlank(projectGroupId)) {
435+
projectGroupId = DEFAULT_GROUP_ID;
436+
}
437+
if (isBlank(projectVersion)) {
438+
projectVersion = DEFAULT_VERSION;
439+
}
440+
}
441+
436442
private boolean shouldUseDefaults() {
437443
// Must be called before user input
438444
return projectArtifactId != null;

generated-platform-project/quarkus-maven-plugin/src/main/java/io/quarkus/maven/DevMojo.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,7 @@ private String handleAutoCompile() throws MojoExecutionException {
592592
if (!e.getGoals().isEmpty()) {
593593
goalPrefix = getMojoDescriptor(p, e.getGoals().get(0)).getPluginDescriptor().getGoalPrefix();
594594
pluginPrefixes.put(goalPrefix, p);
595+
pluginPrefixes.put(p.getId(), p);
595596
}
596597
if (e.getPhase() != null) {
597598
phaseExecutions.computeIfAbsent(e.getPhase(), k -> new ArrayList<>()).add(new PluginExec(p, goalPrefix, e));
@@ -630,7 +631,7 @@ private String handleAutoCompile() throws MojoExecutionException {
630631
if (goal.endsWith(currentGoal)) {
631632
break;
632633
}
633-
var colon = goal.indexOf(':');
634+
var colon = goal.lastIndexOf(':');
634635
if (colon >= 0) {
635636
var plugin = pluginPrefixes.get(goal.substring(0, colon));
636637
if (plugin == null) {

0 commit comments

Comments
 (0)