Intellij doesn't build my maven projects using configured plugins


I have a multi-module maven project. One of the modules defines my OpenJPA model classes and the maven build has the openjpa-maven-plugin configured like so:



This works from the command line and my tests pass OK. However when I run from Intellij after making any edits to my classes (causing IDEA to recompile them), the tests fail because the classes have not been enhanced at build time.
If I then compile at the command line and run the tests again from IDEA, they pass OK.

How can I get IDEA to run the maven builds as they are run from the command line? I thought this was the whole idea behind maven integration!?



1 comment
Comment actions Permalink

Default JUnit test run configuration does only "Make" which only compiles the classes. If you need to run extra processing (like enhancing classes in your case) you need to alter your JUnit test run configuration and add extra step ("Run Maven Goal") in "Before lauch" section.


Please sign in to leave a comment.