# Using plugin faild for buildSrc project

**URL:** <https://discuss.gradle.org/t/using-plugin-faild-for-buildsrc-project/20116>\
**Category:** Help/Discuss\
**Tags:** plugins\
**Created:** [October 23, 2016, 1:35pm UTC](https://discuss.gradle.org/t/using-plugin-faild-for-buildsrc-project/20116 "2016-10-23T13:35:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinho](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/kevinho/32/5678_2.png) [@kevinho](https://discuss.gradle.org/u/kevinho)\
**Post date:** [October 23, 2016, 1:35pm UTC](https://discuss.gradle.org/t/using-plugin-faild-for-buildsrc-project/20116/1 "2016-10-23T13:35:44Z")

</div>

My environment:

gradlew version 2.14.1  
gradle version 3.1  
mac sierra  
jdk:

```gradle
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

```

I am building a multi-project project, with a buildSrc project.

I want to use `artifactory` plugin in this buildSrc project.

`buildSrc/build.gradle`

```gradle
buildscript {
    repositories {
       jcenter()
    }
    dependencies {
        classpath("org.jfrog.buildinfo:build-info-extractor-gradle:4.4.0") 
    }
}

repositories {
    jcenter()
}

apply plugin: 'com.jfrog.artifactory'
apply plugin: 'maven-publish'

artifactory {

}

```

i get the following error:

```gradle
Error:Could not find method artifactory() for arguments [artifactory_57tzk4yymlj2f7o2x2274ugd5$_run_closure2@33af4f71] on root project 'buildSrc' of type org.gradle.api.Project.

```

what is weird, when i using this plugin in a non-buildSrc project, it is ok.

My Question:

Is there any difference in classpath resolving policy between buildSrc project and non-buildSrc project? Why is it failed for my?

---

<div class="post-metadata">

**Author:** ![st\_oehme](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/st_oehme/32/5249_2.png) [@st\_oehme](https://discuss.gradle.org/u/st_oehme)\
**Post date:** [October 23, 2016, 2:02pm UTC](https://discuss.gradle.org/t/using-plugin-faild-for-buildsrc-project/20116/2 "2016-10-23T14:02:44Z")

</div>

The artifactory plugin [explicitly disables](https://github.com/JFrogDev/build-info/blob/595feff52b09f332df79d4d066555e70418b574a/build-info-extractor-gradle/src/main/groovy/org/jfrog/gradle/plugin/artifactory/ArtifactoryPluginBase.groovy#L38) itself on `buildSrc` projects. I suggest to open an issue there.

---

<div class="post-metadata">

**Author:** ![kevinho](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/kevinho/32/5678_2.png) [@kevinho](https://discuss.gradle.org/u/kevinho)\
**Post date:** [October 23, 2016, 2:18pm UTC](https://discuss.gradle.org/t/using-plugin-faild-for-buildsrc-project/20116/3 "2016-10-23T14:18:04Z")

</div>

thank god!

you just save me, i did not notice the log.

now i open an issue in

> <https://github.com/JFrogDev/project-examples/issues/55>

thanks a lot!
