-
Notifications
You must be signed in to change notification settings - Fork 221
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
jfrog cli error "M2_HOME is not set" in GitHub action/workflow #975
Comments
When I add this to a previous step in the workflow, it does not fail: echo "M2_HOME=/usr/share/apache-maven-3.6.3" >> $GITHUB_ENV |
@leemeador, |
@eyalbe4 Exactly. Thanks for the quick reply. That's why I included the link to GitHub's issue where they were removing M2_HOME. I'm asking for you guys to change JFrog CLI to not need M2_HOME so that we don't have to set it and everyone that is new to writing actions doesn't have to search all over the internet to not find any info about it. I do know that lots of maven related tools do not use that variable OR maybe they use it if its there and do something else if its missing. |
@eyalbe4 - this issue of CLI expecting M2_HOME is seriously affecting us. Is there a fix in progress? |
It may be that the image you are using doesn't have maven installed or that M2_HOME needs to be set. Here is what I did to fix the issue. .artifactory: image: $ARTIFACTORY_IMAGE stage: deploy services:
before_script: |
Describe the bug
This notice for GitHub workflow/action virtual runners says the M2_HOME env variable is no longer getting set: actions/runner-images#2600
Unfortunately, the command below fails with an error saying it is required:
jfrog rt mvn clean install --batch-mode -s settings.xml mavenBuildConfig.yaml --build-name=my_build --build-number=0.0.1-SNAPSHOT
Error message: Error: M2_HOME environment variable is not set
To Reproduce
Run the command above in a github action/workflow. (But I haven't tried it in a scaled down workflow.)
Expected behavior
It should run maven
Screenshots
If applicable, add screenshots to help explain your problem.
Versions
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: