Output path is reset

Answered

In my project structure I add maven module to an existing project and then change its output path to a different directory by picking "Use module compile output path" in the project structure. For some reason IJ decides to switch it back to the default apparently at random times... How do I keep this bloody thing to preserve the path once and for all?

I guess it's not something new a similar problem has been there since 2018 - been reported here https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000410904-Output-path-constantly-being-reset

1
4 comments

>For some reason IJ decides to switch it back to the default apparently at random times...

On each Maven Reload IDE sets the project configuration according to the Maven configuration. In Maven projects you must do all build related configuration, including the output paths in a Maven pom.xml build files.

0
Avatar
Permanently deleted user

Thanks for the heads-up. Is this a bug or a feature? Makes sense to do that on the initial project import, but IMHO, manually changed settings should not be reset quietly after a reload, or at least should be something that confirms if they should be reset or not...

0

It is a feature. IDE makes the build as much as possible to the result you would get when building by maven from command line.

When you change the settings in UI there is a warning displayed:

0
Avatar
Permanently deleted user

Thank you for taking a look, Andrey! LOL, I wonder if IJ has a list of "totally awesome features" somewhere? I think it should! Somehow my gut feeling tells me that if I set something manually in the IDE it must take precedence over the default behaviour? I totally understand if it happens you re-import the module to a new project, but this happens to me every time the main project is rebuilt / changes.

Anyhow, thank you for bearing with my rumblings. I get it that it's a feature, and I should just be checking & updating the output path every time I get "Could not find class" exception :)

0

Please sign in to leave a comment.