title: How to tell if an artifact is in Nexus 3 without using Maven
body: <p>I need a way to use HTTPBuilder in Groovy/Java with a url to tell if an artifact is in a Nexus 3 repository or not. Maven is not available.</p>
  
  <pre><code>&lt;p&gt;This maven2 hosted repository is not directly browsable at this URL.&lt;/p&gt;
  </code></pre>
  
  <p>Sample code might be</p>
  
  <pre><code>String url = 'http://nexus.company.com:8081/nexus/repository/myrepo/com/company/sample-app/1.0.1/sample-app-1.0.1.war'
  new HTTPBuilder(url).get(path: '') { response -&gt;
     return response.statusLine.statusCode == 404
  }
  </code></pre>
  
  <p>Whether it's there or not, this will give me a 200 with a text/html response. </p>
  
  <p>Bonus points for how to do it without actually downloading the artifact if it's there.</p>