From 5102a0cf07dfd48f7eaf5df450bf3a4125a9f656 Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Thu, 30 Oct 2025 17:47:59 +0100 Subject: [PATCH] Provision maven on Windows It is required for qtopenapi. The patch adds the maven provisioning to only those Windows configurations that are currently used in qtopenapi. This commit amends 0ac4df3e5280212996c80cb12008dc7a63910d9a which provisioned the same files for Linux and macOS. Task-number: QTBUG-138968 Change-Id: I8ec903959c58185a5c46bdb7c13f178bdc10a109 Reviewed-by: Alexandru Croitor --- .../common/windows/install-maven.ps1 | 27 +++++++++++++++++++ .../16-install-maven.ps1 | 4 +++ .../16-install-maven.ps1 | 4 +++ .../16-install-maven.ps1 | 4 +++ 4 files changed, 39 insertions(+) create mode 100644 coin/provisioning/common/windows/install-maven.ps1 create mode 100644 coin/provisioning/qtci-windows-10_22H2-x86_64/16-install-maven.ps1 create mode 100644 coin/provisioning/qtci-windows-11_23H2-aarch64/16-install-maven.ps1 create mode 100644 coin/provisioning/qtci-windows-11_24H2-x86_64/16-install-maven.ps1 diff --git a/coin/provisioning/common/windows/install-maven.ps1 b/coin/provisioning/common/windows/install-maven.ps1 new file mode 100644 index 00000000..6dda71cb --- /dev/null +++ b/coin/provisioning/common/windows/install-maven.ps1 @@ -0,0 +1,27 @@ +# Copyright (C) 2025 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +. "$PSScriptRoot\helpers.ps1" + +# This script will install maven 3.9.11 +$version = "3.9.11" + +$temp = "$env:tmp" +Write-Host "Fetching maven ver. $version..." +$pkgname = "apache-maven-$version-bin.tar.gz" +$url_cache = "http://ci-files01-hki.ci.qt.io/input/qtopenapi/maven/$pkgname" +$url_official = "https://dlcdn.apache.org/maven/maven-3/$version/binaries/$pkgname" +$sha1 = "c084cde986ba878da4370bde009ab0a0a1936343" + +Download $url_official $url_cache "$temp\$pkgname" +Verify-Checksum "$temp\$pkgname" $sha1 + +$maven_location = "C:\Utils\maven" +Write-Host "Extracting $pkgname to $maven_location" +New-Item -Path "$maven_location" -ItemType Directory +Extract-tar_gz "$temp\$pkgname" "$maven_location" + +$dirname = "apache-maven-$version" +Prepend-Path "$maven_location\$dirname\bin" + +Write-Output "Maven = $version" >> ~/versions.txt diff --git a/coin/provisioning/qtci-windows-10_22H2-x86_64/16-install-maven.ps1 b/coin/provisioning/qtci-windows-10_22H2-x86_64/16-install-maven.ps1 new file mode 100644 index 00000000..5e5be228 --- /dev/null +++ b/coin/provisioning/qtci-windows-10_22H2-x86_64/16-install-maven.ps1 @@ -0,0 +1,4 @@ +# Copyright (C) 2025 The Qt Company Ltd +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +. "$PSScriptRoot\..\common\windows\install-maven.ps1" diff --git a/coin/provisioning/qtci-windows-11_23H2-aarch64/16-install-maven.ps1 b/coin/provisioning/qtci-windows-11_23H2-aarch64/16-install-maven.ps1 new file mode 100644 index 00000000..5e5be228 --- /dev/null +++ b/coin/provisioning/qtci-windows-11_23H2-aarch64/16-install-maven.ps1 @@ -0,0 +1,4 @@ +# Copyright (C) 2025 The Qt Company Ltd +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +. "$PSScriptRoot\..\common\windows\install-maven.ps1" diff --git a/coin/provisioning/qtci-windows-11_24H2-x86_64/16-install-maven.ps1 b/coin/provisioning/qtci-windows-11_24H2-x86_64/16-install-maven.ps1 new file mode 100644 index 00000000..5e5be228 --- /dev/null +++ b/coin/provisioning/qtci-windows-11_24H2-x86_64/16-install-maven.ps1 @@ -0,0 +1,4 @@ +# Copyright (C) 2025 The Qt Company Ltd +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +. "$PSScriptRoot\..\common\windows\install-maven.ps1"