Skip to content

Maven: elements inside XML comments are read as part of the POM #212

Closed

Description

@FredApps

parsePom (src/repo/adapters/maven.ts) reads tags with regular expressions over the raw XML, comments included. A commented-out element counts as real.

<!-- library/pom.xml -->
<project>
  <modelVersion>4.0.0</modelVersion>
  <!-- renamed from <artifactId>legacy-library</artifactId> -->
  <groupId>example</groupId>
  <artifactId>library</artifactId>
  <version>1</version>
</project>

application/pom.xml depends on example:library.

Expected: a change to library/src/main/java/example/Library.java selects LibraryTest and AppTest.

Actual: the module is identified as legacy-library, so application does not link to it. Only LibraryTest is selected, with no fallback.

A commented-out <sourceDirectory> also adds the custom source roots require full validation blocker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions