-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Use more recent java version in Maven@3 #14915
Comments
I've figured out a workaround that's relatively easy enough. You just need an azure blob store where you can store the java version you want to use, then use the JavaToolInstaller to install it, then tell the maven tool to use that version. (It will give a warning, but you can ignore that.) See here for how I'm doing it. You can use the windows-2019 vm image to get the latest version of maven (3.8.1). The underlying root problem should still be solved though, the newer versions of java aren't available by default in the JavaVersionTool, which makes this inconvenient since you have to self-host the jdk tar, but in any case, you may have to specify which java version to install in the future anyways. It would be nice if the JDK 16 was available by default, especially given that there's an official build of it available here. Perhaps this is a separate issue for the JavaToolInstaller. I'll file it. |
My workaround was not use Maven@3 :)
|
I found it LadyCailin, I think it is easier than your workaround ;)
I'm using
|
thanks @alexander-smolyakov |
Hi @sfragata, just an update regarding this issue: We have decided the revert related changes to the Maven task to avoid confusion in Java versions - since only LTS tools versions are available on all images, and versions like 14 are not available widely on hosted images. We will investigate other ways of how we can resolve this issue in a better way. |
Hi @alexander-smolyakov , that's ok, I'm using maven+java16 container for instance and it works
thanks |
Any news regarding this issue? |
Hi any update on this? 17 is an LTS and would be very helpful if at least that one will be included |
Meanwhile you can use container
|
Hi all, let me provide an update regarding this ticket: At the moment the Java 17 is still not available on the following virtual images:
However, these images will be updated soon, here is a link to a related ticket: Once all virtual images will contain Java 17, we will update the Maven task. |
Hi, just wondering, does it mean that it's available on windows images? I'm still seeing this warning when trying to use Java 17:
|
@alexander-smolyakov Any update? |
@nibexo I have opened a pull request to update the Maven pipeline task (V2/V3). I will update the ticket once the related changes will be merged to master. Link to related PR: |
Quick update: A related pull request was completed. The related changes for the Maven pipeline task will be available in the 200th sprint release of Azure DevOps. I will update the ticket once these changes will be deployed and available to all Azure DevOps users. |
any expected date of available? |
He never mentioned what sprint they're currently at 🤨 |
Sprint 200 Patch Notes were released on Monday, and I can now see JDK 17 in the dropdown: https://docs.microsoft.com/en-us/azure/devops/release-notes/2022/sprint-200-update |
Hi everyone! Closing this one since it has been fully rolled out - feel free to ask any other questions. |
Feature
Type: Upgrade Maven task to more updated java version
Enter Task Name: Maven@3 (https://github.com/microsoft/azure-pipelines-tasks/tree/master/Tasks/MavenV3)
Environment
Issue Description
The more updated
jdkVersionOption
used by taskMaven@3
is 11(#jdkVersionOption: 'default' # Optional. Options: default, 1.11, 1.10, 1.9, 1.8, 1.7, 1.6)
https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/maven?view=azure-devops.
I'd like to use more recent versions like java 14 or 16
The text was updated successfully, but these errors were encountered: