Skip to content

Ability to reference the test directory in the pom.xml under test? #193

Answered by khmarbaise
aegershman asked this question in Q&A
Discussion options

You must be logged in to vote

So I started to investigate the problem.

The problem with maven.multiModuleProjectDirectory is that it is interpolated of the mvn.cmd or mvn script and could be wrong in some situations. In exactly the situation happens within the integration tests because you have a project in the directory maven-it/org/openwrite/maven/RewriteDryRun/multi_module_project. The mvn process will be started with that directory and the mvn script tries to find the root which results in finding it on the level rewrite-maven-plugin (root level) because there .mvn has been found. That's the reason why you had to use ${maven.multiModuleProjectDirectory}/src/test/resources-its/org/openrewrite/maven/RewriteDryRunIT/…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@aegershman
Comment options

@khmarbaise
Comment options

@splatch
Comment options

Answer selected by aegershman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants