<p>Installing it as a tool allows Jenkins to manage the binary and ensure it's available for your build while also providing supporting pipeline syntax <code>withEnv()</code>. Having an agent with the binary allows you to shell out and run your commands using <code>sh</code> without <code>withEnv()</code>. It also allows you to decide where these binaries come from depending on your agent type (<em>static, vm, container, pod</em>).</p>

<p>Personally, I prefer the latter because I can control the updating of said binaries on the agent in a more automated fashion.</p>

CC BY-SA 4.0
2019-05-20T18:30:47.123Z
2019-05-20T18:30:47.123Z
casey vega
<p>What is the difference between using maven as a tool versus having a slave that has maven installed? </p>

<p>I am using Jenkins on OCP and it came with a slave image for maven and not setup as a tool. I now need to install gradle and I am wondering if I should add it as a tool or make a slave with it installed.</p>

<jenkins><gradle>
Jenkins Tool vs Slave local tool
ssc327
# Jenkins Tool vs Slave local tool

(Asked by: username_0 on 2019-05-13)

What is the difference between using maven as a tool versus having a slave that has maven installed?

I am using Jenkins on OCP and it came with a slave image for maven and not setup as a tool. I now need to install gradle and I am wondering if I should add it as a tool or make a slave with it installed.

**Tags:** jenkins, gradle


---

## 1 answers

### Answer by username_1 on 2019-05-20. Score: 1

Installing it as a tool allows Jenkins to manage the binary and ensure it's available for your build while also providing supporting pipeline syntax `withEnv()`. Having an agent with the binary allows you to shell out and run your commands using `sh` without `withEnv()`. It also allows you to decide where these binaries come from depending on your agent type (*static, vm, container, pod*).

Personally, I prefer the latter because I can control the updating of said binaries on the agent in a more automated fashion.


---

