Using Maven's -pl and -am parameters inside of IDEA

We use Maven with -pl and -am parameters in our build. This might look like:

mvn clean install -pl :my-module -am


In the above example Maven will run the clean and install goals on my-module and all it's dependencies. This is very helpful when using the Tomcat plugin's run-war goal:

mvn tomcat7:run-war -pl :my-web-module -am


In IDEA I can just run the goal inside my-web-module, but this won't include the dependencies. Is there a solution?

1 comment
Comment actions Permalink

Jan,
you can either create a Maven Run configuration and specify the command line manually, or you ca use IntelliJ IDEA built-in make and allow it to build the dependencies and necessary artifacts for you.

0

Please sign in to leave a comment.