Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Output path is shared between the same module error

When I try to compile any class in my project I get the error below:

Error scala: Output path .../eval/target/test-classes is shared between: Module 'eval' tests, Module 'eval' tests
      Output path .../eval/target/classes is shared between: Module 'eval' production, Module 'eval' production
      Please configure separate output paths to proceed with the compilation.

I've seen how to set the output path in IDEA and I've done it. But as the error claims that it is shared between the same module I couldn't solve it.

Obs.: Using Maven and IntelliJ IDEA.

Please, can anyone help?

like image 226
Alexandre Cançado Cardoso Avatar asked Sep 20 '13 15:09

Alexandre Cançado Cardoso


3 Answers

all you need to do is:

  • synchronize both modules (right click > Synchronize)
  • re-import pom.xml for both modules (right click > Maven > Re Import)

Enjoy

like image 77
Yonatan Maman Avatar answered Oct 14 '22 03:10

Yonatan Maman


Set up the output paths for your modules to different directories, as explained here: https://www.jetbrains.com/idea/help/configuring-module-compiler-output.html

On Project "Open Module Settings" -> Modules -> Paths -> Output/Test path

like image 14
DreamFlasher Avatar answered Oct 14 '22 01:10

DreamFlasher


I resolved this by selecting "Inherit project compile output path" in the Project Structure settings window.

enter image description here

like image 8
Cory Klein Avatar answered Oct 14 '22 02:10

Cory Klein