maven plugin resolution always runs project verses repository plugin

I am using IDEA 8.1.4 and the IDEA project I am using includes a maven plugin that is installed in the local repository.
When I ask IJ to run the maven plugin before a test is run IJ always resolves to the version of the maven plugin in the project.
The version of the plugin in the project is vesion 1.1-SNAPSHOT, and the version installed into the local repo is version 1.0.
The module that runs/depends on the plugin refernces version 1.0 and this reference in its pom:

In the module POM that is dependant on the plugin the below is present.
<!-- Adding the dependency below even though not required by maven does not help -->
When I hold my cursor over the 'maven-xbuilder-plugin' the URI correctly points to the local repository as expected.

However, when I run a test from within IJ, IJ first executes the maven goal 'generate-test-sources'. It tries to execute the plugin code that is contained in the project instead of the repository. The execution fails because the maven module code has not been compiled.

Is there a work around to run the code contained in the repository ?

Please sign in to leave a comment.