- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
现在寻找这个解决方案太久了,我不确定我是错过了它还是只是输入了错误的东西,但是我的 Gradle 脚本无法编译。我正在迁移到 Gradle,并且对它非常陌生。我非常习惯使用 Maven 进行依赖管理,但 Gradle 似乎是我现在最好的选择。通过运行这段代码:
dependencies {
compile group: 'org.bukkit', name: 'bukkit', version: '1.7.9-R0.1-SNAPSHOT'
compile('io.ibj:MattLib:1.1-SNAPSHOT') {
exclude group: 'de.bananaco'
exclude 'net.milkbowl:vault:1.2.27'
}
compile group: 'net.citizensnpcs', name: 'citizens', version: '2.0.12'
compile group: 'com.sk89q', name: 'worldedit', version: '5.6.1'
compile group: 'com.sk89q', name: 'worldguard', version: '5.9'
compile group: 'net.milkbowl', name: 'vault', version: '1.2.12'
compile fileTree(dir: 'libs', includes: ['*.jar'])
}
注意:我确实应用了 java、maven、nexus、shadow 和 rebel 插件。
当我运行我的 Gradle 任务时,我遇到了这个错误:
Could not find method compile() for arguments [[io.ibj:MattLib:1.1-SNAPSHOT], build_1b5iofu9r9krp7o8mme0dqo9l$_run_closure2_closure8@66fb45e5] on root project 'project'
如果我从我的项目中删除 MattLib
依赖项并将其重新插入
compile 'io.ibj:MattLib:1.1-SNAPSHOT'
脚本完成,但我有依赖问题。我在这里阅读:
dependencies {
compile("org.gradle.test.excludes:api:1.0") {
exclude module: 'shared'
}
}
(来自第50章来自the Gradle Manual)
我所拥有的应该可以工作,但我很困惑为什么它不工作。
gradle --version
输出:
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013
Ivy: 2.2.0
JVM: 1.8.0_05 (Oracle Corporation 25.5-b02)
OS: Windows 7 6.1 amd64
最佳答案
注意Java插件引入的compile
、runtime
、testCompile
和testRuntime
配置已经已弃用 Gradle 4.10 ( Aug 27, 2018 ),并最终在 Gradle 7.0 中被删除(Apr 9, 2021)。
上述配置应分别替换为implementation
、runtimeOnly
、testImplementation
和testRuntimeOnly
。
关于java - 找不到参数 Gradle 的方法 compile(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23796404/
例如,我有一个父类Author: class Author { String name static hasMany = [ fiction: Book,
代码如下: dojo.query(subNav.navClass).forEach(function(node, index, arr){ if(dojo.style(node, 'd
我有一个带有 Id 和姓名的学生表和一个带有 Id 和 friend Id 的 Friends 表。我想加入这两个表并找到学生的 friend 。 例如,Ashley 的 friend 是 Saman
我通过互联网浏览,但仍未找到问题的答案。应该很容易: class Parent { String name Child child } 当我有一个 child 对象时,如何获得它的 paren
我正在尝试创建一个以 Firebase 作为我的后端的社交应用。现在我正面临如何(在哪里?)找到 friend 功能的问题。 我有每个用户的邮件地址。 我可以访问用户的电话也预订。 在传统的后端中,我
我主要想澄清以下几点: 1。有人告诉我,在 iOS 5 及以下版本中,如果您使用 Game Center 设置多人游戏,则“查找 Facebook 好友”(如与好友争夺战)的功能不是内置的,因此您需要
关于redis docker镜像ENTRYPOINT脚本 docker-entrypoint.sh : #!/bin/sh set -e # first arg is `-f` or `--some-
我是一名优秀的程序员,十分优秀!