Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij: Search through the source of maven dependencies in a project

Is it possible to search for a bit of text through the source code of all the maven dependencies of a project?

For example: If you import the following sample maven project: https://github.com/ajorpheus/javadoc-mem-test/tree/search-in-jars, searching for tempHeaders should turn up AbstractClientHttpRequest.java as a search result.

Is there a plugin that allows one to do this?

If Intellij does not support this, would you know of an IDE-agnostic way to do this given a maven project? I have looked at tools like jarexplorer but they don't seem to do the job.

like image 917
Ashutosh Jindal Avatar asked Apr 17 '14 09:04

Ashutosh Jindal


People also ask

How do I search dependencies in IntelliJ?

In the POM, right-click anywhere in the editor to open the context menu and select Maven | Show Dependencies. Alternatively, press Ctrl+Alt+Shift+U or Ctrl+Alt+U . In the diagram window, IntelliJ IDEA displays the sub project and all its dependencies including the transitive ones.

How do I enable dependency analyzer in IntelliJ?

From the main menu, select Code | Analyze Code | Dependencies. Alternatively, if you want to analyze a specific item, right-click it in the Project tool window and select Analyze | Analyze Dependencies. In the dialog that opens, specify the scope of files that you want to analyze.

How do I search for packages in IntelliJ?

Press Ctrl+Alt+S to open the IDE settings and select Build, Execution, Deployment | Package Search.


1 Answers

I found how to do this !

Use the 'Project and Libraries' Custom Scope.

enter image description here

like image 51
Ashutosh Jindal Avatar answered Sep 26 '22 04:09

Ashutosh Jindal