-
Notifications
You must be signed in to change notification settings - Fork 376
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
Error during resolving unused dependency #5136
Comments
This error can be ignored by commenting this out: https://github.com/openrewrite/rewrite-maven-plugin/blob/e30c8e7afdc3c30d13a0237d5fcea8a7680a9a63/src/main/java/org/openrewrite/maven/MavenMojoProjectParser.java#L588 |
I think you raise a very good point here: If an unresolvable dependency is listed in a dependency management section, this should not cause any issues, if this dependency isn't actually used anywhere. Thanks for reporting this! |
Actually, it seems like OpenRewrite already allows for this. Can you maybe provide some more details of your setup or maybe even a test case to reproduce the issue? |
You can create an empty maven project, and add that dependency only. Run OpenRewrite on it with maven plugin |
What repo would I use for the test, as this artifact isn't published on Maven Central? I don't get any failures when I have this: <project>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<version>1</version>
<repositories>
<repository>
<id>some-repo</id>
<url>https://packages.atlassian.com/maven-public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-api</artifactId>
<version>5.0.4</version>
</dependency>
</dependencies>
</project> |
Oh, I see the problem. You may have to create such a scenario: In my case: |
I am using
How are you running OpenRewrite?
I am using Maven plugin to run OpenRewrite
What did you expect to see?
Running normally.
What did you see instead?
Unable to resolve dependency of
com.atlassian.httpclient:atlassian-httpclient-api:0.22.3
, which is introduced bycom.atlassian.platform:platform:3.1.7
in dependencyManagement.jira-rest-java-client-api
definedcom.atlassian.httpclient:atlassian-httpclient-api:1.0.0
in its own pom.And
com.atlassian.httpclient:atlassian-httpclient-api:0.22.3
is not in our central.The text was updated successfully, but these errors were encountered: