Hi,

I am writing a custom maven plugin and I want to do some integration
testing. I use maven-invoker-plugin run the tests, and my configuration for
it looks
pretty much like this.


<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<configuration>
<debug>true</debug>
<projectsDirectory>src/it</projectsDirectory>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
<settingsFile>src/it/settings.xml</settingsFile>
<goals>
<goal>clean</goal>
<goal>install</goal>
</goals>
</configuration>
<executions>
<execution>
<id>integration-tests</id>
<goals>
<goal>install</goal>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>



The thing is that I have following multi module structure

/parent
          /plugin
          /some-pom-template


And I want my test poms to have some-pom-template as parent pom. But the
plugin artifact does not actually depends on the some-pom-template.
How can I tell invoker:install to install some more dependencies.

I tried to add it as a test dependency but it was not installed in the
locally created maven repository in (target/local-repo)

I can workaround this by setting the scope of the dependecy as runtime and
add an optional attirbute (to avoid transitive resolving) but it does not
look very clean solution.

Is there a better way I cloud do this?

--
Vlado

Reply via email to