在grails項目中,我爲每個參考文檔http://www.grails.org/doc/latest/guide/single.html#12.2%20Plugin%20Repositories添加了一個定製常春藤解析器。在Grails中,我如何指定常春藤解析器所需的罐子?
但是,這個解析器需要jsch和其他一些jar。我如何將它們放在項目的構建類路徑中,以便常青藤使用它們?
這是我BuildConfig.groovy
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.war.file = "target/${appName}-${appVersion}.war"
//Configure resolver
def sshResolver = new org.apache.ivy.plugins.resolver.SshResolver()
['libraries', 'builds'].each {
sshResolver.addArtifactPattern("/home/ivy/[organisation]/[revision]/[artifact].[ext]")
sshResolver.addIvyPattern("/home/ivy/[organisation]/[revision]/[artifact].[ext]")
}
sshResolver.name = "ssh"
sshResolver.settings = ivySettings
resolver sshResolver
grails.project.dependency.resolution = {
// inherit Grails' default dependencies
inherits("global") {
}
log "warn"
repositories {
grailsPlugins()
grailsHome()
grailsCentral()
ssh()
}
dependencies {
compile 'someorg:somejar:1.0'
runtime 'mysql:mysql-connector-java:5.1.13'
}
}
我試過編譯'com.jcraft:jsch:0.1.42' 不幸的是,它不是項目的依賴項,而是解析器。所以我在處理依賴關係之前得到錯誤。 – gabe 2010-10-22 19:30:12