i used gradle to build my forge mod but i got these error
* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'net.minecraftforge.gradle.forge', artifact: 'com.github.asbyth:ForgeGradle:ddb1eb0'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'com.github.asbyth:ForgeGradle:ddb1eb0')
Searched in the following repositories:
MavenRepo
Gradle Central Plugin Repository
maven(https://maven.minecraftforge.net/)
maven2(https://jitpack.io/)
maven3(https://repo.spongepowered.org/repository/maven-public/)
also, is it due to my country internet filtering ?
Related
I have successfully published to Artifact Registry, and I can use artifacts from there in "normal" use: dependencies { implementation("mygroup:myartifact:myversion") }.
My issue is plugins. I have created a plugin. I can successfully publish it to Artifact Registry and also to Maven local. I can use it from Maven local, but I can't get my build script to take it from Artifact Registry.
buildscript {
repositories {
maven(url = uri("artifactregistry://us-west1-maven.pkg.dev/glitchy-maven/repo"))
}
}
plugins {
id("com.google.cloud.artifactregistry.gradle-plugin") version "2.1.1"
id("com.glitchybyte.gradle.plugin.buildinfo") version "1.0.0"
`java-library`
}
And I get:
* What went wrong:
Plugin [id: 'com.glitchybyte.gradle.plugin.buildinfo', version: '1.0.0'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'com.glitchybyte.gradle.plugin.buildinfo:com.glitchybyte.gradle.plugin.buildinfo.gradle.plugin:1.0.0')
Searched in the following repositories:
Gradle Central Plugin Repository
So, it's not looking into Artifact Registry for plugins. I know I'm missing something, but I don't know what.
...Update...
I removed buildscript from build.gradle.kts, and instead I added this to settings.gradle.kts:
pluginManagement {
plugins {
id("com.google.cloud.artifactregistry.gradle-plugin") version "2.1.1"
}
repositories {
maven(url = uri("artifactregistry://us-west1-maven.pkg.dev/glitchy-maven/repo"))
}
And I get:
* What went wrong:
Error resolving plugin [id: 'com.glitchybyte.gradle.plugin.buildinfo', version: '1.0.0']
> Could not resolve all dependencies for configuration 'detachedConfiguration1'.
> Not a supported repository protocol 'artifactregistry': valid protocols are [http, https, file, gcs, s3, sftp]
I'm trying to configure meecrowave gradle plugin according to this documentation:
This is my script:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "org.apache.meecrowave:meecrowave-gradle-plugin:1.2.6"
}
}
plugins {
id 'java'
id 'org.apache.meecrowave.meecrowave'
}
meecrowave {
httpPort = 9090
}
I'm getting this error message:
Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-5.0-bin.zip'.
Build file '/home/jcabre/projectes/digital/espaidoc/security/build.gradle' line: 12
Plugin [id: 'org.apache.meecrowave.meecrowave'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (plugin dependency must include a version number for this source)
Plugin [id: 'org.apache.meecrowave.meecrowave'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (plugin dependency must include a version number for this source)
I've also tried with:ยด
plugins {
id 'java'
id 'org.apache.meecrowave.meecrowave' version '1.2.6'
}
Then I get this message:
Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-5.0-bin.zip'.
Build file '/home/jcabre/projectes/digital/espaidoc/security/build.gradle' line: 12
Plugin [id: 'org.apache.meecrowave.meecrowave', version: '1.2.6'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.apache.meecrowave.meecrowave:org.apache.meecrowave.meecrowave.gradle.plugin:1.2.6')
Searched in the following repositories:
Gradle Central Plugin Repository
Plugin [id: 'org.apache.meecrowave.meecrowave', version: '1.2.6'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.apache.meecrowave.meecrowave:org.apache.meecrowave.meecrowave.gradle.plugin:1.2.6')
Searched in the following repositories:
Gradle Central Plugin Repository
PARENT GRADLE
plugins {
id "base"
id 'com.github.spotbugs' version '1.6.8' apply false
id 'io.franzbecker.gradle-lombok' version '2.0' apply false
id 'fish.payara.micro-gradle-plugin' version '1.0.0' apply false
}
apply from: "$projectDir/gradle/java.gradle"
apply from: "$projectDir/gradle/spotbugs.gradle"
apply from: "$projectDir/gradle/checkstyle.gradle"
apply from: "$projectDir/gradle/pmd.gradle"
apply from: "$projectDir/gradle/jacoco.gradle"
apply from: "$projectDir/gradle/repositories.gradle"
apply from: "$projectDir/gradle/payara.gradle"
The problem is that this plugin is not published to the official Gradle plugins portail , so you cannot use plugins {} DSL (or you need to configure the pluginManagement.resolutionStrategy, see enter link description here )
The other problem is that the documentation you mentioned is not up-to-date !
The plugin ID has been changed to org.apache.microwave.microwave
Easiest way to apply this plugin:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "org.apache.meecrowave:meecrowave-gradle-plugin:1.2.6"
}
}
// use "new" plugin ID
apply plugin: "org.apache.microwave.microwave"
// or use directly PLugin class
//apply plugin: org.apache.meecrowave.gradle.MeecrowavePlugin
EDIT see Romain's answer for more accurate details about this issue.
just to let you know that the plugin id issue was not a "renaming" but a forgotten renaming (originally meecrowave was named microwave before joining openwebbeans project).
I fixed the plugin id in https://issues.apache.org/jira/browse/MEECROWAVE-186 and updated the doc to reflect that. Note that the doc is not in the sources itself but online at http://openwebbeans.apache.org/meecrowave/meecrowave-gradle/index.html.
Romain
When I tried to refresh Gradle project , I encountered this error:
Plugin [id: 'org.jetbrains.kotlin.jvm'] was not found in any of the following sources:
Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
Plugin Repositories (plugin dependency must include a version number for this source)
How to solve this issue?
You just forgot to specify the plugin version, which is mandatory for "not Core" plugins:
For example :
plugins {
application
kotlin("jvm") version "1.3.10"
}
See:
https://kotlinlang.org/docs/reference/using-gradle.html
https://docs.gradle.org/current/javadoc/org/gradle/plugin/use/PluginDependenciesSpec.html
I forked (spring-frameword)
when I use idea build it,some wrong.
Plugin [id: 'io.spring.dependency-management', version: '1.0.5.RELEASE', apply: false] was not found in any of the following sources:
Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
Plugin Repositories (could not resolve plugin artifact 'io.spring.dependency-management:io.spring.dependency-management.gradle.plugin:1.0.5.RELEASE')
Searched in the following repositories:
Gradle Central Plugin Repository
Open File
thanks for #Raffaele,just check you gradle.properties first.
I use Mac and the default setting,in .gragle.
I'm tryinging to create a plugin for intellij using gradle, I've followed jetbrains tutorial:
https://www.jetbrains.org/intellij/sdk/docs/tutorials/build_system/prerequisites.html
and I get the following error:
Plugin [id: 'org.jetbrains.intellij', version: '0.3.9'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.intellij:org.jetbrains.intellij.gradle.plugin:0.3.9')
Searched in the following repositories:
Gradle Central Plugin Repository
Taking a look at the gradle build file, there is the following lines:
plugins {
id 'java'
id 'org.jetbrains.intellij' version '0.3.9'
}
How do I find out what version of org.jetbrains.intellij I do have? How do I get 0.3.9?
My version of intellij is 2018.2.2 Community