执行脚本战争时出错

时间:2015-09-07 11:30:21

标签: grails

当我创建grails 1.3.7应用程序之战时。我看到了一个错误。

Welcome to Grails 1.3.7 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: /home/remya/Documents/Grails-1.3.7/
Base Directory: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1
Resolving dependencies...
Dependencies resolved in 22923ms.
Running script /home/remya/Documents/Grails-1.3.7/scripts/War.groovy
Environment set to production
  [groovyc] Compiling 1 source file to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/classes
     [copy] Copying 1 file to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work
     [gspc] Compiling 334 GSP files for package [medical] to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/classes
     [gspc] Compiling 41 GSP files for package [springSecurityUi] to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/classes
     [gspc] Compiling 4 GSP files for package [mail] to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/classes
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage
Building WAR file ...
     [copy] Copying 1052 files to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage
     [copy] Copied 93 empty directories to 4 empty directories under /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/plugins/ui-performance-1.2.2
     [copy] Copying 1 file to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/plugins/ui-performance-1.2.2
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/plugins/rest-0.7
     [copy] Copying 32 files to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/plugins/rest-0.7
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/plugins/spring-security-ui-0.1.2
     [copy] Copying 57 files to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/plugins/spring-security-ui-0.1.2
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/plugins/mail-1.0
     [copy] Copying 32 files to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/plugins/mail-1.0
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/plugins/jquery-1.7.1
     [copy] Copying 2 files to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/plugins/jquery-1.7.1
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/plugins/jquery-ui-1.8.15
     [copy] Copying 79 files to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/plugins/jquery-ui-1.8.15
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/plugins/famfamfam-1.0
     [copy] Copying 1000 files to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/plugins/famfamfam-1.0
     [copy] Copying 348 files to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/grails-app
     [copy] Copied 62 empty directories to 4 empty directories under /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/grails-app
     [copy] Copying 400 files to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/classes
     [copy] Copying 5023 files to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/classes
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/spring
     [copy] Copying 2 files to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/classes
     [copy] Copied 2 empty directories to 1 empty directory under /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/classes
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/templates/scaffolding
     [copy] Copying 6 files to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/templates/scaffolding
     [copy] Copying 90 files to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/lib
     [copy] Copying 1 file to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF
   [delete] Deleting: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/resources/web.xml
     [copy] Copying 4 files to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/lib
     [copy] Copying 1 file to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/lib
[propertyfile] Updating property file: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/classes/application.properties
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/ui-performance-1.2.2
     [copy] Copying 1 file to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/ui-performance-1.2.2
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/rest-0.7
     [copy] Copying 1 file to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/rest-0.7
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/spring-security-ui-0.1.2
     [copy] Copying 43 files to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/spring-security-ui-0.1.2
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/mail-1.0
     [copy] Copying 7 files to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/mail-1.0
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/hibernate-1.3.7
     [copy] Copying 1 file to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/hibernate-1.3.7
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/jquery-1.7.1
     [copy] Copying 2 files to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/jquery-1.7.1
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/jquery-ui-1.8.15
     [copy] Copying 2 files to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/jquery-ui-1.8.15
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/famfamfam-1.0
     [copy] Copying 1 file to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/famfamfam-1.0
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/spring-security-acl-1.1
     [copy] Copying 1 file to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/spring-security-acl-1.1
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/aws-1.2.12.2
     [copy] Copying 1 file to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/aws-1.2.12.2
    [mkdir] Created dir: /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/spring-security-core-1.2.7.2
     [copy] Copying 3 files to /home/remya/Documents/workspace-ggts-3.6.0.RELEASE/purpleHealthV1/target/work/stage/WEB-INF/plugins/spring-security-core-1.2.7.2
UiPerformance: versioning resources ...
java.lang.ArrayIndexOutOfBoundsException: 3

1 个答案:

答案 0 :(得分:0)

我刚刚看到同样的错误,这是由ui-performance插件(版本1.2.2)中的第67行的ResourceVersionHelper.groovy引起的。它似乎试图从SVN文件中找到导致错误的版本号(可能是错误的格式?)。

    File entries = new File(basedir, '.svn/entries')
    if (entries.exists()) {
        return entries.text.split('\n')[3].trim() //this throws the error
    }

在代码中的这一行之上,它首先在配置文件中查找一个闭包以获取版本号,因此通过在Config.groovy中提供此闭包,它不再尝试从这个神秘文件中找到版本号。

以下是修正错误的方法 - Config.groovy中的一个关闭,返回版本' 1.2.2'

uiperformance {
    determineVersion = {
        "1.2.2"
    }
}
相关问题