2013-11-20 99 views
2

在編譯項目時,出現下面提到的錯誤。編譯IntelliJ IDEA中的Grails項目時出現錯誤12.1.6

:: problems summary :: 
WARNINGS 

UNRESOLVED DEPENDENCIES  


:: commons-codec#commons-codec;1.6: configuration not found in commons- codec#commons-codec;1.6: 'master'. It was required from org.apache.httpcomponents#httpclient;4.2.1 compile 

:::::::::::::::::::::::::::::::::::::::::::::: 

請讓我解決這個問題。

回答

0

它看起來像你缺少一些依賴關係。使用命令提示符轉到你項目的根文件夾,然後運行以下Grails的命令(假設你已經添加的Grails到PATH):

{project_root_path}/ grails refresh-dependencies 
+0

它是「刷新依賴」。 – Saurabh

1

Grails的清潔

Grails的刷新依賴性

以上兩條命令幫助我解決了這個問題。

1

STEP 1

將日誌級別設置在BuilConfig.groovy

grails.project.dependency.resolution = { 

    inherits("global") { 
    } 

    log "verbose" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose' 
    ... 
} 

你會發現公共編解碼器~/.grails/ivy-cache

$ ll ~/.grails/ivy-cache/commons-codec/commons-codec/ 
total 40 
drwx------ 3 prayagupd prayagupd 4096 Feb 25 2014 ./ 
drwx------ 3 prayagupd prayagupd 4096 Dec 27 2013 ../ 
-rwx------ 1 prayagupd prayagupd 6289 Dec 27 2013 ivy-1.5.xml* 
-rwx------ 1 prayagupd prayagupd 6299 Dec 27 2013 ivy-1.5.xml.original* 
-rwx------ 1 prayagupd prayagupd 415 Feb 25 2014 ivy-1.6.xml* 
-rwx------ 1 prayagupd prayagupd 660 Nov 4 11:57 ivydata-1.5.properties* 
-rwx------ 1 prayagupd prayagupd 383 Nov 4 11:57 ivydata-1.6.properties* 
drwx------ 2 prayagupd prayagupd 4096 Feb 25 2014 jars/ 

STEP 2

長篇大論3210

其實在verbose模式下,它可能會告訴你去除~/.grails/ivy-cache

rm -r ~/.grails/ivy-cache 

STEP 3

消防任何命令你的愛,

grails clean && grails refresh-dependencies && grails compile

STEP 4

事情看起來不錯,你可以將日誌級別設置回warn,BuildConfig.groovy

相關問題