Note that there are some explanatory texts on larger screens.

plurals
  1. PODownload latest release from Artifactory with Gradle
    primarykey
    data
    text
    <p>Artifactory has a feature of their API where you can download the latest release of a jar file (See <a href="http://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-RetrieveLatestArtifact" rel="nofollow">http://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API#ArtifactoryRESTAPI-RetrieveLatestArtifact</a>).</p> <p>Their example is: GET http://localhost:8080/artifactory/ivy-local/org/acme/[RELEASE]/acme-[RELEASE].jar</p> <p>I'm working on a project where all builds get published and I want to grab the jar from the last one. So what I'm looking for is a dependency like this in gradle:</p> <pre><code>compile "org.acme:acme:1.0.0.9.[RELEASE]" </code></pre> <p>This fails due to escaping of the square brackets so I tried:</p> <pre><code>compile "org.acme:acme:1.0.0.9.%5BRELEASE%5D" </code></pre> <p>This seems to allow gradle/ivy to find the file but it fails because the .pom file version does not match what is defined.</p> <pre><code>FAILURE: Build failed with an exception. * What went wrong: Could not resolve all dependencies for configuration ':project:compile'. &gt; Could not resolve org.acme:acme:1.0.0.9.%5BRELEASE%5D. Required by: org.acme:acme:unspecified &gt; Could not resolve org.acme:acme:1.0.0.9.%5BRELEASE%5D. &gt; inconsistent module metadata found. Descriptor: CachedResource: /Users/xxxx/.gradle/caches/artifacts-26/filestore/org.acme/acme/1.0.0.9.%5BRELEASE%5D/pom/3986d9c1a27873ce92c0dbd089fc1ca9618f8c1a/acme-1.0.0.9.%5BRELEASE%5D.pom for http://localhost/artifactory/org/acme/acme/1.0.0.9.%5BRELEASE%5D/acme-1.0.0.9.%5BRELEASE%5D.pom Errors: bad version: expected='1.0.0.9.%5BRELEASE%5D' found='1.0.0.9.80' </code></pre> <p>Is there any way to get gradle and ivy to pull the latest release from artifactory?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload