简体   繁体   English

如何在 mvn 构建后生成的 Intellij 中的目标中搜索所有 Java 类中的单词?

[英]How to search for a word inside all the Java classes from target in Intellij generated after mvn build?

I'm learning Java with Maven projects using Intellij, and when I run mvn clean install , it creates the target directory and inside target, there is WEB-INF...我正在使用 Intellij 学习 Java 和 Maven 项目,当我运行mvn clean install时,它会创建目标目录和内部目标,有 WEB-INF ...

I want to ask you how can I search for a word inside all the classes from target directory, inside all the WEB-INF.我想问你如何在目标目录的所有类中,在所有 WEB-INF 中搜索一个单词。

To search for a word in Intellij inside src\main\java I'm using CTRL + SHIFT +F, but this command doesn't work to search inside target\WEB-INF...要在 src\main\java 内的 Intellij 中搜索单词,我使用的是 CTRL + SHIFT +F,但此命令无法在 target\WEB-INF 内搜索...

I have a lot of classes generated from mvn build, and these classes aren't int the src\main\java and I want to ask you how to search inside them?我有很多从 mvn build 生成的类,这些类不在 src\main\java 中,我想问你如何在它们里面搜索?

Thank you!谢谢!

Remember that a development enviroment are just folders.请记住,开发环境只是文件夹。

If you are using linux you can use:如果您使用的是 linux,您可以使用:

grep -R "content_to_search" /path/to/directory

A quick search on windows should find you the answer.快速搜索 windows 应该会找到答案。

In intellij Idea, press SHIFT key twice and enter the keyword to search.在 intellij Idea 中,按两次SHIFT键并输入关键字进行搜索。

In case of Eclipse, click on Search menu then search and select scope as Workspace, find below the image.在 Eclipse 的情况下,单击搜索菜单,然后搜索 select scope 作为工作区,在图像下方找到。

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 生成后生成的目标文件不包含必须存在的所有已编译类 - Generated target files after build doesn't contain all the compiled classes that must have been there 在IntelliJ中调试生成的Java类 - Debugging generated java classes in IntelliJ 如何从Java内部运行mvn exec:java - How can I run mvn exec:java from inside Java IntelliJ Idea高级搜索包含特定单词的类中的关键字 - IntelliJ Idea advanced search for key word in the classes containing a certain word 未编译“目标”文件夹中生成的Maven Java类 - Maven java classes generated in “target” folder are not compiled 如何从XSD编辑生成的Java类 - How to edit generated java classes from xsd 无法通过 IntelliJ Idea 和 Gradle 使用构建文件夹中生成的类 - Can't use generated classes from build folder with IntelliJ Idea and Gradle 如何从Java 9模块导出所有使用cxg-codegen-plugin类生成的内容? - How do I export all the generated with cxg-codegen-plugin classes from a Java 9 module? 如何将Java Project从IntelliJ IDEA保存到Git repo,以便在克隆后在另一台PC上构建? - How to save Java Project from IntelliJ IDEA to Git repo so it will build on another PC after cloning? 从 intellij 搜索中排除目标文件夹 - Excluding target folder from intellij search
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM