exec-maven-plugin icon indicating copy to clipboard operation
exec-maven-plugin copied to clipboard

Question: Why is ExecMojoTest searching for "mvn.cmd"?

Open mkarg opened this issue 9 years ago • 1 comments

I tried to fix a bug which happens on Windows, but I do not understand what that particular code is actually good for. Maybe someone could briefly explain?

ExecMojoTest fails because it expects to find relative name "mvn.cmd" while actually it finds absolute name "C:\Program Files\mvn\bin\mvn.cmd" on my disk. I assume this came up by introduction of two useful features: Returning an absolute name, and scanning PATH. Possibly nobody noticed as I assume most run their test suite on Linux.

Now my problem is: I can fix it by simply replace "mvn.cmd" by "xxx". As a result, nothing is found on my disk, hence, no absolute path is returned. Fine. Test pass. Great. But is that really what that test suite shall check (NOT finding something)? Because that means, the ExecMojoTest is useless then: It checks for something it does never find, and is happy with that, but it never checks whether it would really find something on disk? This is simply weird.

Ideas?

mkarg avatar May 09 '16 22:05 mkarg

Ok as it seems nobody knows the reason why particularly "mvn.cmd" is to be used, so it should be a valid solution to replace it by "xxx" to make the tests pass again. As I have time at the weekend, I will contribute a PR. If anybody thinks that is a bad idea, please veto now.

mkarg avatar May 12 '16 16:05 mkarg