我正在尝试根据此documentation配置meecrowave gradle插件:

这是我的脚本:

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
}

我收到此错误消息:
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)

我也尝试过:
plugins {
  id 'java'
  id 'org.apache.meecrowave.meecrowave' version '1.2.6'
}

然后我收到此消息:
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

父级
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"

最佳答案

只是让您知道,插件ID问题不是“重命名”而是被遗忘的重命名(在加入openwebbeans项目之前,meecrowave最初被命名为Microwave)。

我在https://issues.apache.org/jira/browse/MEECROWAVE-186中修复了插件ID,并更新了文档以反射(reflect)这一点。请注意,该文档不在源文件中,而是在http://openwebbeans.apache.org/meecrowave/meecrowave-gradle/index.html上在线提供。

罗曼

关于gradle - Gradle:未找到Meecrowave插件,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/54667357/

10-09 09:20