Hi Mark,

I'll start by saying using Gradle is a good idea, having said that you are
right the 2.0.4 is not compatible with M6 but we are working on it and it
should be released real soon.

For making things to start rolling you can either download the latest
Gradle plugin snapshot from
here<http://repo.jfrog.org/artifactory/simple/libs-snapshots-local/org/jfrog/buildinfo/build-info-extractor-gradle/2.0.x-SNAPSHOT/>and
place it in your Gradle M6 installation under  lib\plugins or try
using
this init.gradle

String pluginVersion='2.0.x-20111123.143146-11'
def artifactoryPluginUrl = "
http://repo.jfrog.org/artifactory/libs-snapshots-local/org/jfrog/buildinfo/build-info-extractor-gradle/2.0.x-SNAPSHOT/build-info-extractor-gradle-${pluginVersion}-uber.jar
"
//def artifactoryPluginUrl = "
http://repo.jfrog.org/artifactory/libs-releases/org/jfrog/buildinfo/build-info-extractor-gradle/$pluginVersion/build-info-extractor-gradle-$pluginVersion-uber.jar
"

def file = new File(gradle.gradleUserHomeDir,
"plugins/artifactory-$pluginVersion-uber.jar")
if (!file.exists()) {
    file.parentFile.mkdirs()
    println "Downloading the latest Artifactory plugin to
'$file.absolutePath'..."
    file << artifactoryPluginUrl.toURL().openStream()
    println "Artifactory plugin succesfully downloaded."
}

gradle.projectsLoaded {
    rootProject.allprojects {
        buildscript.dependencies.classpath files(file)
    }
}

HTH,

Eli

On Thu, Nov 24, 2011 at 5:41 PM, Mark Maxey <[email protected]> wrote:

> I am using gradle-1.0-milestone-6. I tried using the Jenkins Artifactory
> Plugin version 
> 2.0.4<https://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin>,
> but it fails with
>
> 14:32:07.928 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: 
> java.lang.NoSuchMethodError: 
> org.gradle.api.artifacts.Configuration.getArtifacts()Ljava/util/Set;
>
> This makes me think that this plugin doesn't support Gradle post milestone
> 3.
>
> So, I decided to publish from Gradle directly. I tried following the
> instructions located on the JFrog 
> wiki<http://wiki.jfrog.org/confluence/display/RTF/Gradle+Artifactory+Plugin+using+the+snapshot+version>,
> but neither option worked.
>
> First, I put build-info-extractor-gradle-2.0.x-20111123.143146-11-uber.jar
> into C:\Users\mmaxey\lib\gradle\gradle-1.0-milestone-6\lib\plugins. When I
> run "gradle tasks" using the attached 
> build.gradle<http://forums.jfrog.org/file/n7028576/build.gradle>,
> I get the following error indicating it couldn't find the JAR
>
> Cause: Could not find method artifactory() for arguments 
> [build_5m0on46jt8hrhidkd3pd27nk8u$_run_closure4@74d175ff] on root project '
> quickstart'.
>
> I then tried the second option using 
> init.gradle<http://forums.jfrog.org/file/n7028576/init.gradle>and received 
> the following exception:
>
> 07:54:37.115 [ERROR] [org.gradle.BuildExceptionReporter] 
> org.gradle.api.internal.artifacts.ivyservice.ModuleVersionNotFoundException: 
> Could not find group:org.jfrog.buildinfo, module:build-info-extractor-gradle, 
> version:2.0.x-SNAPSHOT.
>
> If you do a GAVC search in http://repo.jfrog.org, it will fail to find
> the above module ID. I'm guessing this is because the POM version is
> 2.0.x-SNAPSHOT but the the JAR's version is 2.0.x-20111123.143146-11? The
> GAVC fails with either version ID. Same with the init.gradle.
>
> I then tried copying the JAR into my own local Artifactory instance, but
> ran into several problems (I won't go into here).
>
> All told, I've spent about 5 hours on this. I get super frustrated by
> these kinds of problems. It makes me question whether using Gradle is a
> good idea ...
>
> ------------------------------
> View this message in context: Publishing Build Info via Gradle post
> milestone-3<http://forums.jfrog.org/Publishing-Build-Info-via-Gradle-post-milestone-3-tp7028576p7028576.html>
> Sent from the Artifactory - Users mailing list 
> archive<http://forums.jfrog.org/Artifactory-Users-f2377369.html>at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> Artifactory-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/artifactory-users
>
>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users

Reply via email to