0
votes

I am running a java code with yaml pipeline with self hosted agent,But it shows below error

##[error]No agent found in pool Winagentpool which satisfies the specified demands: maven, Agent.Version -gtVersion 2.163.1

Can someone help me out on this,Thanks in advance.

1

1 Answers

0
votes

Demands are a way of saying "I need the agent to have this capabilities in order to run". Capabilities are basically key-value tags assigned to agents. When an agent starts, it analyses its environment, and tries to detect things like OS version, agent version, availability of SDKs (like java), etc. In this case, your pipeline wants an agent with version >= 2.163.1 and with Maven available.

You can view and configure agent capabilities in Organization settings->Agent pools.

The error suggests that your agent version is to old and/or it didn't detect maven installation. Verify agent version and check if M2_HOME env variable is defined on the agent (system-wide).

As a way of last resort, you can try and add maven capability manually.