2013-09-24 42 views
1

我BuildConfig.groovy文件錯誤加載BuildConfig:對於輸入字符串:「真正的」

grails.servlet.version = "3.0" // Change depending on target container compliance (2.5 or 3.0) 
    grails.project.class.dir = "target/classes" 
    grails.project.test.class.dir = "target/test-classes" 
    grails.project.test.reports.dir = "target/test-reports" 
    grails.project.work.dir = "target/work" 
    grails.project.target.level = 1.6 
    grails.project.source.level = 1.6 
    //grails.project.war.file = "target/${appName}-${appVersion}.war" 

grails.project.fork = [ 
    // configure settings for compilation JVM, note that if you alter the Groovy version forked compilation is required 
    // compile: [maxMemory: 256, minMemory: 64, debug: false, maxPerm: 256, daemon:true], 

    // configure settings for the test-app JVM, uses the daemon by default 
    test: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, daemon:true], 
    // configure settings for the run-app JVM 
    run: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false], 
    // configure settings for the run-war JVM 
    war: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false], 
    // configure settings for the Console UI JVM 
    console: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256] 
] 

grails.project.dependency.resolver = "maven" // or ivy 
grails.project.dependency.resolution = { 
    // inherit Grails' default dependencies 
    inherits("global") { 
     // specify dependency exclusions here; for example, uncomment this to disable ehcache: 
     // excludes 'ehcache' 
    } 
    log "error" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose' 
    checksums true // Whether to verify checksums on resolve 
    legacyResolve false // whether to do a secondary resolve on plugin installation, not advised and here for backwards compatibility 

    repositories { 
     inherits true // Whether to inherit repository definitions from plugins 

     grailsPlugins() 
     grailsHome() 
     mavenLocal() 
     grailsCentral() 
     mavenCentral() 
     // uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories 
     //mavenRepo "http://repository.codehaus.org" 
     //mavenRepo "http://download.java.net/maven/2/" 
     //mavenRepo "http://repository.jboss.com/maven2/" 
    } 

    dependencies { 
     // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g. 
     // runtime 'mysql:mysql-connector-java:5.1.24' 
    } 

    plugins { 
     // plugins for the build system only 
     build ":tomcat:7.0.42" 

     // plugins for the compile step 
     compile ":scaffolding:2.0.0" 
     compile ':cache:1.1.1' 

     // plugins needed at runtime but not for compilation 
     runtime ":hibernate:3.6.10.1" // or ":hibernate4:4.1.11.1" 
     runtime ":database-migration:1.3.5" 
     runtime ":jquery:1.10.2" 
     runtime ":resources:1.2" 
     // Uncomment these (or add new ones) to enable additional resources capabilities 
     //runtime ":zipped-resources:1.0.1" 
     //runtime ":cached-resources:1.1" 
     //runtime ":yui-minify-resources:0.1.5" 
    } 
} 

我使用Windows XP和我是在身份驗證的代理連接。是因爲連接的問題嗎?

回答

5

1測試將創建一個全新的項目,該項目將具有默認的buildconfig。然後嘗試刷新依賴,甚至可以添加新的插件來看看你得到同樣的問題

編輯補充:

http://lalitagarw.blogspot.co.uk/2011/06/grails-configuration-proxy-settings.html

GRAILS配置 - 代理設置 有兩個命令來設置代理中GRAILS。

Add Proxy - adds a proxy server setting in proxysettings.groovy file 
Set Proxy - sets the current proxy in the proxysettings.groovy file. 

的grails附加代理客戶端主機=代理服務器--port = 4300 --username =旅客--password =旅客 的grails設置代理客戶端

例如:

grails add-proxy myproxy --host=internet --port=8085 
grails set-proxy myproxy 

如果您使用的是Windows控制檯,則需要用雙引號括起參數。

grails add-proxy myproxy "--host=internet" "--port=8085" 
grails set-proxy myproxy 

然後可以在proxysettings.groovy文件中驗證設置。該文件可以位於.grails文件夾中。

這是從上面的鏈接,它添加到帖子的原因,因爲它已經解決了一些問題到目前爲止,並知道網絡來來去去。所以最好把它作爲答案的一部分,希望它仍然適用於所有人。

+0

是的,我已經通過創建一個新項目進行了測試,但出現了相同的錯誤。它的全新安裝和錯誤顯示當我運行grails run-app。 – blackhawk

+0

好的,但run-app會在運行之前下載依賴和編譯代碼。你有沒有試過註釋掉grails.project.fork的整個配置?因爲我沒有在我的這個啓用,並試圖使用上述沒有工作,當我跑run-app – Vahid

+0

仍然給錯誤...即使在註釋掉。是由於無法訪問存儲庫或其他什麼問題?因爲我在代理裏面,我應該在grails中設置代理嗎? – blackhawk

相關問題