【发布时间】:2017-10-04 16:04:33
【问题描述】:
我正在尝试迁移到 GAE 框架 2.0。当我阅读文档时,我意识到当我将这一行添加到 build.gradle 时。
apply plugin: 'com.google.cloud.tools.endpoints-framework-server'
我可以这个错误信息:
错误:无法添加名称为“端点”的配置作为 具有该名称的配置已存在。
有人遇到同样的错误吗?
我的 build.gradle 如下:
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.google.appengine:gradle-appengine-plugin:+'
classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:+'
}
}
repositories {
mavenCentral()
jcenter()
}
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'appengine'
apply plugin: 'com.google.cloud.tools.endpoints-framework-server'
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
dependencies {
appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.56'
testCompile 'junit:junit:4.12'
testCompile 'com.google.appengine:appengine-testing:1.9.56'
testCompile 'com.google.appengine:appengine-api-stubs:1.9.56'
// 2.0
compile group: 'com.google.endpoints', name: 'endpoints-framework', version: '+'
compile group: 'com.googlecode.junit-toolbox', name: 'junit-toolbox', version: '1.5'
compile 'com.google.appengine:appengine-endpoints:1.9.50'
compile 'com.google.appengine:appengine-endpoints-deps:1.9.50'
compile 'com.googlecode.objectify:objectify:5.1.5'
compile 'org.json:json:20151123'
compile 'javax.servlet:servlet-api:2.5'
compile 'org.apache.httpcomponents:httpclient:4.5.2'
compile 'com.ganyo:gcm-server:1.0.2'
compile 'com.google.appengine.tools:appengine-gcs-client:0.4.4'
//compile 'commons-fileupload:commons-fileupload:1.3.1'
compile 'com.google.apis:google-api-services-storage:v1-rev66-1.21.0'
}
appengine {
downloadSdk = true
appcfg {
oauth2 = true
}
endpoints {
getClientLibsOnBuild = true
getDiscoveryDocsOnBuild = true
}
httpAddress = "0.0.0.0"
}
【问题讨论】:
标签: google-app-engine gradle plugins