Javaコードベースは、依存関係の解決とCIでのテストの実行の両方にMavenを使用しています。最近の開発バッチ(重大な変更を特定するのが難しくなるほど大きい) org.w3c.dom.ElementTraversal
のNoClassDefFoundError
を使用してMavenを介して実行すると、テストが失敗します。IDE(IntelliJ IDEA)]内から実行すると、同じテストに合格するため、すべての依存関係を満たすような方法でクラスパス。
org.w3c.dom.ElementTraversal
xml-apis jar 1.4.01に存在する (これは依存しているものです-以下の依存関係ツリーを参照-mvn dependency:build-classpath
を実行するときのクラスパスにあるように)、私はしませんなぜ存在しないのかを見てください。 xml-apis 1.4.01をdependencyManagement
セクションに明示的に追加しようとしました(親pom、子pomの依存関係、およびxml-apisの他のすべての推移的な依存関係は除外)同じ問題があるので、間違った問題を修正しようとしていると思い始めています。
誰が間違っているか、またはこれをさらにデバッグする方法を提案できますか?
Travisで取得している完全なエラーを参照 が、スニペットは次のとおりです。
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/security-app-context.xml]; nested exception is Java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.Java:412)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.Java:334)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.Java:302)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.Java:174)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.Java:209)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.Java:180)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.Java:125)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.Java:94)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.Java:131)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.Java:522)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.Java:436)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.Java:384)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.Java:283)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.Java:111)
at org.Eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.Java:746)
at org.Eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.Java:238)
at org.Eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.Java:1240)
at org.Eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.Java:689)
at org.Eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.Java:482)
at org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.Java:256)
at org.Eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.Java:64)
at org.Eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.Java:229)
at org.Eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.Java:172)
at org.Eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.Java:64)
at org.Eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.Java:229)
at org.Eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.Java:64)
at org.Eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.Java:95)
at org.Eclipse.jetty.server.Server.doStart(Server.Java:279)
at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.Java:65)
at org.Eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.Java:64)
at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.Java:520)
at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.Java:365)
at org.mortbay.jetty.plugin.JettyRunWarExplodedMojo.execute(JettyRunWarExplodedMojo.Java:164)
at org.Apache.maven.plugin.DefaultBuildPluginManager.executojo(DefaultBuildPluginManager.Java:101)
at org.Apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.Java:209)
at org.Apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.Java:153)
at org.Apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.Java:145)
at org.Apache.maven.lifecycle.internal.LifecycloduleBuilder.buildProject(LifecycloduleBuilder.Java:84)
at org.Apache.maven.lifecycle.internal.LifecycloduleBuilder.buildProject(LifecycloduleBuilder.Java:59)
at org.Apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.Java:183)
at org.Apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.Java:161)
at org.Apache.maven.DefaultMaven.doExecute(DefaultMaven.Java:320)
at org.Apache.maven.DefaultMaven.execute(DefaultMaven.Java:156)
at org.Apache.maven.cli.MavenCli.execute(MavenCli.Java:537)
at org.Apache.maven.cli.MavenCli.doMain(MavenCli.Java:196)
at org.Apache.maven.cli.MavenCli.main(MavenCli.Java:141)
at Sun.reflect.NativethodAccessorImpl.invoke0(Native Method)
at Sun.reflect.NativethodAccessorImpl.invoke(NativethodAccessorImpl.Java:57)
at Sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.Java:43)
at Java.lang.reflect.Method.invoke(Method.Java:616)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.Java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.Java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.Java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.Java:352)
Caused by: Java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
at Java.lang.ClassLoader.defineClass1(Native Method)
at Java.lang.ClassLoader.defineClass(ClassLoader.Java:634)
at Java.security.SecureClassLoader.defineClass(SecureClassLoader.Java:142)
at Java.net.URLClassLoader.defineClass(URLClassLoader.Java:277)
at Java.net.URLClassLoader.access$000(URLClassLoader.Java:73)
at Java.net.URLClassLoader$1.run(URLClassLoader.Java:212)
at Java.security.AccessController.doPrivileged(Native Method)
at Java.net.URLClassLoader.findClass(URLClassLoader.Java:205)
at org.Eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.Java:421)
at org.Eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.Java:383)
at org.Apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown Source)
at org.Apache.xerces.impl.xs.XMLSchemaValidator.startDocument(Unknown Source)
at org.Apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source)
at org.Apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)
at org.Apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown Source)
at org.Apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.Apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.Apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.Apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.Apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.Java:75)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.Java:388)
... 53 more
Caused by: Java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal
at Java.net.URLClassLoader$1.run(URLClassLoader.Java:217)
at Java.security.AccessController.doPrivileged(Native Method)
at Java.net.URLClassLoader.findClass(URLClassLoader.Java:205)
at org.Eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.Java:421)
at org.Eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.Java:383)
... 75 more
失敗したモジュールの依存関係ツリーは次のとおりです。 GitHubで完全なpomファイルを確認できます( 親 、 子 )が、SO = post size limit。xml-apisはいくつかの場所にありますが、Mavenが1.4.01に管理していることがわかります。
--- maven-dependency-plugin:2.1:tree (default-cli) @ xssfinder-test ---
org.xssfinder:xssfinder-test:war:1.0-SNAPSHOT
+- org.xssfinder:xssfinder-executor-Java:jar:1.0-SNAPSHOT:compile
| +- org.xssfinder:xssfinder-executor:jar:1.0-SNAPSHOT:compile
| | \- (org.Apache.thrift:libthrift:jar:0.8.0:compile - omitted for duplicate)
| +- org.xssfinder:xssfinder-annotations:jar:1.0-SNAPSHOT:compile
| +- org.Apache.thrift:libthrift:jar:0.8.0:compile
| | +- (org.slf4j:slf4j-api:jar:1.7.5:compile - version managed from 1.5.8; omitted for duplicate)
| | +- commons-lang:commons-lang:jar:2.5:compile
| | \- (org.Apache.httpcomponents:httpcore:jar:4.2.2:test - version managed from 4.2.1; scope managed from compile; omitted for duplicate)
| +- org.seleniumhq.Selenium:selenium-Java:jar:2.32.0:compile
| | +- org.seleniumhq.Selenium:selenium-Android-driver:jar:2.32.0:compile
| | | \- org.seleniumhq.Selenium:selenium-remote-driver:jar:2.32.0:compile
| | | +- cglib:cglib-nodep:jar:2.1_3:compile
| | | +- org.json:json:jar:20080701:compile
| | | +- (org.seleniumhq.Selenium:selenium-api:jar:2.32.0:compile - omitted for duplicate)
| | | +- (org.Apache.httpcomponents:httpclient:jar:4.2.1:compile - omitted for duplicate)
| | | +- (com.google.guava:guava:jar:14.0:compile - version managed from 11.0.2; omitted for duplicate)
| | | +- (org.Apache.commons:commons-exec:jar:1.1:compile - omitted for duplicate)
| | | +- (net.Java.dev.jna:jna:jar:3.4.0:compile - omitted for duplicate)
| | | \- (net.Java.dev.jna:platform:jar:3.4.0:compile - omitted for duplicate)
| | +- org.seleniumhq.Selenium:selenium-chrome-driver:jar:2.32.0:compile
| | | \- (org.seleniumhq.Selenium:selenium-remote-driver:jar:2.32.0:compile - omitted for duplicate)
| | +- org.seleniumhq.Selenium:selenium-htmlunit-driver:jar:2.32.0:compile
| | | +- org.seleniumhq.Selenium:selenium-api:jar:2.32.0:compile
| | | | +- (com.google.guava:guava:jar:14.0:compile - omitted for duplicate)
| | | | \- (org.json:json:jar:20080701:compile - omitted for duplicate)
| | | +- net.sourceforge.htmlunit:htmlunit:jar:2.12:compile
| | | | +- xalan:xalan:jar:2.7.1:compile
| | | | | \- xalan:serializer:jar:2.7.1:compile
| | | | | \- (xml-apis:xml-apis:jar:1.4.01:test - version managed from 1.3.04; scope managed from compile; omitted for duplicate)
| | | | +- commons-collections:commons-collections:jar:3.2.1:compile
| | | | +- org.Apache.commons:commons-lang3:jar:3.1:compile
| | | | +- (org.Apache.httpcomponents:httpclient:jar:4.2.3:compile - omitted for conflict with 4.2.1)
| | | | +- org.Apache.httpcomponents:httpmime:jar:4.2.3:compile
| | | | | \- (org.Apache.httpcomponents:httpcore:jar:4.2.2:test - version managed from 4.2.1; scope managed from compile; omitted for duplicate)
| | | | +- commons-codec:commons-codec:jar:1.7:compile
| | | | +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.12:compile
| | | | +- xerces:xercesImpl:jar:2.10.0:compile
| | | | | \- (xml-apis:xml-apis:jar:1.4.01:test - version managed from 1.0.b2; scope managed from compile; omitted for duplicate)
| | | | +- net.sourceforge.nekohtml:nekohtml:jar:1.9.18:compile
| | | | +- net.sourceforge.cssparser:cssparser:jar:0.9.9:compile
| | | | | \- org.w3c.css:sac:jar:1.3:compile
| | | | +- (commons-io:commons-io:jar:2.4:compile - omitted for conflict with 2.2)
| | | | +- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for duplicate)
| | | | \- org.Eclipse.jetty:jetty-websocket:jar:8.1.9.v20130131:compile
| | | | +- (org.Eclipse.jetty:jetty-util:jar:8.1.9.v20130131:compile - omitted for conflict with 7.6.10.v20130312)
| | | | +- (org.Eclipse.jetty:jetty-io:jar:8.1.9.v20130131:compile - omitted for conflict with 7.6.10.v20130312)
| | | | \- (org.Eclipse.jetty:jetty-http:jar:8.1.9.v20130131:compile - omitted for conflict with 7.6.10.v20130312)
| | | \- org.Apache.httpcomponents:httpclient:jar:4.2.1:compile
| | | +- (org.Apache.httpcomponents:httpcore:jar:4.2.2:test - version managed from 4.2.1; scope managed from compile; omitted for duplicate)
| | | +- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for duplicate)
| | | \- (commons-codec:commons-codec:jar:1.6:compile - omitted for conflict with 1.7)
| | +- org.seleniumhq.Selenium:selenium-firefox-driver:jar:2.32.0:compile
| | | +- (org.seleniumhq.Selenium:selenium-remote-driver:jar:2.32.0:compile - omitted for duplicate)
| | | +- commons-io:commons-io:jar:2.2:compile
| | | \- org.Apache.commons:commons-exec:jar:1.1:compile
| | +- org.seleniumhq.Selenium:selenium-ie-driver:jar:2.32.0:compile
| | | +- net.Java.dev.jna:jna:jar:3.4.0:compile
| | | +- net.Java.dev.jna:platform:jar:3.4.0:compile
| | | \- (org.seleniumhq.Selenium:selenium-remote-driver:jar:2.32.0:compile - omitted for duplicate)
| | +- org.seleniumhq.Selenium:selenium-iphone-driver:jar:2.32.0:compile
| | | \- (org.seleniumhq.Selenium:selenium-remote-driver:jar:2.32.0:compile - omitted for duplicate)
| | +- org.seleniumhq.Selenium:selenium-safari-driver:jar:2.32.0:compile
| | | +- (org.seleniumhq.Selenium:selenium-remote-driver:jar:2.32.0:compile - omitted for duplicate)
| | | \- (org.webbitserver:webbit:jar:0.4.14:compile - omitted for duplicate)
| | +- org.seleniumhq.Selenium:selenium-support:jar:2.32.0:compile
| | | \- (org.seleniumhq.Selenium:selenium-api:jar:2.32.0:compile - omitted for duplicate)
| | \- org.webbitserver:webbit:jar:0.4.14:compile
| | \- io.netty:netty:jar:3.5.2.Final:compile
| +- org.reflections:reflections-maven:jar:0.9.8:compile
| | +- org.reflections:reflections:jar:0.9.8:compile
| | | +- com.google.guava:guava:jar:14.0:compile
| | | +- javassist:javassist:jar:3.12.1.GA:compile
| | | \- dom4j:dom4j:jar:1.6.1:compile
| | | \- xml-apis:xml-apis:jar:1.4.01:test
| | +- org.jfrog.maven.annomojo:maven-plugin-anno:jar:1.4.1:compile
| | \- org.jfrog.jade.plugins.common:jade-plugin-common:jar:1.3.8:compile
| | +- (org.jfrog.maven.annomojo:maven-plugin-anno:jar:1.3.0:compile - omitted for conflict with 1.4.1)
| | +- ant:ant:jar:1.6.5:compile
| | +- org.Apache.maven:maven-plugin-api:jar:2.0.5:compile
| | +- org.Apache.maven:maven-project:jar:2.0.5:compile
| | | +- org.Apache.maven:maven-settings:jar:2.0.5:compile
| | | | +- (org.Apache.maven:maven-model:jar:2.0.5:compile - omitted for duplicate)
| | | | +- (org.codehaus.plexus:plexus-utils:jar:1.1:compile - omitted for duplicate)
| | | | \- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9:compile - omitted for duplicate)
| | | +- org.Apache.maven:maven-profile:jar:2.0.5:compile
| | | | +- (org.Apache.maven:maven-model:jar:2.0.5:compile - omitted for duplicate)
| | | | +- (org.codehaus.plexus:plexus-utils:jar:1.1:compile - omitted for duplicate)
| | | | \- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9:compile - omitted for duplicate)
| | | +- (org.Apache.maven:maven-model:jar:2.0.5:compile - omitted for duplicate)
| | | +- org.Apache.maven:maven-artifact-manager:jar:2.0.5:compile
| | | | +- org.Apache.maven:maven-repository-metadata:jar:2.0.5:compile
| | | | | \- (org.codehaus.plexus:plexus-utils:jar:1.1:compile - omitted for duplicate)
| | | | +- (org.codehaus.plexus:plexus-utils:jar:1.1:compile - omitted for duplicate)
| | | | +- (org.Apache.maven:maven-artifact:jar:2.0.5:compile - omitted for duplicate)
| | | | +- (org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9:compile - omitted for duplicate)
| | | | \- org.Apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2:compile
| | | | \- (org.codehaus.plexus:plexus-utils:jar:1.0.4:compile - omitted for conflict with 1.1)
| | | +- (org.codehaus.plexus:plexus-utils:jar:1.1:compile - omitted for duplicate)
| | | +- (org.Apache.maven:maven-artifact:jar:2.0.5:compile - omitted for duplicate)
| | | \- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9:compile
| | | +- (junit:junit:jar:4.11:test - version managed from 3.8.1; scope managed from compile; omitted for duplicate)
| | | +- (org.codehaus.plexus:plexus-utils:jar:1.0.4:compile - omitted for conflict with 1.1)
| | | \- classworlds:classworlds:jar:1.1-alpha-2:compile
| | +- org.Apache.maven:maven-artifact:jar:2.0.5:compile
| | | \- (org.codehaus.plexus:plexus-utils:jar:1.1:compile - omitted for duplicate)
| | +- org.Apache.maven:maven-model:jar:2.0.5:compile
| | | \- (org.codehaus.plexus:plexus-utils:jar:1.1:compile - omitted for duplicate)
| | +- org.codehaus.plexus:plexus-utils:jar:1.1:compile
| | +- xstream:xstream:jar:1.1.3:compile
| | \- xpp3:xpp3:jar:1.1.3.4-RC8:runtime
| +- org.slf4j:slf4j-api:jar:1.7.5:compile
| \- ch.qos.logback:logback-classic:jar:1.0.13:compile
| +- ch.qos.logback:logback-core:jar:1.0.13:compile
| \- (org.slf4j:slf4j-api:jar:1.7.5:compile - version managed from 1.5.8; omitted for duplicate)
+- org.springframework:spring-webmvc:jar:3.1.0.RELEASE:compile
| +- org.springframework:spring-asm:jar:3.1.0.RELEASE:compile
| +- org.springframework:spring-beans:jar:3.1.0.RELEASE:compile
| | \- (org.springframework:spring-core:jar:3.1.0.RELEASE:compile - omitted for duplicate)
| +- org.springframework:spring-context:jar:3.1.0.RELEASE:compile
| | +- (org.springframework:spring-aop:jar:3.1.0.RELEASE:compile - omitted for conflict with 3.0.6.RELEASE)
| | +- (org.springframework:spring-beans:jar:3.1.0.RELEASE:compile - omitted for duplicate)
| | +- (org.springframework:spring-core:jar:3.1.0.RELEASE:compile - omitted for duplicate)
| | +- (org.springframework:spring-expression:jar:3.1.0.RELEASE:compile - omitted for duplicate)
| | \- (org.springframework:spring-asm:jar:3.1.0.RELEASE:compile - omitted for duplicate)
| +- org.springframework:spring-context-support:jar:3.1.0.RELEASE:compile
| | +- (org.springframework:spring-beans:jar:3.1.0.RELEASE:compile - omitted for duplicate)
| | +- (org.springframework:spring-context:jar:3.1.0.RELEASE:compile - omitted for duplicate)
| | \- (org.springframework:spring-core:jar:3.1.0.RELEASE:compile - omitted for duplicate)
| +- org.springframework:spring-core:jar:3.1.0.RELEASE:compile
| | +- (org.springframework:spring-asm:jar:3.1.0.RELEASE:compile - omitted for duplicate)
| | \- commons-logging:commons-logging:jar:1.1.1:compile
| +- org.springframework:spring-expression:jar:3.1.0.RELEASE:compile
| | \- (org.springframework:spring-core:jar:3.1.0.RELEASE:compile - omitted for duplicate)
| \- org.springframework:spring-web:jar:3.1.0.RELEASE:compile
| +- (aopalliance:aopalliance:jar:1.0:compile - omitted for duplicate)
| +- (org.springframework:spring-beans:jar:3.1.0.RELEASE:compile - omitted for duplicate)
| +- (org.springframework:spring-context:jar:3.1.0.RELEASE:compile - omitted for duplicate)
| \- (org.springframework:spring-core:jar:3.1.0.RELEASE:compile - omitted for duplicate)
+- org.springframework.security:spring-security-core:jar:3.1.0.RELEASE:compile
| +- aopalliance:aopalliance:jar:1.0:compile
| +- (org.springframework:spring-expression:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
| +- org.springframework:spring-aop:jar:3.0.6.RELEASE:compile
| | +- (aopalliance:aopalliance:jar:1.0:compile - omitted for duplicate)
| | +- (org.springframework:spring-asm:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
| | +- (org.springframework:spring-beans:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
| | \- (org.springframework:spring-core:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
| +- (org.springframework:spring-context:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
| +- (org.springframework:spring-beans:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
| +- (org.springframework:spring-core:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
| \- org.springframework.security:spring-security-crypto:jar:3.1.0.RELEASE:compile
| \- (org.springframework:spring-core:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
+- org.springframework.security:spring-security-config:jar:3.1.0.RELEASE:compile
| +- (org.springframework:spring-context:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
| +- (org.springframework:spring-beans:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
| +- (aopalliance:aopalliance:jar:1.0:compile - omitted for duplicate)
| +- (org.springframework:spring-aop:jar:3.0.6.RELEASE:compile - omitted for duplicate)
| +- (org.springframework.security:spring-security-core:jar:3.1.0.RELEASE:compile - omitted for duplicate)
| \- (org.springframework:spring-core:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
+- org.springframework.security:spring-security-web:jar:3.1.0.RELEASE:compile
| +- org.springframework:spring-tx:jar:3.0.6.RELEASE:compile
| | +- (aopalliance:aopalliance:jar:1.0:compile - omitted for duplicate)
| | +- (org.springframework:spring-aop:jar:3.0.6.RELEASE:compile - omitted for duplicate)
| | +- (org.springframework:spring-beans:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
| | +- (org.springframework:spring-context:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
| | \- (org.springframework:spring-core:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
| +- (org.springframework:spring-web:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
| +- (aopalliance:aopalliance:jar:1.0:compile - omitted for duplicate)
| +- (org.springframework:spring-expression:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
| +- (org.springframework:spring-aop:jar:3.0.6.RELEASE:compile - omitted for duplicate)
| +- (org.springframework.security:spring-security-core:jar:3.1.0.RELEASE:compile - omitted for duplicate)
| +- org.springframework:spring-jdbc:jar:3.0.6.RELEASE:compile
| | +- (org.springframework:spring-beans:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
| | +- (org.springframework:spring-core:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
| | \- (org.springframework:spring-tx:jar:3.0.6.RELEASE:compile - omitted for duplicate)
| +- (org.springframework:spring-context:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
| +- (org.springframework:spring-beans:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
| \- (org.springframework:spring-core:jar:3.0.6.RELEASE:compile - omitted for conflict with 3.1.0.RELEASE)
+- junit:junit:jar:4.11:test
| \- org.hamcrest:hamcrest-core:jar:1.3:test
+- org.xssfinder:xssfinder-core:jar:1.0-SNAPSHOT:test
| +- (org.xssfinder:xssfinder-executor:jar:1.0-SNAPSHOT:test - omitted for duplicate)
| +- (org.slf4j:slf4j-api:jar:1.7.5:test - version managed from 1.5.8; omitted for duplicate)
| +- (ch.qos.logback:logback-classic:jar:1.0.13:test - omitted for duplicate)
| \- (com.google.guava:guava:jar:14.0:compile - version managed from 11.0.2; scope updated from test; omitted for duplicate)
+- org.Apache.httpcomponents:httpcore:jar:4.2.2:test
+- org.Eclipse.jetty:jetty-server:jar:7.6.10.v20130312:compile
| +- org.Eclipse.jetty.orbit:javax.servlet:jar:2.5.0.v201103041518:compile
| +- org.Eclipse.jetty:jetty-continuation:jar:7.6.10.v20130312:compile
| \- org.Eclipse.jetty:jetty-http:jar:7.6.10.v20130312:compile
| \- org.Eclipse.jetty:jetty-io:jar:7.6.10.v20130312:compile
| \- (org.Eclipse.jetty:jetty-util:jar:7.6.10.v20130312:compile - omitted for duplicate)
+- org.Eclipse.jetty:jetty-servlet:jar:7.6.10.v20130312:compile
| \- org.Eclipse.jetty:jetty-security:jar:7.6.10.v20130312:compile
| \- (org.Eclipse.jetty:jetty-server:jar:7.6.10.v20130312:compile - omitted for duplicate)
+- org.Eclipse.jetty:jetty-webapp:jar:7.6.10.v20130312:compile
| +- org.Eclipse.jetty:jetty-xml:jar:7.6.10.v20130312:compile
| | \- (org.Eclipse.jetty:jetty-util:jar:7.6.10.v20130312:compile - omitted for duplicate)
| \- (org.Eclipse.jetty:jetty-servlet:jar:7.6.10.v20130312:compile - omitted for duplicate)
+- org.Eclipse.jetty:jetty-servlets:jar:7.6.10.v20130312:compile
| +- (org.Eclipse.jetty:jetty-continuation:jar:7.6.10.v20130312:compile - omitted for duplicate)
| +- org.Eclipse.jetty:jetty-client:jar:7.6.10.v20130312:compile
| | \- (org.Eclipse.jetty:jetty-http:jar:7.6.10.v20130312:compile - omitted for duplicate)
| \- org.Eclipse.jetty:jetty-util:jar:7.6.10.v20130312:compile
+- org.Eclipse.jetty:jetty-jsp:jar:7.6.10.v20130312:compile
| +- org.Eclipse.jetty.orbit:javax.servlet.jsp:jar:2.1.0.v201105211820:compile
| | \- (org.Eclipse.jetty.orbit:javax.servlet:jar:2.5.0.v201103041518:compile - omitted for duplicate)
| +- org.Eclipse.jetty.orbit:org.Apache.jasper.glassfish:jar:2.1.0.v201110031002:compile
| | +- (org.Eclipse.jetty.orbit:javax.servlet:jar:2.5.0.v201103041518:compile - omitted for duplicate)
| | \- (org.Eclipse.jetty.orbit:javax.servlet.jsp:jar:2.1.0.v201105211820:compile - omitted for duplicate)
| +- org.Eclipse.jetty.orbit:javax.servlet.jsp.jstl:jar:1.2.0.v201105211821:compile
| | +- (org.Eclipse.jetty.orbit:javax.servlet:jar:2.5.0.v201103041518:compile - omitted for duplicate)
| | \- (org.Eclipse.jetty.orbit:javax.servlet.jsp:jar:2.1.0.v201105211820:compile - omitted for duplicate)
| +- org.Eclipse.jetty.orbit:org.Apache.taglibs.standard.glassfish:jar:1.2.0.v201112081803:compile
| | \- (org.Eclipse.jetty.orbit:javax.servlet.jsp.jstl:jar:1.2.0.v201105211821:compile - omitted for duplicate)
| +- org.Eclipse.jetty.orbit:javax.el:jar:2.1.0.v201105211819:compile
| +- org.Eclipse.jetty.orbit:com.Sun.el:jar:1.0.0.v201105211818:compile
| \- org.Eclipse.jetty.orbit:org.Eclipse.jdt.core:jar:3.7.1:compile
\- javax.servlet:jstl:jar:1.2:provided
私は最終的にこれを解決しましたが、かなり不十分です。修正は、親pomのdependencyManagementセクションのランタイムスコープでxml-apisをマークすることでした。
私はこれがなぜ機能するのか完全には明確ではありません(特に、なぜコンパイルスコープで依存関係を指定しても機能しないのに機能するのか)。誰かがそれを適切に説明できると思うなら、私は知りたいです。
私の場合、xml-apisのバージョンを1.3.04から1.4.01に変更することで問題が修正されました
子pomでxml-apis
依存関係が指定されていないようです。 <dependencyManagement>
セクションは依存関係を含めません。継承可能な構成を提供するだけです。子pomのいくつかの依存関係が一時的にxml-apis
を引っ張っているように見えますが、奇妙なMavenの癖のために、勝ったもの(バージョン1.4.01)がテスト範囲にあります。おそらく、依存関係が指定するテストスコープ内にあります。それらを指定するpomのテストスコープ内の推移的な依存関係は、テストスコープ内にあるプロジェクトの依存関係によって取り込まれません-これは解析するのが非常に難しい文ですが、 Dependency Scope の良い説明があります物事を明確にするかもしれません。
基本的に私が見ているのは、この編集バージョンの出力に見られるように、xml-apis
の含まれているバージョンを示す依存関係ツリーです。
org.xssfinder:xssfinder-test:war:1.0-SNAPSHOT
+- org.xssfinder:xssfinder-executor-Java:jar:1.0-SNAPSHOT:compile
+- org.reflections:reflections-maven:jar:0.9.8:compile
+- org.reflections:reflections:jar:0.9.8:compile
+- com.google.guava:guava:jar:14.0:compile
+- javassist:javassist:jar:3.12.1.GA:compile
\- dom4j:dom4j:jar:1.6.1:compile
\- xml-apis:xml-apis:jar:1.4.01:test
なぜそれがテストスコープとしてやってくるのか完全にはわかりませんが、それが問題だと推測しています。 xml-apis
依存関係を子pomに明示的に追加し、それが依存関係ツリーに影響を与えるかどうかを確認することをお勧めします。問題を解決できるかどうかを確認するために、推移的な依存関係としてそれを引き込まないようにしています。