I want to exclude individual .java
files from a Content Root in IntelliJ. The documentation on "Excluding Files from Project" suggests that this is not possible (it explicitly says This action is not applicable to Java files and binaries. )
Being incredulous to such a limitation, I have tried editing my .iml
file, optimistically inserting XML elements such as <excludeFile>
under the <content>
element, but nothing seems to take.
Does anyone know a way to do this (documented or otherwise)? Or have any clue why this feature is not supported? By comparison, Eclipse allows for an arbitrary including
pattern for a <classpathentry>
element in its .classpath
file.
You can exclude files from compilation and classpath . As far as I understand it will have the same effect as manipulating with <classpathentry>
in Eclipse.
To exclude files/folders by pattern and globally use Ignore files and folders option in the File Types dialog. This way the files will be completely ignored and not visible in the Project View, but it's probably not what you want.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.