古いバージョンのLog4Jを使用するCiscoのサードパーティJavaAPIを使用する必要があります。1.1.3スタンドアロンで実行すると、明らかにAPIは正常に動作しますが、Grails(1.3.7)から実行すると、「操作が見つかりません」でクラッシュします。 Log4jの初期化中の例外。
この衝突を解決するにはどうすればよいですか?
これは、libフォルダにciscolibを含むBuildConfigの実際のプラグインです。
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"
grails.plugin.location.'advoss-orm-core' = "../../../advoss-orm-core-grails-plugin/branches/ShahbazORMPlugin"
grails.project.dependency.resolution = {
// inherit Grails' default dependencies
inherits("global") {
// uncomment to disable ehcache
// excludes 'ehcache'
}
log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
repositories {
grailsPlugins()
grailsHome()
grailsCentral()
// uncomment the below to enable remote dependency resolution
// from public Maven repositories
mavenLocal()
mavenCentral()
flatDir name:"lib", dirs:"lib"
//mavenRepo "http://snapshots.repository.codehaus.org"
//mavenRepo "http://repository.codehaus.org"
//mavenRepo "http://download.java.net/maven/2/"
//mavenRepo "http://repository.jboss.com/maven2/"
}
dependencies {
runtime('mysql:mysql-connector-java:5.1.16') {
transitive = false
}
compile ':command:1.0',
':commons-codec:1.3',
':commons-httpclient:3.1',
':commons-logging:1.1.1',
':deltawing:1.0',
':deltaxml:1.0',
':isorelax:1.0',
':jhall:1.0',
':jing:1.0',
':junit-dep:4.9b2',
':marklogic-xcc:4.2.2',
':metadata-extractor:2.3.1',
':msv:1.0',
':resolver:1.0',
':saxon:9pe',
':tagsoup:1.2',
':xep:1.0',
':xmlunit:1.3'
}
}
上記のプラグインを含み、Log4jエラーでCiscoライブラリ呼び出しを実行できないプロジェクトのビルド構成は次のとおりです。
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.plugin.location.'adv-provisioning-server' = "../../../adv-provisioning-server/branches/AlamSher_AdvProvisioningServer"
grails.plugin.location.'advoss-orm-core' = "../../../advoss-orm-core-grails-plugin/branches/ShahbazORMPlugin"
//grails.plugin.location.'advoss-trouble-ticket' = "../../../advoss-trouble-ticket-grails-plugin/branches/ShahbazTroubleTicketPlugin"
//grails.project.war.file = "target/${appName}-${appVersion}.war"
grails.project.dependency.distribution = {
remoteRepository(id: "release", url: "http://192.168.0.2:8080/artifactory/plugins-release-local") {
authentication username: "maven_user", password: "mav3nus3r"
}
}
grails.project.dependency.resolution = {
pom true
// inherit Grails' default dependencies
inherits("global") {
// uncomment to disable ehcache
// excludes 'ehcache'
}
log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
repositories {
mavenLocal()
mavenCentral()
mavenRepo "http://repository.codehaus.org"
mavenRepo "http://download.java.net/maven/2/"
grailsPlugins()
grailsHome()
grailsCentral()
}
dependencies {
runtime('mysql:mysql-connector-java:5.1.16') {
transitive = false
}
compile 'jaxfront:jaxfront-html:1.0',
'jaxfront:jaxfront-pdf:1.0',
'jaxfront:jaxfront-core:1.0',
'advoss-voms:VomsWSClient:1.0',
'com.lowagie:itext:2.1.7',
'freemarker:freemarker:2.3.9',
// 'net.sourceforge.barbecue:barbecue:1.5-beta1',
// 'net.sf.jasperreports:jasperreports-fonts:4.0.0',
// 'net.sf.jasperreports:jasperreports-javaflow:3.7.5',
'commons-httpclient:commons-httpclient:3.1',
'commons-net:commons-net:20030805.205232'
// compile('net.sf.jasperreports:jasperreports:4.0.1') {
// transitive = false
// }
compile('net.sf.jasperreports:jasperreports:4.1.2') {
excludes 'poi-ooxml', 'antlr', 'commons-beanutils',
'commons-collections', 'commons-logging',
'ant', 'mondrian', 'commons-javaflow',
'barbecue', 'xml-apis-ext', 'xml-apis',
'xalan', 'groovy-all', 'hibernate',
'saaj-api', 'servlet-api', 'xercesImpl', 'xmlParserAPIs',
'spring-core', 'bsh', 'spring-beans', 'jaxen',
'barcode4j', 'batik-svg-dom', 'batik-xml',
'batik-awt-util', 'batik-dom', 'batik-css',
'batik-gvt', 'batik-script', 'batik-svggen',
'batik-util', 'batik-bridge', 'persistence-api',
'jdtcore', 'bcmail-jdk14', 'bcprov-jdk14', 'bctsp-jdk14'
}
}
plugins {
compile ':jsecurity:0.4.1',
':message-digest:1.1',
':quartz:0.4.2',
':export:0.7',
':jquery:1.4.4.1',
':jquery-ui:1.8.2',
':xml-validator:0.1',
':advoss-orm-core:1.0.2.0',
compile (':adv-provisioning-server:1.0.0.1') {
excludes('commons-httpclient')
}
runtime(':jasper:1.2') { excludes 'jasperreports' }
}
}