rmetzger commented on a change in pull request #11314: [FLINK-16411][AZP] Use
google mvn mirror globally
URL: https://github.com/apache/flink/pull/11314#discussion_r398156298
##########
File path: tools/azure-pipelines/jobs-template.yml
##########
@@ -160,14 +160,17 @@ jobs:
echo "##vso[task.setvariable variable=PATH]$JAVA_HOME_11_X64/bin:$PATH"
displayName: "Set to jdk11"
condition: eq('${{parameters.jdk}}', 'jdk11')
- - script: ./tools/travis/setup_maven.sh
+ - script: |
+ source ./tools/ci/maven-utils.sh
+ setup_maven
+ echo "##vso[task.setvariable variable=M2_HOME]$M2_HOME"
Review comment:
I agree that this is not optimal, but in my evaluation, this proposal seems
to be the least ugliest approach.
I first considered adding the maven setup into the `run-nightly-tests.sh`
script. But that would install maven in the user's home directory, when running
the script locally.
The `azure_controller.sh` script is another option, yes. And in some sense
is the azure_controller.sh an environment specific script.
> For example, why are we only carrying over the M2_HOME variable, and not
PATH?
In my mental model, the contract of `run_mvn` is that is runs "mvn" from
`PATH`, unless `M2_HOME` is set. If `M2_HOME` is set, it uses that mvn
installation.
Exporting PATH as well would be redundant (I should actually remove the
`export PATH=${M2_HOME}/bin:${PATH}` line from the `setup_maven` function.
How about doing that + adding a comment about the contract?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services