Update FindMaven for Travis/Windows

It appears the Chocolately maven package now installs in different
location (or some shims that used to be installed no longer are).
Because the Travis build uses bash instead of cmd/powershell it doesn't
properly pick up M2_HOME.  This commits adds the new location.

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2019-06-27 11:07:48 +02:00 committed by eboasson
parent 23b45b9610
commit 348e68e9df

View file

@ -18,8 +18,13 @@ if(DEFINED ENV{M2_HOME})
endif()
# Chocolatey installs packages under C:\ProgramData\chocolatey.
if(ENV{ProgramData} AND IS_DIRECTORY "$ENV{ProgramData}/chocolatey/bin")
list(APPEND _mvn_paths "$ENV{ProgramData}/chocolatey/bin")
if(NOT "$ENV{ProgramData}" STREQUAL "")
if(IS_DIRECTORY "$ENV{ProgramData}/chocolatey/bin")
list(APPEND _mvn_paths "$ENV{ProgramData}/chocolatey/bin")
endif()
if(IS_DIRECTORY "$ENV{ProgramData}/chocolatey/bin")
list(APPEND _dirs "$ENV{ProgramData}/chocolatey/lib/maven")
endif()
endif()
# Maven documentation mentions intalling maven under C:\Program Files on