Skip to content

Commit

Permalink
Add Maven BuildTool marker to .mvn/maven.config (#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek authored Feb 28, 2024
1 parent f0e1392 commit a482eff
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
// -----------------------------------------------------------------------------------------------------------------
public class MavenMojoProjectParser {

private static final String MVN_MAVEN_CONFIG = ".mvn/maven.config";
@Nullable
public static MavenPomCache POM_CACHE;

Expand Down Expand Up @@ -202,8 +203,9 @@ public Stream<SourceFile> listSourceFiles(MavenProject mavenProject, @Nullable X
.map(addProvenance(baseDir, projectProvenance, null));
logDebug(mavenProject, "Parsed " + (alreadyParsed.size() - sourcesParsedBefore) + " additional files found within the project.");
} else {
// Only parse Maven wrapper files, such that UpdateMavenWrapper can use the version information.
// Only parse Maven wrapper related files, such that UpdateMavenWrapper can use the version information.
parsedResourceFiles = Stream.of(
Paths.get(MVN_MAVEN_CONFIG),
MavenWrapper.WRAPPER_BATCH_LOCATION,
MavenWrapper.WRAPPER_JAR_LOCATION,
MavenWrapper.WRAPPER_PROPERTIES_LOCATION,
Expand Down Expand Up @@ -533,7 +535,7 @@ public Map<MavenProject, Xml.Document> parseMaven(List<MavenProject> mavenProjec
for (MavenProject mavenProject : mavenProjects) {
mavenSession.getProjectDependencyGraph().getUpstreamProjects(mavenProject, true).forEach(p -> collectPoms(p, allPoms));
}
MavenParser.Builder mavenParserBuilder = MavenParser.builder().mavenConfig(baseDir.resolve(".mvn/maven.config"));
MavenParser.Builder mavenParserBuilder = MavenParser.builder().mavenConfig(baseDir.resolve(MVN_MAVEN_CONFIG));

MavenSettings settings = buildSettings();
MavenExecutionContextView mavenExecutionContext = MavenExecutionContextView.view(ctx);
Expand Down

0 comments on commit a482eff

Please sign in to comment.