title: Busybox wget to download jar fails with an error "wget: server returned error: HTTP/1.1 307 Temporary Redirect"
body: <p>I am using <code>adoptopenjdk/openjdk11:alpine-jre</code> base image for java and trying below instruction inside my Dockerfile,</p>
  <pre><code>RUN wget -O dd-java-agent.jar &quot;https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&amp;g=com.datadoghq&amp;a=dd-java-agent&amp;v=LATEST&quot;
  </code></pre>
  <p>which produces an error: <code>Connecting to repository.sonatype.org (18.208.14.211:443) wget: server returned error: HTTP/1.1 307 Temporary Redirect</code></p>
  <p><strong>Is there a way to download the latest version of jar file from nexus using wget utility available with Busybox?</strong></p>
  <p>Alpine version: v3.12.0 | Busybox version: v1.31.1</p>
  <p><strong>Note</strong>: If I specify the exact version of jar like <code>RUN wget -O dd-java-agent.jar 'https://repository.sonatype.org/service/local/repositories/central-proxy/content/com/datadoghq/dd-java-agent/0.38.0/dd-java-agent-0.38.0.jar'</code>
  it succeeded. I am aware of other option is to use curl in this case. Just trying to keep it simple and avoiding the installation of curl, its usage, and then removal.</p>