I am using elastic apm agent for monitoring, I have to download the apm-agent.jar and included it in my start entry point like java -javaagent:/path/to/apm-agent.jar app.jar
.
The problem is I have to manually download the apm-agent.jar, is there a way that I can configure the apm agent in my Gradle dependencies? and then refer to the path of the jar file that was downloaded by gradle in the Dockerfile?
What is the proper way of dependency management for jar files like java agent?