stCarolas / setup-maven

Set up your GitHub Actions workflow with a specific version of Apache Maven

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider unsetting or modifying M2_HOME

famod opened this issue · comments

Ubuntu and probably other virtual GH environments come with M2_HOME preset.
This breaks Maven versions lower than 3.5.0 that are installed with this action from working properly.
I have written down the details in actions/runner-images#2534.

So, as a workaround for that issue, I thought that maybe this action could at least unset M2_HOME?
Next best thing would be to modify M2_HOME to point to the right Maven installation but then again: it shouldn't be used at all anymore...

I think setting M2_HOME to right installation more expected thing than unsetting. Also seems like correct for situation with installing old maven into environment with another old maven.

The virtual-environments issue was already assigned, so maybe the root cause will be fixed sooner than expected and we don't need a workaorund.

If you choose to set M2_HOME even for Maven 3.5.0+ then people are less motivated to let go of that removed property, just saying...

The fix for actions/runner-images#2534 was rolled out, so M2_HOME is not present anymore.

So for me this topic is done.