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

No way to configure maven version in actions/setup-java #457

Closed
5 tasks done
ichinna opened this issue Mar 3, 2023 · 9 comments
Closed
5 tasks done

No way to configure maven version in actions/setup-java #457

ichinna opened this issue Mar 3, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@ichinna
Copy link

ichinna commented Mar 3, 2023

Description:
Maven @3.9.0 introduced plugin breakage. And I don't see a way I can use a particular version of maven with setup-java GitHub Actions. So, can you provide information on how to use/configure a particular version when I use actions/setup-java in a GitHub pipeline? For reference look at this Maven changelog

Task version:
v1 v2 v3 (All versions)

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:
Try to use a maven plugin in your pom.xml. And when running it using maven@3.9.0, it fails to download that plugin.

Expected behavior:
A way to configure a particular version of maven in actions/setup-java@v*

Actual behavior:

@ichinna ichinna added bug Something isn't working needs triage labels Mar 3, 2023
@IvanZosimov
Copy link
Contributor

Hi, @ichinna 👋 Thanks for the issue, we will take a look at it and get back to you with updates.

@maxandersen
Copy link

+1 on this as it is a regular occurrence that maven minor updates does break things faster than plugin can get updates.

@karussell
Copy link

karussell commented Mar 3, 2023

There is already some discussion here: https://github.com/orgs/community/discussions/49001

This issue here seems to be a duplicate of #40

@maxandersen
Copy link

#40 indicates maven is not being provided by setup-java thus they won't add config for it ? Not following how that works.

@joelittlejohn
Copy link

As a workaround, I've switched to using https://github.com/s4u/setup-maven-action. Here's an example:

      - name: Setup Maven Action
        uses: s4u/setup-maven-action@v1.7.0
        with:
          checkout-fetch-depth: 0
          java-version: 8
          java-distribution: temurin
          maven-version: 3.8.7

@vorburger
Copy link

I don't think setup-java should set up Maven.

But perhaps you would like to consider using https://maven.apache.org/wrapper/ and fixing the Maven version your project requires in a maven-wrapper.properties file, and then launching run: ./mvnw instead of mvn?

@dmitry-shibanov
Copy link
Contributor

Hello everyone. Thank you for your report. Unfortunately we're not planing to add configuration options for Maven to setup-java. The solution can be to use community action to change Maven version or use Maven Wrapper. Maven version was changed to 3.8.7 on images. For now I'm going to close the issue.

@dmitry-shibanov dmitry-shibanov closed this as not planned Won't fix, can't repro, duplicate, stale Mar 16, 2023
jonathan-barbero added a commit to jonathan-barbero/java_tuples that referenced this issue Mar 26, 2023
@Andreiasilva1
Copy link

Abrir

Azquelt added a commit to eclipse/microprofile-fault-tolerance that referenced this issue Apr 18, 2024
The newest version of maven does not work with Java 8. The jenkins build uses an older version of maven, but github actions have no intention of allowing the confiugration of the maven version actions/setup-java#457
@rmannibucau
Copy link

Any hope it gets fixed, if you consider the java version is important, maven is likely on the same kind of prerequisite and using none official actions is never nice?

side note: wrapper is indeed not an option (pollutes the project, requires more work for matrix testing + no real reason since it is a runner responsability to setup the right tool when using this kind of action IMHO).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants