-
Notifications
You must be signed in to change notification settings - Fork 107
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
dependencies with optional dependencies are not properly resolved. #125
Comments
Optional dependencies are according to the documentation only normal dependencies in the pom where they are defined. In your example guava is only a normal dependency within async-http-client. Projects that depend on async-http-client do not resolve this optional dependency. Hence it should be correct that the dependency on guava gets not resolved if it is declared to be optional for async-http-client. What error do you get? |
adding async-http-client as a dependency to dependencies section of japicmp maven plugin results in async-http-client dependency not being resolved error. |
According to my understanding of optional dependencies |
No, it should not. It should work exactly the same as if async-http-client was added as a dependency to the project pom. |
But The idea behind optional dependencies is that if you implement a facade for let's say different database projects, than you declare the dependencies in your facade project on the different database vendors as optionals. Clients to your facade project do only add the dependency they acutally need (e.g. H2 and not MySql, Oracle, etc.) and don't import all optional ones. But I could change japicmp that one can configure to also include optional dependencies. But then all optional dependencies are pulled in. But what if you don't have access to a specific optional dependency because it resides on a repository you don't have access to? And when I make it configurable that you can choose which optional depencendies to pull in, then it is the same as if you would add the optional dependency to your project. |
This is exactly how optional dependency should work. Problem is that when I include a dependency with optional dependencies into |
…le for optional dependency could not be resolved
OK. Thanks for the details regarding The dependencies listed here are resolved by japicmp and it checks that all dependencies could be resolved properly. Otherwise japicmp threw an exception. As I configured the I have now introduced a check if the |
for example dependency on com.ning:async-http-client:1.7.x leads to an error due to it's optional dependencies on com.google.guava:guava.
The text was updated successfully, but these errors were encountered: