-
Notifications
You must be signed in to change notification settings - Fork 77
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
Artifact is resolved incorrectly - v5.46.3 #915
Comments
hi @torsten-liermann ; that "We can not reliably continue without this information." error is something we have addressed in That specific message such no longer occur when it was previously caused by dependencies where the .jar was present, but the pom.xml file is missing. I hope that already helps you there! |
Hi Tim, This is not the cause of the issue reported here. The problem is that OpenRewrite attempts to check a dependency, What is noteworthy about these two artifacts is that they have the same I tested version 5.47.0 with the same result. Even different maven versions, 3.8.8 and 3.9.9, show the same error pattern. I believe I have a good understanding of maven and was trying to avoid debugging the maven process. But if you have no idea, I suppose I have no choice but to bite the bullet and dive into debugging. :-( Here’s the stack trace as the maven plugin outputs it to the console as an ERROR:
|
So far, I have not been able to reproduce the issue in a small example. This small example here https://github.com/torsten-liermann/swingx-reproduce was meant to demonstrate the problem, but it is not sufficient yet. In the actual project, the parent hierarchy consists of four parents, with the two topmost parents being external. In the topmost parent, a property In the project's parent, the property The project is so large that I cannot fully analyze the hundreds of calls to the |
I am working on a larger Maven project and would find it difficult to provide the problem as a test case. However, perhaps the implementers of the Maven plugin might have an idea where the root cause of the issue lies. The task is the migration of
pom.xml
files.The Maven plugin is invoked via the command line:
mvn org.openrewrite.maven:rewrite-maven-plugin:5.46.3:run -Drewrite.configLocation=https://raw.githubusercontent.com/torsten-liermann/openrewrite-pom-manipulation/refs/heads/main/rewrite.yml -Drewrite.activeRecipes=MigrateEAPDependencies
At the 80th
pom.xml
file, OpenRewrite fails with the following error:The actual issue is that OpenRewrite uses an incorrect version number for this artifact. The correct version, set via a property in a parent
pom.xml
, is1.6.1
.In the dependency management section of the parent
pom.xml
, it is defined as follows:The version property is defined in the same parent
pom.xml
as:It's not an issue with the version property in dependency management. Even when I specify a fixed version there, the problem persists unchanged.
If the version is specified explicitly, it works.
The build runs successfully without OpenRewrite and correctly uses version
1.6.1
as expected.It is worth mentioning this transitive dependency (from the
effective-pom
):Is it possible that the artifact being checked is only identified by the artifactId and/or that the groupId is only checked using "contains"?
The text was updated successfully, but these errors were encountered: