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

ci: try to fix AppVeyor failure due to outdated Maven version #1894

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

galtm
Copy link
Collaborator

@galtm galtm commented Mar 20, 2024

This PR is a "blind" attempt to set a newer Maven version than 3.6.0 in the AppVeyor test run, on top of all the changes for #1833. I don't know how to test this without making a pull request, so it's an experiment.

Removing test\ci\run-core-tests.cmd from appveyor.yml is just a way to ensure that the build doesn't time out before we find out whether the Maven packaging worked. If all goes well, I'll restore that line.

If it works: Fixes #1893

@galtm galtm requested a review from cmarchand as a code owner March 20, 2024 20:48
@galtm
Copy link
Collaborator Author

galtm commented Mar 20, 2024

The simplest thing didn't work. Although there is an environment variable MAVEN_VERSION with value 3.8.7, we're still getting 3.6.0.

=== Print Maven version
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T18:41:47Z)
Maven home: C:\Program Files (x86)\Apache\Maven\bin\..
Java version: 1.8.0_162, vendor: Oracle Corporation, runtime: C:\Progra~1\Java\jdk1.8.0\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows server 2012 r2", version: "6.3", arch: "amd64", family: "windows"

Maven is not mentioned on https://www.appveyor.com/updates/

@galtm
Copy link
Collaborator Author

galtm commented Mar 20, 2024

@cmarchand , is this something you're familiar with?

@galtm
Copy link
Collaborator Author

galtm commented Mar 20, 2024

Do we need to include commands to install Maven when the version we get by default isn't the one we want? Here's an example: https://github.com/Riverside-Software/sonarlint-eclipse/blob/629c37e33e7eed6ac56ddbaa7d569579d9bf1885/appveyor.yml#L5

@galtm
Copy link
Collaborator Author

galtm commented Mar 20, 2024

When I tried adding installation commands, they appeared to take effect

[00:00:13] maven v3.8.7 [Approved]
[00:00:13] maven package files install completed. Performing other installation steps.
[00:00:14] C:\Users\appveyor\.m2
[00:00:15] PATH environment variable does not have C:\ProgramData\chocolatey\lib\maven\apache-maven-3.8.7\bin in it. Adding...
[00:00:15] Environment Vars (like PATH) have changed. Close/reopen your shell to
[00:00:15]  see the changes (or in powershell/cmd.exe just type `refreshenv`).
[00:00:16]  The install of maven was successful.
[00:00:16]   Software installed to 'C:\ProgramData\chocolatey\lib\maven\apache-maven-3.8.7'
[00:00:16] 
[00:00:16] Chocolatey installed 1/1 packages. 
[00:00:16]  See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
[00:00:16] SET PATH=C:\ProgramData\chocolatey\lib\maven\apache-maven-%MAVEN_VERSION%\bin;%PATH%
[00:00:16] refreshenv
[00:00:17] Refreshing environment variables from registry for cmd.exe. Please wait...Finished..
[00:00:17] mvn --version
[00:00:18] Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T18:41:47Z)
[00:00:18] Maven home: C:\Program Files (x86)\Apache\Maven\bin\..
[00:00:18] Java version: 1.8.0_162, vendor: Oracle Corporation, runtime: C:\Progra~1\Java\jdk1.8.0\jre
[00:00:18] Default locale: en_US, platform encoding: Cp1252
[00:00:18] OS name: "windows server 2012 r2", version: "6.3", arch: "amd64", family: "windows"
[00:00:18] echo %PATH%
[00:00:18] C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Perl\site\bin;C:\Perl\bin;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files\Google\Compute Engine\sysprep\;C:\Program Files\Google\Compute Engine\metadata_scripts\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Tools\GitVersion;C:\Tools\PsTools;C:\Program Files\7-Zip;C:\Program Files\Mercurial;C:\Program Files (x86)\Subversion\bin;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\wbin;C:\Tools\WebDriver;C:\Tools\NUnit\bin;C:\Tools\xUnit;C:\Tools\MSpec;C:\Tools\Coverity\bin;C:\Program Files\nodejs;C:\Program Files (x86)\iojs;C:\Program Files\iojs;C:\Users\appveyor\AppData\Roaming\npm;C:\Program Files (x86)\CMake\bin;C:\go\bin;C:\Program Files\Java\jdk1.8.0\bin;C:\Python27;C:\Ruby193\bin;C:\Users\appveyor\.dnx\bin;C:\Program Files (x86)\MSBuild\14.0\Bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Tools\NuGet3;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files\Git LFS;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Apache\Maven\bin;C:\Python27\Scripts;C:\Tools\NUnit3;C:\Program Files\Mercurial\;C:\Program Files\dotnet\;C:\Tools\curl\bin;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130;C:\Tools\vcpkg;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files\erl9.2\bin;C:\Program Files (x86)\NSIS;C:\Tools\Octopus;C:\Program Files\LLVM\bin;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\PowerShell\6\;C:\Program Files (x86)\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\Git\usr\bin;C:\Program Files\Meson\;C:\ProgramData\chocolatey\bin;C:\Program Files\Amazon\AWSCLI\;C:\Program Files (x86)\Yarn\bin\;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.8.7\bin;;C:\Users\appveyor\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-final\bin;C:\Users\appveyor\.dotnet\tools;C:\Users\appveyor\AppData\Roaming\npm;C:\Users\appveyor\AppData\Local\Yarn\bin

but Maven is still running 3.6.0 from a different location that comes first in the path:

Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T18:41:47Z)
Maven home: C:\Program Files (x86)\Apache\Maven\bin\..

@cmarchand
Copy link
Collaborator

I'll try to have a look at this tonight. I'm on holidays now, ut I think I'll be able to put 30' on this this evening...

@cmarchand cmarchand self-assigned this Mar 21, 2024
@galtm
Copy link
Collaborator Author

galtm commented Mar 21, 2024

I'll try to have a look at this tonight. I'm on holidays now, ut I think I'll be able to put 30' on this this evening...

Thank you!!

@galtm
Copy link
Collaborator Author

galtm commented Mar 22, 2024

To enable #1833 to avoid the failure we're investigating here, I disabled the Maven operations in AppVeyor (ee4ba74) as part of that PR. I'm mentioning this for 2 reasons:

  • It's related to the merge conflict that GitHub is flagging.
  • I wanted you to know about that commit in case you rebase on top of master or something. You wouldn't want to be surprised to find that the Maven operations aren't running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AppVeyor Maven packaging fails because Maven 3.6.0 is too old
3 participants