-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[discuss] Enables to resolve direct pom dependencies (not transitive ones) location as project.dependencies. reference - eases javaagent usage for ex #1281
base: master
Are you sure you want to change the base?
Conversation
…tion as project.dependencies. reference - eases javaagent usage for ex
So the idea is that a given group and artifact ID gets resolved to the following property:
Only disadvantage of your solution: I don't see where the groupId ends and the artifact ID begins. But that's probably not going to clash. This is very helpful for agents. Other ideas: Change the default lifecycle XML to include the property goal of the dependency plugin. Way smaller change. |
I forgot this file doesn't exist anymore. But I think you get what I'm referring to. |
If it clashes we have other troubles and using another sep looks wrong in placeholders to me.
|
Thank you for the explanation, that makes excellent documentation! 😃 |
This really looks like a temporary hack for agents to being supported by Surefire...
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've now read the full mockito thread. I get a better understand. While I'd be ok with the goal provided by the PR (ease or configuration for agents ), I think the current PR is wrong as it is implemented when the model is built, before dependencies are resolved. That means the version will be empty in most cases (when using managed dependencies).
So I'm not sure the current PR is worth it.
Well any later phase is wrong cause then it depends if the interpolation will be reprocessed or not so think it is the least bad compromise to work immediately but agree on your point, the limitation is to explicit define the dependency in the project (potentially using a property but without anything implicit). |
@rmannibucau Wouldn't it be better to enhance the |
@gnodet I'm mixed about it since it assumes everything is wired in plugins conf and plugins/extensions don't read any other property so not sure it is really better today, maybe let's wait to see what mockito picks? |
Sample proposal to try to ease mockito/mockito#3037.
Main issue of this PR is to not support transitive deps but think it is not a bad compromise (using
javaagent
"scope" would be as bad + totally wrong/broken in terms of design - would loose the scope to be clear, and adding an attribute sounds overkill until we get something like gradle configuration).Main advantage is it makes it easy to work for everybody and stays aligned on the JVM (explicit toggling with ordering) for javaagent cases.
So overall think it can be a good compromise. If validated we have to document it properly - probably in maven site and surefire one?
@bmarwell if you want to try/take this over, but thought a PR would be easier than slack ;)