Search for class usages across maven dependencies

已回答

Is there a way to search for usages of a class within a project across all modules and all versions of maven dependencies?

Essentially I am looking for an answer to this question: (https://stackoverflow.com/questions/35931302/intellij-find-usages-and-maven-artifacts)

My project uses microservices, and they are on different versions of my library dependency. While working on the library, I want to find all usages of a class regardless of version, especially because the library is on a -SNAPSHOT version, so finding usages does not find any results.

Thanks

0

Hello Eric,

We have similar requests on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-193213, https://youtrack.jetbrains.com/issue/IDEA-103257

Feel free to vote for them and leave suggestions in comments.

0
Avatar
Permanently deleted user

@Yaroslav Bedrov: the issues mentioned are not addressing the same problem. I'm having the same problem like @Eric Mulcahy and the problem occurs always when having multiple dependencies in different versions. But the usage to find is not always version dependent. Looking at the exact version may be correct in general but it's just too correct for the way of working with libs and versioning. We even use gitflow that gives automatic versioning features for the version number increments and -SNAPSHOT versions for releasing and in the develop branches. In most cases the pom will use a release version of a library. But when a change to the library is required the version of the library in the same project will be different (-SNAPSHOT). The pom will nearly never get a dependency with a -SNAPSHOT version checked into the (git) repository. Using it locally for testing is OK but we don't commit a -SNAPSHOT usage. 

 

Maybe the search regardless of version could be an option to the search.

0

Please report separate  request on YouTrack: http://youtrack.jetbrains.com/issues/IDEA.

0

请先登录再写评论。