Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v9.7.0] Missing transitive dependencies in multi-module project when modules are excluded and resolved version is 0.0.0-SNAPSHOT #292

Open
wacker opened this issue Feb 28, 2024 · 0 comments
Assignees
Labels

Comments

@wacker
Copy link

wacker commented Feb 28, 2024

Version: 9.7.0

Given a multi-module Maven project maven-versioning-test with parent and two modules a and b where b depends on a.

An initial git tag v0.0.0 is set on master and there are some changes in a branch, so this ref matches:

<ref type="branch">
  <describeTagPattern><![CDATA[^v(?<name>[0-9]+\.[0-9]+\.[0-9]+)$]]></describeTagPattern>
  <version>${describe.tag.name}-SNAPSHOT</version>
</ref>

and -- as expected -- results in version = 0.0.0-SNAPSHOT.

Now trying to compile the project without module a (so it should be read from the local repository).

mvn compile --projects '!a'

causes missing transitive dependencies:

[INFO] maven-versioning-test:a
[WARNING] The POM for maven-versioning-test:a:jar:0.0.0-SNAPSHOT is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

Adding -X reveals more detail:

[INFO] maven-versioning-test:a
[DEBUG] set parent version to 0.0.0-SNAPSHOT (maven-versioning-test:parent:0.0.0-SNAPSHOT)
[DEBUG] generate /home/user/.m2/repository/maven-versioning-test/a/0.0.0-SNAPSHOT/.git-versioned-pom.xml
[WARNING] The POM for maven-versioning-test:a:jar:0.0.0-SNAPSHOT is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model
[FATAL] Non-readable POM /home/user/.m2/repository/maven-versioning-test/a/0.0.0-SNAPSHOT/a-0.0.0-SNAPSHOT.pom: /home/user/.m2/repository/maven-versioning-test/a/0.0.0-SNAPSHOT/pom.xml @ 

There should be no attempt to read pom.xml from or create .git-versioned-pom.xml inside the local repository.

This behavior could not be observed in the previous version 9.6.6 and therefore is probably related to

@wacker wacker changed the title [9.7.0] Missing transitive dependencies in multi-module project when modules are excluded and resolved version is 0.0.0-SNAPSHOT [v9.7.0] Missing transitive dependencies in multi-module project when modules are excluded and resolved version is 0.0.0-SNAPSHOT Feb 28, 2024
@qoomon qoomon self-assigned this Feb 28, 2024
@qoomon qoomon added the bug label Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants