I am using maven which is installed by chocolatey, which works
if I set the PATH variable in the project environment, but it isn't
in the PATH by default.
However the choco install log says at the end:
PATH environment variable does not have C:\tools\apache-maven-3.3.3\bin in it. Adding...
So I think it is added but probably the current script does not pick up the change, is there a possibility to pick up the new PATH?

#1 Posted by Feodor Fitsner Support staff on 24 Jun, 2016 02:31 AM
The problem is that child process (choco) cannot affect environment variables of parent process (AppVeyor build agent) in a such way, so you have to set PATH outside in your "main" build script.
#2 Posted by alexlehm on 24 Jun, 2016 09:53 PM
Thanks, I set the path in the Environment, so it works now
#3 Posted by alexlehm on 25 Jun, 2016 09:58 AM
I poked around a bit in the files from chocolatey and it looks like the RefreshEnv script can reload the envs set by chocolatey, so that when running
in the install script, the mvn command is found (I assume this will work for any chocolatey package with Appveyor)
The advantage with this approach is that you do not put an assumption about the maven version into the build script so it will work when the package is updated
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:06 AM.