You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jørgen Austvik <ja...@acm.org> on 2009/10/04 20:10:11 UTC

Using plugin from pom which is in a sub module of the same pom

Hi,

I have a maven project with many modules, two of which are maven
plugins, with Mojos which I use for integration testing
(maven-integrationtest*-plugin below).

top-level pom.xml:
<modules>
  <module>A</module>
  <module>B</module>
  ...
  <module>maven-integrationtestC-plugin</module>
  <module>maven-integrationtestD-plugin</module>
</modules>

For the maven-integrationtest*-plugin there are
build/plugins/plugin/executions/execution tags with phase
integration-test that runs goals in the maven-integrationtest*-plugin
in the top-level pom.xml, as these plugins run integration tests for
all the modules in the same project.

<build>
  <plugins>
      <plugin>
          <artifactId>maven-integrationtestC-plugin</artifactId>
          <executions>
              <execution>
                  <phase>integration-test</phase>
                  <goals>
                      <goal>run</goal>
                  </goals>
              </execution>
          </executions>
      </plugin>
  </plugins>
</build>

When I do "mvn install", I would like "maven-integrationtestC-plugin"
and "maven-integrationtestD-plugin" to be installed in at least the
pre-integration-test phase. Maybe even before, because when I delete
the plugin from the local repository and run "mvn install" on the
top-level pom.xml, I get:

[INFO] A required plugin was not found: Plugin could not be found -
check that the goal name is correct: Unable to download the artifact
from any repository

..but I don't want it to download the artifact, I want it to build it
from the local file system.

To build without problems today, a user would have to run:
$ (cd maven-integrationtestC-plugin; mvn install)
$ (cd maven-integrationtestD-plugin; mvn install)
$ mvn install

Is there any way I could get maven to use the plugin from the local
module/file system and run it without users installing it first?

-J

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org