You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could help with a PR if you like. Main problem is that accessing the root project dir of a multi module maven project is not that easy.
If we would pass the current project dir to the MavenLocator, we could traverse up until we find a mvnw executable (I use this via bash function already, so I just type "mvn" and the mvnw is found automatically.
Other option I see: Make the path to the maven executable configurable ... if not set, the MavenLocator does its job. If set, we just take the path, no matter if I point it to mvnw or mvn ... but then again, I would need to find the multi module root dir.
There are comming questions in my mind if I think about that issue:
The project which contains the integration tests could be configured using mvnw
should that imply to use the mvnw for all tests? (could/should that being overruled by the existence of mvnw within the test cases? Can/should it forced by using a new annotation?)
The projects which should be tested located in src/test/resources-its can contain the mvnw setup. If so should it be used by default?
Should it possible to suppres the usage of mvnw and use mvn provided by the system (like the current state)
What about the role of maven.home ? Overruled? Priority?
The root directory of a multi module build is defined by the existence of .mvn directory (see The .mvn directory is not copied #479 more important in Maven 4.0.0; in modelVersion 4.1.0 can be defined in the pom.xml itself).
Just to traverse up until we find a mvnw is not correct, because if you assume having some tests in src/test/resources-its which do not contain mvnw setup but your project which contains those tests and has a mvnw setup means that will used. That is not always correct (see my points at the beginning).
Is your feature request related to a problem? Please describe.
I am building a plugin on a machine where I solely use maven-wrapper (mvnw), but testing with it fails due to
IllegalState We could not find the maven executable
mvnsomewhere
Describe the solution you'd like
Make usage of maven wrapper configurable.
Additional context
I couldn't find any other related issue or doc for this, so bare with me if this is already supported/resolved.
The text was updated successfully, but these errors were encountered: