*Please reply* Is it possible to have Intellij compile only imported files when compiling?

I have a module that has a module dependency called shared which has the majority of my applications code across all applications. There are classes in shared that reference for example the servlet 3.0 API (jar dependency) that are not used in this module among a bunch of other stuff. Intellij looks like it compiles everything in a module, unlike eclipse, including when compiling with maven. With Eclipse, eclipse only compiles files that are imported into the application. Is there a way to change this?

1 comment
Comment actions Permalink

Idea compiles all files in a module, this is by design.
You can also exclude certain files from compilation in Compiler settings, or remove sources at all if you don't need them.
Also breaking your module into several modules to achieve more fine-grained dependencies is a good idea.

Regards,
  Eugene.

0

Please sign in to leave a comment.