Open Varorbc opened 1 month ago
Hi @Varorbc, thank you for the question! The maven demands were added to a task to ensure that the maven is installed in the self-hosted/ms-hosted agents. It is a common practice for the in-the-box tasks to ensure that the agent will be able to execute a task properly. If you want to bypass it to run the pipeline and execute step with maven installation before the maven task, you can define new capability in user-capabilities with name "maven" to run the task on the agent where the maven is not installed.
@DmitriiBobreshev I feel like this doesn’t really make it ‘plug and play’—it actually makes it harder to use because Maven has to be installed on the agent beforehand. The example you mentioned with npm works right out of the box because we can use a Node task to install Node on the agent, and Node comes with npm included, so it’s truly plug and play. Note that Node doesn’t need to be pre-installed on the agent. I think the Maven task should remove the dependency requirement and work more like the Gradle or .NET tasks, where it downloads what it needs on its own, rather than requiring it to be pre-installed on the agent.
New issue checklist
Task name
Maven@4
Task version
No response
Issue Description
Why do we need to install Maven ahead of time on the proxy instead of just using mvnw.cmd to download the needed version of Maven?
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
Azure DevOps Server (Please specify exact version in the textbox below)
Azure DevOps Server Version (if applicable)
No response
Operation system
Ubuntu 20.04
Relevant log output
Full task logs with system.debug enabled
No response
Repro steps
No response