Skip to content

Commit

Permalink
Merge pull request #32342 from aloubyansky/avoid-deprecated-maven-api
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Apr 2, 2023
2 parents 95e97b0 + 42ac5ba commit 4fca0d7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
15 changes: 11 additions & 4 deletions devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -789,10 +789,17 @@ private void addProject(MavenDevModeLauncher.Builder builder, ResolvedDependency
Set<Path> testResourcePaths;
List<Profile> activeProfiles = Collections.emptyList();

final MavenProject mavenProject = module.getClassifier().isEmpty()
? session.getProjectMap()
.get(String.format("%s:%s:%s", module.getGroupId(), module.getArtifactId(), module.getVersion()))
: null;
MavenProject mavenProject = null;
if (module.getClassifier().isEmpty()) {
for (MavenProject p : session.getAllProjects()) {
if (module.getArtifactId().equals(p.getArtifactId())
&& module.getGroupId().equals(p.getGroupId())
&& module.getVersion().equals(p.getVersion())) {
mavenProject = p;
break;
}
}
}
final ArtifactSources sources = module.getSources();
if (mavenProject == null) {
if (sources == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public class UpdateMojo extends QuarkusProjectStateMojoBase {
@Parameter(property = "stream", required = false)
private String stream;

@Component
@Parameter(defaultValue = "${session}", readonly = true)
private MavenSession mavenSession;

@Component
Expand Down

0 comments on commit 4fca0d7

Please sign in to comment.