#IntelliJ not rebuilding maven modules when run

9 messages · Page 1 of 1 (latest)

vestal yoke
#

I recently split my project up into 5 or so maven modules and noticed that now when I click the "Run" button, IntelliJ seems to use the existing builds for each of the modules in my local maven repo rather than doing a rebuild. Even the module I'm directly running doesn't get rebuilt.
What this means for me is that I can't just press "Play" after making some changes, I've gotta first right click on the module(s) I've changed, scroll through the dropdown and manually build the module, then go and run it.

Looked around in IntelliJ and couldn't find any settings that would prompt an auto-rebuild, but I might just be missing it. Any tips?

weary sorrelBOT
#

This post has been reserved for your question.

Hey @vestal yoke! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

mossy crypt
#

I don't know whether IntelliJ supports running a multi-module project such that running one uses the compiled code of all modules directly. With Eclipse, it imports the modules as referencing each other. Maybe IntelliJ allows doing something similar?

#

Anyways make sure that the versions match if one module depends on another

#

Alternatively, you could configure to run an mvn install -DskipTests before the project runs

mossy crypt
vestal yoke
#

Found it! There are a bunch of hidden options in the runner configuration that you have to "opt-in" to seeing by toggling it on.
Just added a before launch step of running the mvn install. Thanks for the nudge Daniel.

weary sorrelBOT