Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ubuntu, windows] M2_HOME variable will be removed on February, 15 #2600

Closed
5 of 9 tasks
AlenaSviridenko opened this issue Feb 1, 2021 · 4 comments
Closed
5 of 9 tasks

Comments

@AlenaSviridenko
Copy link
Contributor

AlenaSviridenko commented Feb 1, 2021

Breaking changes
M2_HOME variable will be removed from Ubuntu and Windows images on February, 15

Target date
Image deployment will start on February, 15 and will take 3-4 days.

The motivation for the changes
Since Maven 3.5.0, environment variable M2_HOME is not used/supported anymore, but on our images it is set and causes issues: #2534

Possible impact
If you hardcoded this variable somewhere in your pipeline — your build will be broken

Virtual environments affected

  • Ubuntu 16.04
  • Ubuntu 18.04
  • Ubuntu 20.04
  • macOS 10.13
  • macOS 10.14
  • macOS 10.15
  • macOS 11.0
  • Windows Server 2016 R2
  • Windows Server 2019

Mitigation ways
Set this variable manually with the following command:
echo "M2_HOME=/usr/share/apache-maven-<version>" >> $GITHUB_ENV

@AlenaSviridenko AlenaSviridenko pinned this issue Feb 5, 2021
@AlenaSviridenko AlenaSviridenko changed the title [Ubuntu] M2_HOME variable will be removed on February, 15 [Ubuntu, windows] M2_HOME variable will be removed on February, 15 Feb 16, 2021
@AlenaSviridenko AlenaSviridenko added OS: Windows awaiting-deployment Code complete; awaiting deployment and/or deployment in progress labels Feb 16, 2021
@AlenaSviridenko AlenaSviridenko self-assigned this Feb 16, 2021
@AlenaSviridenko AlenaSviridenko unpinned this issue Feb 16, 2021
@famod
Copy link

famod commented Feb 22, 2021

@AlenaSviridenko What's the status of this? Still awaiting deployment? Thanks!

@miketimofeev
Copy link
Contributor

@famod Windows images are not yet deployed. We'll probably finish the deployment by the end of this week.

@saikirangit
Copy link

Migitation way did not work for my build. It was still complaining about same error of M2_HOME not being set.

@maxim-lobanov above solution did not work for me and still threw same error... I had to do this to get it working.

This worked. Not the cleanest way but I will convert this to use which mvn than hardcoding the value

- name: Set up Maven
  uses: stCarolas/setup-maven@v4
  with:
    maven-version: 3.6.3
    
- name: Set environment variables
  uses: allenevans/set-env@v2.0.1
  with:
    M2_HOME: /opt/hostedtoolcache/maven/3.6.3/x64

@AlenaSviridenko
Copy link
Contributor Author

Windows images were also fully deployed, closing this issue.

@AlenaSviridenko AlenaSviridenko removed the awaiting-deployment Code complete; awaiting deployment and/or deployment in progress label Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
@AlenaSviridenko @famod @saikirangit @miketimofeev and others