views:

26

answers:

1

Lets say I have two maven projects: moduleA and moduleB.

moduleA has a dependency to moduleB in it's pom.xml.

I use IntelliJ Idea, and I have 'Maven Projects' tool window, where I have both these maven projects.

And it is possible to run maven plugin goals from there: I open 'Maven Projects' -> moduleA -> Plugins -> jetty -> jetty:run. Java is run, moduleB is in classpath, but it is in the Maven local repository!

So that, if I change something in moduleB sources and execute jetty:run from Idea, I will not see code changes until moduleB is installed with mvn install.

Is there any solution in Idea to deal without mvn install, for instance to run somehow maven goals with idea-module classpath?

+2  A: 
  1. I suggest to use Jetty Integration IDEA plugin to run standalone jetty http://github.com/codebrewer/intellij-idea-jetty-integration-plugin

  2. if you still want to use jetty:run, you could tell IDEA to do mvn install for moduleB: Run -> Edit Configurations -> select youy maven run config -> Configuration tab -> Before launch (at the bottom) -> Run Maven Goal

OLEKSII