2016-06-13 119 views
1

我正在嘗試在我的spring-mvc項目中包含splunk日誌記錄。 當我添加以下依賴於我的gradle這個編譯:Spring-Integration-Splunk依賴項問題

compile group: 'org.springframework.integration', name: 'spring-integration-splunk', version: '1.1.0.RELEASE' 

我收到以下錯誤:

Could not resolve all dependencies for configuration ':runtimeCopy'. 
    > Could not find com.splunk:splunk:1.3.0. 
    Searched in the following locations: 
     file:/Users/praveen/.m2/repository/com/splunk/splunk/1.3.0/splunk-1.3.0.pom 
     file:/Users/praveen/.m2/repository/com/splunk/splunk/1.3.0/splunk-1.3.0.jar 
     https://repo1.maven.org/maven2/com/splunk/splunk/1.3.0/splunk-1.3.0.pom 
     https://repo1.maven.org/maven2/com/splunk/splunk/1.3.0/splunk-1.3.0.jar 
    Required by: 
     :searchMart:unspecified > org.springframework.integration:spring-integration-splunk:1.1.0.RELEASE 

我想看看安裝splunk版本,它無法找到,但也拋出錯誤。有關如何解決此問題的任何線索?

回答

1

spring-integration-splunk託管在maven中央。但要下載splunk本身,您需要定義附加的回購:

apply plugin: 'java' 

repositories { 
    mavenCentral() 
    maven { 
     url 'http://splunk.artifactoryonline.com/splunk/ext-releases-local' 
    } 
} 

dependencies { 
    compile 'org.springframework.integration:spring-integration-splunk:1.1.0.RELEASE' 
} 

task copyDeps(type: Copy) { 
    from configurations.compile 
    into 'libs' 
} 
+0

謝謝你解決了這個問題。 但我仍然無法找到SplunkLogEvent類。你會不會知道爲什麼? – Praveen

+0

@Praveen,遺憾的是根本沒有使用eclipse。也許嘗試清除緩存並重新啓動項目。 – Opal

+0

@Praveen,如果我的答案解決了依賴性問題,請接受答案。 – Opal