# MIssing artifacts for published plugin

**URL:** <https://discuss.gradle.org/t/missing-artifacts-for-published-plugin/23882>\
**Category:** Plugin Portal\
**Created:** [August 26, 2017, 2:13pm UTC](https://discuss.gradle.org/t/missing-artifacts-for-published-plugin/23882 "2017-08-26T14:13:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ingokegel](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/ingokegel/32/2126_2.png) [@ingokegel](https://discuss.gradle.org/u/ingokegel)\
**Post date:** [August 26, 2017, 2:13pm UTC](https://discuss.gradle.org/t/missing-artifacts-for-published-plugin/23882/1 "2017-08-26T14:13:22Z")

</div>

I’m trying to publish a new plugin for JProfiler integration to the Gradle plugin portal using Gradle 4.1. The publishing task is successful and prints:

```
Publishing plugin com.jprofiler version 10.1-PRE3
Publishing artifact file:/Users/ingo/projects/jprofiler/build/gradle/jprofiler/buildtools/gradle_publish/libs/jprofiler-gradle.jar
Publishing artifact file:/Users/ingo/projects/jprofiler/build/gradle/jprofiler/buildtools/gradle_publish/publish-generated-resources/pom.xml
Activating plugin com.jprofiler version 10.1-PRE3

```

However, when I try to use the plugin via

```
plugins {
    id 'com.jprofiler' version '10.1-PRE1'
}

```

the artifacts cannot be downloaded. The output is

```
Could not find gradle.plugin.jprofiler.jprofiler.buildtools:gradle_publish:10.1-PRE3.
 Searched in the following locations:
     https://plugins.gradle.org/m2/gradle/plugin/jprofiler/jprofiler/buildtools/gradle_publish/10.1-PRE3/gradle_publish-10.1-PRE3.pom
     https://plugins.gradle.org/m2/gradle/plugin/jprofiler/jprofiler/buildtools/gradle_publish/10.1-PRE3/gradle_publish-10.1-PRE3.jar

```

I’ve first used the publishing plugin like that:

```
plugin {
     id 'com.gradle.plugin-publish'
}

```

as I have successfully done in the past for another plugin. Then, upon reading that version 0.9.7 of the publishing plugin is now required, I tried

```
plugin {
     id 'com.gradle.plugin-publish' version '0.9.7'
}

```

as described here: [https://guides.gradle.org/publishing-plugins-to-gradle-plugin-portal/](https://guides.gradle.org/publishing-plugins-to-gradle-plugin-portal/)

which produces the error:

```
Error resolving plugin [id: 'com.gradle.plugin-publish', version: '0.9.7']
Plugin 'com.gradle.plugin-publish' is already on the script classpath. 
Plugins on the script classpath cannot be applied in the plugins {} block. 

```

although I have not put that plugin on the script classpath myself.

Using the `buildscript` syntax

```
buildscript {
    repositories {
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }
    dependencies {
        classpath "com.gradle.publish:plugin-publish-plugin:0.9.7"
    }
}

```

works, but the problem of the missing artifacts is not solved.

I’ve tried this several times with various local modifications, then with the theory that you could not have a plugin ID with two parts, so I tried the ID ‘com.jprofiler.gradle’ but the problem remains.

Could you please have a look at this?

---

<div class="post-metadata">

**Author:** ![tim\_yates](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/tim_yates/32/7849_2.png) [@tim\_yates](https://discuss.gradle.org/u/tim_yates)\
**Post date:** [August 30, 2017, 12:30pm UTC](https://discuss.gradle.org/t/missing-artifacts-for-published-plugin/23882/2 "2017-08-30T12:30:56Z")

</div>

Hi @ingokegel,

Firstly, sorry for the delay in getting back to you.

I can see the builds being pushed in the logs, but as you say they are not making it in to the repo successfully, will fail when the build tries to resolve them…

This does look like the issue we had with old versions of the publishing plugin.

Is your `build.gradle` or project available anywhere for me to have a look? No worries if not, I’ll try and get a reproducer on my end, to see if I can see what is going on.

Cheers,

Tim

---

<div class="post-metadata">

**Author:** ![ingokegel](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/ingokegel/32/2126_2.png) [@ingokegel](https://discuss.gradle.org/u/ingokegel)\
**Post date:** [August 30, 2017, 2:25pm UTC](https://discuss.gradle.org/t/missing-artifacts-for-published-plugin/23882/3 "2017-08-30T14:25:26Z")

</div>

Hi @tim_yates,

Sorry for wasting your time, while trying to create something reproducible, I discovered that I actually put 0.9.4 of the gradle publishing plugin on the script classpath in my buildSrc. When I removed that dependency, it worked.

Could you be so kind as to remove the following plugin versions:

com.jprofiler:10.1-PRE1  
com.jprofiler:10.1-PRE2  
com.jprofiler:10.1-PRE3  
com.jprofiler:10.1-PRE4  
com.jprofiler.gradle:10.1-pre4 ( I won’t use that ID at all)

---

<div class="post-metadata">

**Author:** ![tim\_yates](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/tim_yates/32/7849_2.png) [@tim\_yates](https://discuss.gradle.org/u/tim_yates)\
**Post date:** [August 30, 2017, 2:44pm UTC](https://discuss.gradle.org/t/missing-artifacts-for-published-plugin/23882/4 "2017-08-30T14:44:24Z")

</div>

No worries at all! I’m glad you got to the bottom of it 😃

I’ll get on to deleting those now, and will post here when they’re gone

Cheers,

Tim

---

<div class="post-metadata">

**Author:** ![tim\_yates](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/tim_yates/32/7849_2.png) [@tim\_yates](https://discuss.gradle.org/u/tim_yates)\
**Post date:** [August 30, 2017, 3:01pm UTC](https://discuss.gradle.org/t/missing-artifacts-for-published-plugin/23882/5 "2017-08-30T15:01:15Z")

</div>

That should all be done now 😃

Glad I could help!

Good luck, and have fun!

Tim
