找不到Gradle,gae,appengine-web.xml和web.xml

时间:2012-07-28 16:58:03

标签: google-app-engine gradle

我刚刚开始使用gae插件。问题是,当我运行gradle gaeRun时,我得到了异常:

com.google.apphosting.utils.config.AppEngineConfigException:找不到../ myapp / build / explosion-war / WEB-INF / appengine-web.xml

到目前为止,我设法通过在gradle.build脚本中添加以下内容来解决问题:

gaeRun.doFirst{
copy {
    from('war/WEB-INF/') {
        include '**/*'
    }

    into 'build/exploded-war/WEB-INF/'
 }
}

这是正确的方法吗?以下是整个脚本:

apply plugin: 'gae'
apply plugin: 'eclipse'
apply plugin: 'scala'

task wrapper(type: Wrapper) {
gradleVersion = '1.0'
}

buildscript {
repositories { mavenCentral() }
dependencies { 
    classpath 'org.gradle.api.plugins:gradle-gae-plugin:0.7.6' 
}
}

repositories {
mavenCentral()
}

dependencies {
scalaTools 'org.scala-lang:scala-compiler:2.9.1'
scalaTools 'org.scala-lang:scala-library:2.9.1'

compile 'org.scala-lang:scala-library:2.9.1'
testCompile group: 'junit', name: 'junit', version: '4.8.2'
}

gae {
httpPort = 8085
optimizeWar = true

appcfg {
    email = 'email@gmail.com'
    passIn = true

    logs {
        severity = 1
        outputFile = file('mylogs.txt')
    }

    app { id = 'sample-app' }
}
}

gaeRun.doFirst{
    copy {
        from('war/WEB-INF/') {
        include '**/*'
    }

        into 'build/exploded-war/WEB-INF/'
 }
}

0 个答案:

没有答案