Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij exclude file from being compiled

Tags:

I am trying to exclude a particular file in my project from being compiled.

According to the Intellij IDEA documentation you do this by "marking the file as plain text".

However, the context menu in the project view where this functionality is supposedly located has no such action. I am using version 13.02 of Intellij. Here is what my context menu looks like:

enter image description here

like image 511
Tyler Durden Avatar asked Mar 10 '14 04:03

Tyler Durden


People also ask

How do I exclude a package in IntelliJ?

You can use ⌥⏎ (macOS), or Alt+Enter (Windows/Linux), to show context actions and exclude completion options that you don't want to be displayed in the future.

What is excluded directory IntelliJ?

In this field, the path to a file or directory to be excluded from compilation is shown. Recursively. For a directory: select this option to exclude from compilation all the corresponding subdirectories. Alt+Insert. Use this icon or shortcut to add a file or directory to the list.

How exclude Java from IntelliJ?

Under File > Settings > Build, Execution, Deployment > Compiler > Excludes, add an entry.


1 Answers

Under File > Settings > Build, Execution, Deployment > Compiler > Excludes, add an entry.

enter image description here

Any attempts to run a path specified here will result in a ClassNotFoundException, and a very important class indicator as well.

enter image description here

like image 143
Makoto Avatar answered Sep 29 '22 11:09

Makoto