Maven dependency doesn't bring down correct Selenium version 3.4.0 - maven

I have a core maven project A which has all the Selenium Firefox driver set up, the pom has
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.4.0</version>
</dependency>
There is project B, two cases as below:
Case 1: In project B, set project A as dependency in pom.xml, the test always try to connect to Selenium 2.53.1. I ran as mvn dependency:tree, the project A only brings Selenium 2.53.1.
Case 2: In eclipse, put project A as "Required projects on the build path" via Properties - Java Build Path - Projects tab, then everything works fine, my test in project B is able to start up Firefox 53.0 using Selenium 3.4.0.
Any idea on that?
Also in eclipse Dependency Hierarchy tab for project B, it shows selenium-java: 2.53.1 (managed from 3.4.0) [test], not sure what is forcing to use the version 2.53.1.
This is the mvn dependency:tree output, selenium-core:1.0.2 is the core project A I mentioned above
[INFO] +- org.mockito:mockito-core:jar:1.10.19:test
[INFO] | \- org.objenesis:objenesis:jar:2.1:test
[INFO] +- nl.jqno.equalsverifier:equalsverifier:jar:1.5:test
[INFO] | +- cglib:cglib:jar:3.1:test
[INFO] | \- org.ow2.asm:asm:jar:5.0.3:test
[INFO] +- com.mycompany:selenium-core:jar:1.0.2:test
[INFO] | +- org.seleniumhq.selenium:selenium-java:jar:2.53.1:test
[INFO] | | +- org.seleniumhq.selenium:selenium-chrome-
driver:jar:2.53.1:test
[INFO] | | | \- org.seleniumhq.selenium:selenium-remote-
driver:jar:2.53.1:test
[INFO] | | | +- cglib:cglib-nodep:jar:2.1_3:test
[INFO] | | | +- com.google.code.gson:gson:jar:2.8.0:test
[INFO] | | | \- org.seleniumhq.selenium:selenium-
api:jar:2.53.1:test
[INFO] | | +- org.seleniumhq.selenium:selenium-edge-
driver:jar:2.53.1:test
[INFO] | | | \- org.apache.commons:commons-exec:jar:1.3:test
[INFO] | | +- org.seleniumhq.selenium:htmlunit-driver:jar:2.21:test
[INFO] | | | \- net.sourceforge.htmlunit:htmlunit:jar:2.21:test
[INFO] | | | +- net.sourceforge.htmlunit:htmlunit-core-
js:jar:2.17:test
[INFO] | | | +- net.sourceforge.htmlunit:neko-
htmlunit:jar:2.21:test
[INFO] | | | +-
net.sourceforge.cssparser:cssparser:jar:0.9.18:test
[INFO] | | | | \- org.w3c.css:sac:jar:1.3:test
[INFO] | | | \- org.eclipse.jetty.websocket:websocket-
client:jar:9.4.1.v20170120:test
[INFO] | | | +- org.eclipse.jetty:jetty-
util:jar:9.4.1.v20170120:test
[INFO] | | | +- org.eclipse.jetty:jetty-
io:jar:9.4.1.v20170120:test
[INFO] | | | +- org.eclipse.jetty:jetty-
client:jar:9.4.1.v20170120:test
[INFO] | | | | \- org.eclipse.jetty:jetty-
http:jar:9.4.1.v20170120:test
[INFO] | | | \- org.eclipse.jetty.websocket:websocket-
common:jar:9.4.1.v20170120:test
[INFO] | | | \- org.eclipse.jetty.websocket:websocket-
api:jar:9.4.1.v20170120:test
[INFO] | | +- org.seleniumhq.selenium:selenium-firefox-
driver:jar:2.53.1:test
[INFO] | | +- org.seleniumhq.selenium:selenium-ie-
driver:jar:2.53.1:test
[INFO] | | | +- net.java.dev.jna:jna:jar:4.2.2:test
[INFO] | | | \- net.java.dev.jna:jna-platform:jar:4.1.0:test
[INFO] | | +- org.seleniumhq.selenium:selenium-safari-
driver:jar:2.53.1:test
[INFO] | | | \- io.netty:netty:jar:3.5.7.Final:test
[INFO] | | +- org.seleniumhq.selenium:selenium-
support:jar:2.53.1:test
[INFO] | | \- org.seleniumhq.selenium:selenium-leg-rc:jar:2.53.1:test

Related

java.lang.NoSuchMethodError: 'void org.yaml.snakeyaml.LoaderOptions.setMaxAliasesForCollections(int)'

Im my project we are using spring boot 2.6.6 version. When I run the below test class separately I am getting below error.
java.lang.NoSuchMethodError: 'void org.yaml.snakeyaml.LoaderOptions.setMaxAliasesForCollections(int)'
If the class runs as part of mvn install its executing without any issues.
#SpringBootTest(webEnvironment = RANDOM_PORT, classes = TestApplication.class)
#ContextConfiguration(classes = {WireMockConfig.class})
class ToastNotificationControllerIT {
#LocalServerPort
private int port;
#BeforeEach
void setUp() throws IOException {
}
#Test
void test() {
}
}
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.boot.env.OriginTrackedYamlLoader.createYaml(OriginTrackedYamlLoader.java:69)
The following method did not exist:
'void org.yaml.snakeyaml.LoaderOptions.setMaxAliasesForCollections(int)'
The calling method's class, org.springframework.boot.env.OriginTrackedYamlLoader, was loaded from the following location:
jar:file:/C:/dev/.m2/repository/org/springframework/boot/spring-boot/2.6.6/spring-boot-2.6.6.jar!/org/springframework/boot/env/OriginTrackedYamlLoader.class
The called method's class, org.yaml.snakeyaml.LoaderOptions, is available from the following locations:
jar:file:/C:/dev/.m2/repository/org/yaml/snakeyaml/1.23/snakeyaml-1.23-android.jar!/org/yaml/snakeyaml/LoaderOptions.class
jar:file:/C:/dev/.m2/repository/org/yaml/snakeyaml/1.29/snakeyaml-1.29.jar!/org/yaml/snakeyaml/LoaderOptions.class
The called method's class hierarchy was loaded from the following locations:
org.yaml.snakeyaml.LoaderOptions: file:/C:/dev/.m2/repository/org/yaml/snakeyaml/1.23/snakeyaml-1.23-android.jar
I tried exculde the org.yaml dependency from spring boot starter dependency. But the issue is still not resolved.
My Dependency Tree:
[INFO] com.selva.test:test-api:jar:1.0.6
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.6.6:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.6.6:compile
[INFO] | | +- org.springframework.boot:spring-boot:jar:2.6.6:compile
[INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.6.6:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:2.6.6:compile
[INFO] | | | \- org.apache.logging.log4j:log4j-to-slf4j:jar:2.17.2:compile
[INFO] | | | \- org.apache.logging.log4j:log4j-api:jar:2.17.2:compile
[INFO] | | +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.29:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.6.6:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.13.2:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.13.2:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.13.2:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.6.6:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.60:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.60:compile
[INFO] | +- org.springframework:spring-web:jar:5.3.18:compile
[INFO] | | \- org.springframework:spring-beans:jar:5.3.18:compile
[INFO] | \- org.springframework:spring-webmvc:jar:5.3.18:compile
[INFO] | \- org.springframework:spring-expression:jar:5.3.18:compile
[INFO] +- org.springframework.boot:spring-boot-starter-validation:jar:2.6.6:compile
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-el:jar:9.0.60:compile
[INFO] | \- org.hibernate.validator:hibernate-validator:jar:6.2.3.Final:compile
[INFO] | +- jakarta.validation:jakarta.validation-api:jar:2.0.2:compile
[INFO] | +- org.jboss.logging:jboss-logging:jar:3.4.3.Final:compile
[INFO] | \- com.fasterxml:classmate:jar:1.5.1:compile
[INFO] +- org.springframework.cloud:spring-cloud-starter-openfeign:jar:3.1.1:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter:jar:3.1.1:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-context:jar:3.1.1:compile
[INFO] | | \- org.springframework.security:spring-security-rsa:jar:1.0.10.RELEASE:compile
[INFO] | | \- org.bouncycastle:bcpkix-jdk15on:jar:1.68:compile
[INFO] | | \- org.bouncycastle:bcprov-jdk15on:jar:1.68:compile
[INFO] | +- org.springframework.cloud:spring-cloud-openfeign-core:jar:3.1.1:compile
[INFO] | | \- io.github.openfeign.form:feign-form-spring:jar:3.8.0:compile
[INFO] | | \- io.github.openfeign.form:feign-form:jar:3.8.0:compile
[INFO] | +- org.springframework.cloud:spring-cloud-commons:jar:3.1.1:compile
[INFO] | | \- org.springframework.security:spring-security-crypto:jar:5.6.2:compile
[INFO] | +- io.github.openfeign:feign-core:jar:11.8:compile
[INFO] | \- io.github.openfeign:feign-slf4j:jar:11.8:compile
[INFO] +- io.github.openfeign:feign-httpclient:jar:11.8:compile
[INFO] | \- org.apache.httpcomponents:httpclient:jar:4.5.13:compile
[INFO] | +- org.apache.httpcomponents:httpcore:jar:4.4.15:compile
[INFO] | \- commons-codec:commons-codec:jar:1.15:compile
[INFO] +- org.projectlombok:lombok:jar:1.18.22:compile (optional)
[INFO] +- org.mapstruct:mapstruct:jar:1.4.2.Final:compile
INFO] | +- commons-beanutils:commons-beanutils:jar:1.9.4:compile
[INFO] | | +- commons-logging:commons-logging:jar:1.2:compile
[INFO] | | \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] | +- io.opentracing.contrib:opentracing-spring-web-starter:jar:4.1.0:compile
[INFO] | | +- io.opentracing.contrib:opentracing-spring-web:jar:4.1.0:compile
[INFO] | | | \- io.opentracing.contrib:opentracing-web-servlet-filter:jar:0.4.0:compile
[INFO] | | +- io.opentracing.contrib:opentracing-tracerresolver:jar:0.1.8:compile
[INFO] | | \- io.opentracing.contrib:opentracing-spring-tracer-configuration-starter:jar:0.3.1:compile
[INFO] | | \- io.opentracing:opentracing-noop:jar:0.33.0:compile
[INFO] | +- javax.servlet:javax.servlet-api:jar:4.0.1:compile
[INFO] | +- org.aspectj:aspectjweaver:jar:1.9.7:compile
[INFO] | \- org.springframework.boot:spring-boot-starter-aop:jar:2.6.6:compile
[INFO] +- org.springdoc:springdoc-openapi-ui:jar:1.5.11:compile
[INFO] | +- org.springdoc:springdoc-openapi-webmvc-core:jar:1.5.11:compile
[INFO] | | \- org.springdoc:springdoc-openapi-common:jar:1.5.11:compile
[INFO] | | +- io.swagger.core.v3:swagger-models:jar:2.1.11:compile
[INFO] | | +- io.swagger.core.v3:swagger-annotations:jar:2.1.11:compile
[INFO] | | +- io.swagger.core.v3:swagger-integration:jar:2.1.11:compile
[INFO] | | | \- io.swagger.core.v3:swagger-core:jar:2.1.11:compile
[INFO] | | | \- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.13.2:compile
[INFO] | | \- io.github.classgraph:classgraph:jar:4.8.69:compile
[INFO] | +- org.webjars:swagger-ui:jar:3.52.3:compile
[INFO] | \- org.webjars:webjars-locator-core:jar:0.48:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.6.6:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.6.6:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.6.6:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.6.0:compile
[INFO] | | \- net.minidev:json-smart:jar:2.4.8:compile
[INFO] | | \- net.minidev:accessors-smart:jar:2.4.8:compile
[INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:compile
[INFO] | | \- jakarta.activation:jakarta.activation-api:jar:1.2.2:compile
[INFO] | +- org.assertj:assertj-core:jar:3.21.0:test
[INFO] | +- org.hamcrest:hamcrest:jar:2.2:test
[INFO] | +- org.junit.jupiter:junit-jupiter:jar:5.8.2:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-params:jar:5.8.2:test
[INFO] | | \- org.junit.jupiter:junit-jupiter-engine:jar:5.8.2:test
[INFO] | | \- org.junit.platform:junit-platform-engine:jar:1.8.2:test
[INFO] | +- org.mockito:mockito-core:jar:4.0.0:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.11.22:test
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.11.22:test
[INFO] | | \- org.objenesis:objenesis:jar:3.2:test
[INFO] | +- org.mockito:mockito-junit-jupiter:jar:4.0.0:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] | +- org.springframework:spring-core:jar:5.3.18:compile
[INFO] | | \- org.springframework:spring-jcl:jar:5.3.18:compile
[INFO] | +- org.springframework:spring-test:jar:5.3.18:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.8.4:compile
[INFO] +- com.github.javafaker:javafaker:jar:1.0.2:test
[INFO] | +- org.apache.commons:commons-lang3:jar:3.12.0:compile
[INFO] | +- org.yaml:snakeyaml:jar:android:1.23:test
[INFO] | \- com.github.mifmif:generex:jar:1.0.2:test
[INFO] | \- dk.brics.automaton:automaton:jar:1.11-8:test
[INFO] +- com.github.tomakehurst:wiremock:jar:2.27.2:compile
[INFO] | +- org.eclipse.jetty:jetty-server:jar:9.4.45.v20220203:compile
[INFO] | | +- org.eclipse.jetty:jetty-http:jar:9.4.45.v20220203:compile
[INFO] | | \- org.eclipse.jetty:jetty-io:jar:9.4.45.v20220203:compile
[INFO] | +- org.eclipse.jetty:jetty-servlet:jar:9.4.45.v20220203:compile
[INFO] | | +- org.eclipse.jetty:jetty-security:jar:9.4.45.v20220203:compile
[INFO] | | \- org.eclipse.jetty:jetty-util-ajax:jar:9.4.45.v20220203:compile
[INFO] | +- org.eclipse.jetty:jetty-servlets:jar:9.4.45.v20220203:compile
[INFO] | | +- org.eclipse.jetty:jetty-continuation:jar:9.4.45.v20220203:compile
[INFO] | | \- org.eclipse.jetty:jetty-util:jar:9.4.45.v20220203:compile
[INFO] | +- org.eclipse.jetty:jetty-webapp:jar:9.4.45.v20220203:compile
[INFO] | | \- org.eclipse.jetty:jetty-xml:jar:9.4.45.v20220203:compile
[INFO] | +- org.eclipse.jetty:jetty-proxy:jar:9.4.45.v20220203:compile
[INFO] | | \- org.eclipse.jetty:jetty-client:jar:9.4.45.v20220203:compile
[INFO] | +- com.google.guava:guava:jar:20.0:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-core:jar:2.13.2:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.13.2:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.13.2.2:compile
[INFO] | +- org.xmlunit:xmlunit-legacy:jar:2.8.4:compile
[INFO] | +- org.xmlunit:xmlunit-placeholders:jar:2.8.4:compile
[INFO] | +- org.ow2.asm:asm:jar:7.0:compile
[INFO] | +- net.sf.jopt-simple:jopt-simple:jar:5.0.3:compile
[INFO] | +- com.github.jknack:handlebars:jar:4.0.7:compile
[INFO] | | \- org.antlr:antlr4-runtime:jar:4.7.1:compile
[INFO] | +- com.github.jknack:handlebars-helpers:jar:4.0.7:compile
[INFO] | +- com.flipkart.zjsonpatch:zjsonpatch:jar:0.4.4:compile
[INFO] | \- commons-fileupload:commons-fileupload:jar:1.4:compile
[INFO] | \- commons-io:commons-io:jar:2.2:compile
[INFO] +- au.com.dius.pact.consumer:junit5:jar:4.2.12:test
[INFO] | +- au.com.dius.pact:consumer:jar:4.2.12:test
[INFO] | | +- au.com.dius.pact.core:model:jar:4.2.12:test
[INFO] | | | +- au.com.dius.pact.core:support:jar:4.2.12:test
[INFO] | | | | +- org.antlr:antlr4:jar:4.9.2:test
[INFO] | | | | | +- org.antlr:antlr-runtime:jar:3.5.2:test
[INFO] | | | | | +- org.antlr:ST4:jar:4.3:test
[INFO] | | | | | +- org.abego.treelayout:org.abego.treelayout.core:jar:1.0.3:test
[INFO] | | | | | +- org.glassfish:javax.json:jar:1.0.4:test
[INFO] | | | | | \- com.ibm.icu:icu4j:jar:61.1:test
[INFO] | | | | +- io.github.microutils:kotlin-logging-jvm:jar:2.0.10:test
[INFO] | | | | +- com.michael-bull.kotlin-result:kotlin-result-jvm:jar:1.1.12:test
[INFO] | | | | \- com.google.code.findbugs:jsr305:jar:3.0.2:test
[INFO] | | | +- au.com.dius.pact.core:pactbroker:jar:4.2.12:test
[INFO] | | | +- org.apache.commons:commons-collections4:jar:4.4:test
[INFO] | | | +- javax.mail:mail:jar:1.5.0-b01:test
[INFO] | | | | \- javax.activation:activation:jar:1.1:test
[INFO] | | | +- org.apache.tika:tika-core:jar:1.27:test
[INFO] | | | \- io.ktor:ktor-http-jvm:jar:1.3.1:test
[INFO] | | | +- org.jetbrains.kotlinx:atomicfu:jar:0.14.1:test
[INFO] | | | +- org.jetbrains.kotlinx:kotlinx-coroutines-core:jar:1.5.2:test
[INFO] | | | +- org.jetbrains.kotlinx:kotlinx-coroutines-core-common:jar:1.3.3:test
[INFO] | | | \- io.ktor:ktor-utils-jvm:jar:1.3.1:test
[INFO] | | | \- io.ktor:ktor-io-jvm:jar:1.3.1:test
[INFO] | | +- au.com.dius.pact.core:matchers:jar:4.2.12:test
[INFO] | | | +- xerces:xercesImpl:jar:2.12.0:test
[INFO] | | | | \- xml-apis:xml-apis:jar:1.4.01:test
[INFO] | | | +- org.atteo:evo-inflector:jar:1.2.2:test
[INFO] | | | \- com.github.ajalt:mordant:jar:1.2.1:test
[INFO] | | | \- com.github.ajalt:colormath:jar:1.2.0:test
[INFO] | | +- com.googlecode.java-diff-utils:diffutils:jar:1.3.0:test
[INFO] | | +- org.json:json:jar:20160212:test
[INFO] | | +- io.netty:netty-handler:jar:4.1.75.Final:test
[INFO] | | | +- io.netty:netty-common:jar:4.1.75.Final:test
[INFO] | | | +- io.netty:netty-resolver:jar:4.1.75.Final:test
[INFO] | | | +- io.netty:netty-buffer:jar:4.1.75.Final:test
[INFO] | | | +- io.netty:netty-transport:jar:4.1.75.Final:test
[INFO] | | | \- io.netty:netty-codec:jar:4.1.75.Final:test
[INFO] | | +- org.apache.httpcomponents:httpmime:jar:4.5.13:test
[INFO] | | +- org.apache.httpcomponents:fluent-hc:jar:4.5.13:test
[INFO] | | +- io.ktor:ktor-server-netty:jar:1.4.1:test
[INFO] | | | +- org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.6.10:test
[INFO] | | | +- org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:1.6.10:test
[INFO] | | | +- org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:jar:1.5.2:test
[INFO] | | | | \- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:jar:1.5.2:test
[INFO] | | | +- io.ktor:ktor-server-host-common:jar:1.4.1:test
[INFO] | | | | +- io.ktor:ktor-server-core:jar:1.4.1:test
[INFO] | | | | | \- com.typesafe:config:jar:1.3.1:test
[INFO] | | | | \- io.ktor:ktor-http-cio-jvm:jar:1.4.1:test
[INFO] | | | +- io.netty:netty-codec-http2:jar:4.1.75.Final:test
[INFO] | | | | \- io.netty:netty-codec-http:jar:4.1.75.Final:test
[INFO] | | | +- org.eclipse.jetty.alpn:alpn-api:jar:1.1.3.v20160715:test
[INFO] | | | +- io.netty:netty-transport-native-kqueue:jar:4.1.75.Final:test
[INFO] | | | | +- io.netty:netty-transport-native-unix-common:jar:4.1.75.Final:test
[INFO] | | | | \- io.netty:netty-transport-classes-kqueue:jar:4.1.75.Final:test
[INFO] | | | \- io.netty:netty-transport-native-epoll:jar:4.1.75.Final:test
[INFO] | | | \- io.netty:netty-transport-classes-epoll:jar:4.1.75.Final:test
[INFO] | | \- io.ktor:ktor-network-tls-certificates:jar:1.4.1:test
[INFO] | | \- io.ktor:ktor-network-tls-jvm:jar:1.4.1:test
[INFO] | | \- io.ktor:ktor-network-jvm:jar:1.4.1:test
[INFO] | +- org.jetbrains.kotlin:kotlin-stdlib:jar:1.6.10:test
[INFO] | | +- org.jetbrains:annotations:jar:13.0:test
[INFO] | | \- org.jetbrains.kotlin:kotlin-stdlib-common:jar:1.6.10:test
[INFO] | +- org.jetbrains.kotlin:kotlin-reflect:jar:1.6.10:test
[INFO] | \- org.junit.jupiter:junit-jupiter-api:jar:5.8.2:test
[INFO] | +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] | +- org.junit.platform:junit-platform-commons:jar:1.8.2:test
[INFO] | \- org.apiguardian:apiguardian-api:jar:1.1.2:test
Can Anyone help me to resolve this issue.
Any help will be greatly appreciated !!!
Issue resolved when adding snakeyaml latest dependency in pom and removed the old one in m2 folder and exclude snakeyaml from javafaker dependency.
Exclude snakeyaml from javafaker.
<dependency>
<groupId>com.github.javafaker</groupId>
<artifactId>javafaker</artifactId>
<version>${javafaker.version}</version>
<exclusions>
<exclusion>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
And add Updated version of snakeyaml from Maven
It's in Spring boot application...
.................
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.5</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
........
<properties>
<java.version>17</java.version>
<snakeyaml.version>1.33</snakeyaml.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
.....
<dependency>
<groupId>com.github.javafaker</groupId>
<artifactId>javafaker</artifactId>
<version>1.0.2</version>
<exclusions>
<exclusion>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</exclusion>
</exclusions>
</dependency>
.....
<dependency>
<groupId>io.codearte.jfairy</groupId>
<artifactId>jfairy</artifactId>
<version>0.5.9</version>
<scope>test</scope>
</dependency>
.....
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.1-jre</version>
</dependency>
......
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>${snakeyaml.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
...................

In Apache maven, how do you override the scope of all transitive dependencies of a library?

E.g. If I have a project that depends on a library: "org.apache.hive:hive-common:jar:2.1.1-cdh6.3.4", with a provided scope. Now if I want to declare all its transitive dependencies as "provided", is it possible?
Not doing so will cause maven to fundamentally fail on resolving some of their scope properly:
[INFO] | +- org.apache.hive:hive-common:jar:2.1.1-cdh6.3.4:provided
[INFO] | | +- org.apache.hive:hive-classification:jar:2.1.1-cdh6.3.4:compile
[INFO] | | +- org.apache.hive:hive-storage-api:jar:2.1.1-cdh6.3.4:provided
[INFO] | | +- org.apache.hive:hive-orc:jar:2.1.1-cdh6.3.4:provided
[INFO] | | | +- org.apache.hadoop:hadoop-hdfs:jar:3.0.0-cdh6.3.4:provided
[INFO] | | | | +- org.eclipse.jetty:jetty-util-ajax:jar:9.3.25.v20180904:runtime
[INFO] | | | | +- com.sun.jersey:jersey-core:jar:1.19:runtime
[INFO] | | | | | \- javax.ws.rs:jsr311-api:jar:1.1.1:runtime
[INFO] | | | | +- com.sun.jersey:jersey-server:jar:1.19:runtime
[INFO] | | | | \- commons-daemon:commons-daemon:jar:1.0.13:provided
[INFO] | | | \- org.iq80.snappy:snappy:jar:0.2:provided
[INFO] | | +- org.apache.commons:commons-lang3:jar:3.3:compile
[INFO] | | +- javax.servlet:javax.servlet-api:jar:3.1.0:compile
[INFO] | | +- org.eclipse.jetty:jetty-rewrite:jar:9.3.25.v20180904:provided
[INFO] | | | \- org.eclipse.jetty:jetty-client:jar:9.3.25.v20180904:provided
[INFO] | | +- org.eclipse.jetty:jetty-server:jar:9.3.25.v20180904:compile
[INFO] | | | +- org.eclipse.jetty:jetty-http:jar:9.3.25.v20180904:compile
[INFO] | | | \- org.eclipse.jetty:jetty-io:jar:9.3.25.v20180904:compile
[INFO] | | +- org.eclipse.jetty:jetty-servlet:jar:9.3.25.v20180904:compile
[INFO] | | | \- org.eclipse.jetty:jetty-security:jar:9.3.25.v20180904:compile
[INFO] | | +- org.eclipse.jetty:jetty-webapp:jar:9.3.25.v20180904:compile
[INFO] | | | \- org.eclipse.jetty:jetty-xml:jar:9.3.25.v20180904:compile
[INFO] | | +- org.apache.logging.log4j:log4j-1.2-api:jar:2.8.2:provided
[INFO] | | | +- org.apache.logging.log4j:log4j-api:jar:2.8.2:compile
[INFO] | | | \- org.apache.logging.log4j:log4j-core:jar:2.8.2:provided
[INFO] | | +- org.apache.logging.log4j:log4j-web:jar:2.8.2:provided
[INFO] | | +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.8.2:compile
The last line in the output of dependency:tree:
org.apache.logging.log4j:log4j-slf4j-impl:jar:2.8.2:compile
Is clearly wrong: it cannot be found anywhere else, thus due to the rule in https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html. It's scope should be provided.
Is it possible to do it in maven? Or I'll have to switch to gradle?
Please check answers to the following question: Maven transitive dependency has scope compile while when dependency has provided scope
In short, it appears that you might be using <dependencyManagement> with some of org.apache.hive:hive-common dependencies which in the end is causing them to change their scope.

Arquillian missing dependency running tests

This question has been asked many times but noone of the answers (that I found) seems to help.
So, I have a wildfly-server running locally and then run a maven-command. From the server logs it seems to deploy the war-files and it doesn't complain at all. In maven it seems to run the tests but all tests returns:
<<< ERROR! java.lang.NoClassDefFoundError: org.junit.runner.Runner
So, I look in the deployed war-file and there I find junit- and arquillian-files that contains org/junit/runner/Runner.class. So, that shouldn't cause the problem.
Next I run mvn dependency:tree to verify that the maven-command and the junit and arquallian dependencies are there too. I mess around with for those dependencies but doesn't get any changes.
The only way, that I found, to change the error has been to change the junit-version from 4.12 to 4.8 but I don't know if it is a step forward when it compains about another class (org.junit.rules.RunRules).
Relevant dependencies in pom-file:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-arquillian-container-remote</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-depchain</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
<scope>test</scope>
</dependency>
Dump of the relevant files deployed to wildfly:
/WEB-INF/lib/querydsl-jpa-4.1.4.jar
/WEB-INF/lib/querydsl-core-4.1.4.jar
/WEB-INF/lib/guava-21.0.jar
/WEB-INF/lib/jsr305-3.0.1.jar
/WEB-INF/lib/mysema-commons-lang-0.2.4.jar
/WEB-INF/lib/bridge-method-annotation-1.14.jar
/WEB-INF/lib/slf4j-api-1.7.24.jar
/WEB-INF/lib/querydsl-sql-4.1.4.jar
/WEB-INF/lib/joda-time-2.9.7.jar
/WEB-INF/lib/validation-api-1.1.0.Final.jar
/WEB-INF/lib/org.apache.servicemix.bundles.javax-inject-1_2.jar
/WEB-INF/lib/log4j-api-2.8.1.jar
/WEB-INF/lib/log4j-core-2.8.1.jar
/WEB-INF/lib/disruptor-3.3.6.jar
/WEB-INF/lib/commons-collections4-4.1.jar
/WEB-INF/lib/logging-util-3.0.0.11-SNAPSHOT.jar
/WEB-INF/lib/arquillian-junit-container-1.1.13.Final.jar
/WEB-INF/lib/arquillian-junit-core-1.1.13.Final.jar
/WEB-INF/lib/arquillian-test-api-1.1.13.Final.jar
/WEB-INF/lib/arquillian-core-api-1.1.13.Final.jar
/WEB-INF/lib/arquillian-test-spi-1.1.13.Final.jar
/WEB-INF/lib/arquillian-core-spi-1.1.13.Final.jar
/WEB-INF/lib/arquillian-container-test-api-1.1.13.Final.jar
/WEB-INF/lib/shrinkwrap-api-1.2.6.jar
/WEB-INF/lib/arquillian-container-test-spi-1.1.13.Final.jar
/WEB-INF/lib/arquillian-container-spi-1.1.13.Final.jar
/WEB-INF/lib/shrinkwrap-descriptors-api-base-2.0.0-alpha-10.jar
/WEB-INF/lib/arquillian-core-impl-base-1.1.13.Final.jar
/WEB-INF/lib/arquillian-test-impl-base-1.1.13.Final.jar
/WEB-INF/lib/arquillian-container-impl-base-1.1.13.Final.jar
/WEB-INF/lib/arquillian-config-api-1.1.13.Final.jar
/WEB-INF/lib/arquillian-config-impl-base-1.1.13.Final.jar
/WEB-INF/lib/shrinkwrap-descriptors-spi-2.0.0-alpha-10.jar
/WEB-INF/lib/arquillian-container-test-impl-base-1.1.13.Final.jar
/WEB-INF/lib/shrinkwrap-impl-base-1.2.6.jar
/WEB-INF/lib/shrinkwrap-spi-1.2.6.jar
/WEB-INF/lib/junit-4.12.jar
Part of the mvn dependency:tree output
[INFO] +- org.jmockit:jmockit:jar:1.22:test
[INFO] +- junit:junit:jar:4.12:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.hamcrest:hamcrest-all:jar:1.3:test
[INFO] +- com.h2database:h2:jar:1.4.193:test
[INFO] +- com.openpojo:openpojo:jar:0.8.4:test
[INFO] +- org.hibernate:hibernate-validator:jar:5.1.3.Final:test
[INFO] | +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:provided
[INFO] | \- com.fasterxml:classmate:jar:1.3.3:provided
[INFO] +- com.sun.el:el-ri:jar:1.0:test
[INFO] +- org.jboss.arquillian.junit:arquillian-junit-core:jar:1.1.13.Final:test
[INFO] | \- org.jboss.arquillian.test:arquillian-test-spi:jar:1.1.13.Final:test
[INFO] | \- org.jboss.arquillian.core:arquillian-core-spi:jar:1.1.13.Final:test
[INFO] +- org.jboss.arquillian.junit:arquillian-junit-container:jar:1.1.13.Final:test
[INFO] | +- org.jboss.arquillian.test:arquillian-test-api:jar:1.1.13.Final:test
[INFO] | +- org.jboss.arquillian.container:arquillian-container-test-api:jar:1.1.13.Final:test
[INFO] | | \- org.jboss.shrinkwrap:shrinkwrap-api:jar:1.2.6:test
[INFO] | +- org.jboss.arquillian.container:arquillian-container-test-spi:jar:1.1.13.Final:test
[INFO] | | \- org.jboss.arquillian.container:arquillian-container-spi:jar:1.1.13.Final:test
[INFO] | | \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-api-base:jar:2.0.0-alpha-10:test
[INFO] | +- org.jboss.arquillian.core:arquillian-core-impl-base:jar:1.1.13.Final:test
[INFO] | +- org.jboss.arquillian.test:arquillian-test-impl-base:jar:1.1.13.Final:test
[INFO] | +- org.jboss.arquillian.container:arquillian-container-impl-base:jar:1.1.13.Final:test
[INFO] | | +- org.jboss.arquillian.config:arquillian-config-api:jar:1.1.13.Final:test
[INFO] | | +- org.jboss.arquillian.config:arquillian-config-impl-base:jar:1.1.13.Final:test
[INFO] | | \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-spi:jar:2.0.0-alpha-10:test
[INFO] | +- org.jboss.arquillian.container:arquillian-container-test-impl-base:jar:1.1.13.Final:test
[INFO] | \- org.jboss.shrinkwrap:shrinkwrap-impl-base:jar:1.2.6:test
[INFO] | \- org.jboss.shrinkwrap:shrinkwrap-spi:jar:1.2.6:test
[INFO] +- org.wildfly:wildfly-arquillian-container-remote:jar:8.2.1.Final:test
[INFO] | +- org.wildfly:wildfly-arquillian-common:jar:8.2.1.Final:test
[INFO] | | +- org.jboss.arquillian.testenricher:arquillian-testenricher-cdi:jar:1.1.13.Final:test
[INFO] | | +- org.jboss.arquillian.testenricher:arquillian-testenricher-ejb:jar:1.1.13.Final:test
[INFO] | | +- org.jboss.arquillian.testenricher:arquillian-testenricher-initialcontext:jar:1.1.13.Final:test
[INFO] | | +- org.jboss.arquillian.testenricher:arquillian-testenricher-osgi:jar:2.1.0.CR2:test
[INFO] | | +- org.jboss.arquillian.testenricher:arquillian-testenricher-resource:jar:1.1.13.Final:test
[INFO] | | +- org.jboss.arquillian.protocol:arquillian-protocol-servlet:jar:1.1.13.Final:test
[INFO] | | +- org.wildfly:wildfly-arquillian-testenricher-msc:jar:8.2.1.Final:test
[INFO] | | | +- org.wildfly:wildfly-server:jar:8.2.1.Final:test
[INFO] | | | | +- org.wildfly:wildfly-controller:jar:8.2.1.Final:test
[INFO] | | | | | +- org.wildfly:wildfly-core-security:jar:8.2.1.Final:test
[INFO] | | | | | | \- org.wildfly:wildfly-core-security-api:jar:8.2.1.Final:test
[INFO] | | | | | \- org.jboss:staxmapper:jar:1.1.0.Final:test
[INFO] | | | | +- org.wildfly:wildfly-domain-http-interface:jar:8.2.1.Final:test
[INFO] | | | | | \- org.wildfly:wildfly-domain-management:jar:8.2.1.Final:test
[INFO] | | | | +- org.wildfly:wildfly-deployment-repository:jar:8.2.1.Final:test
[INFO] | | | | +- org.wildfly:wildfly-patching:jar:8.2.1.Final:test
[INFO] | | | | | \- org.wildfly:wildfly-cli:jar:8.2.1.Final:test
[INFO] | | | | | +- org.jboss.aesh:aesh:jar:0.33.11:test
[INFO] | | | | | | \- org.fusesource.jansi:jansi:jar:1.9:test
[INFO] | | | | | \- sun.jdk:jconsole:jar:jdk:system
[INFO] | | | | +- org.wildfly:wildfly-platform-mbean:jar:8.2.1.Final:test
[INFO] | | | | +- org.wildfly:wildfly-process-controller:jar:8.2.1.Final:test
[INFO] | | | | +- org.wildfly:wildfly-remoting:jar:8.2.1.Final:test
[INFO] | | | | | \- org.wildfly:wildfly-io:jar:8.2.1.Final:test
[INFO] | | | | +- org.wildfly:wildfly-network:jar:8.2.1.Final:test
[INFO] | | | | +- org.wildfly:wildfly-version:jar:8.2.1.Final:test
[INFO] | | | | +- org.jboss:jandex:jar:1.2.1.Final:test
[INFO] | | | | +- org.jboss.invocation:jboss-invocation:jar:1.2.1.Final:test
[INFO] | | | | +- org.jboss.logmanager:jboss-logmanager:jar:1.5.2.Final:test
[INFO] | | | | +- org.jboss.modules:jboss-modules:jar:1.3.3.Final:test
[INFO] | | | | +- org.jboss.stdio:jboss-stdio:jar:1.0.2.GA:test
[INFO] | | | | +- org.jboss:jboss-vfs:jar:3.2.5.Final:test
[INFO] | | | | \- io.undertow:undertow-core:jar:1.1.8.Final:test
[INFO] | | | +- javax.inject:javax.inject:jar:1:provided
[INFO] | | | \- org.jboss.msc:jboss-msc:jar:1.2.2.Final:test
[INFO] | | +- org.wildfly:wildfly-controller-client:jar:8.2.1.Final:test
[INFO] | | | +- org.wildfly:wildfly-protocol:jar:8.2.1.Final:test
[INFO] | | | +- org.jboss:jboss-dmr:jar:1.2.0.Final:test
[INFO] | | | \- org.jboss.threads:jboss-threads:jar:2.1.1.Final:test
[INFO] | | +- org.wildfly:wildfly-jmx:jar:8.2.1.Final:test
[INFO] | | | \- org.jboss:jboss-common-core:jar:2.2.22.GA:test
[INFO] | | +- org.jboss.remotingjmx:remoting-jmx:jar:2.0.0.Final:test
[INFO] | | | +- org.jboss.remoting:jboss-remoting:jar:4.0.0.Beta3:test
[INFO] | | | +- org.jboss.xnio:xnio-api:jar:3.2.0.Beta4:test
[INFO] | | | \- org.jboss.xnio:xnio-nio:jar:3.2.0.Beta4:test
[INFO] | | +- org.jboss.sasl:jboss-sasl:jar:1.0.4.Final:test
[INFO] | | \- org.osgi:org.osgi.core:jar:5.0.0:test
[INFO] | +- org.wildfly:wildfly-arquillian-protocol-jmx:jar:8.2.1.Final:test
[INFO] | | +- org.wildfly.security:wildfly-security-manager:jar:1.0.0.Final:test
[INFO] | | +- org.jboss.arquillian.protocol:arquillian-protocol-jmx:jar:1.1.13.Final:test
[INFO] | | \- org.jboss.osgi.metadata:jbosgi-metadata:jar:3.0.1.Final:test
[INFO] | +- org.jboss.marshalling:jboss-marshalling-river:jar:1.4.9.Final:test
[INFO] | | \- org.jboss.marshalling:jboss-marshalling:jar:1.4.9.Final:test
[INFO] | +- org.jboss.arquillian.core:arquillian-core-api:jar:1.1.13.Final:test
[INFO] | \- org.wildfly:wildfly-build-config:jar:8.2.1.Final:test
[INFO] +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-depchain:pom:2.2.4:test
[INFO] | +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api:jar:2.2.4:test
[INFO] | +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-spi:jar:2.2.4:test
[INFO] | +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api-maven:jar:2.2.4:test
[INFO] | +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-spi-maven:jar:2.2.4:test
[INFO] | +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api-maven-archive:jar:2.2.4:test
[INFO] | \- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven-archive:jar:2.2.4:test
[INFO] | +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-spi-maven-archive:jar:2.2.4:test
[INFO] | +- org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.0.M1:test
[INFO] | | +- javax.enterprise:cdi-api:jar:1.0:test
[INFO] | | | \- javax.annotation:jsr250-api:jar:1.0:test
[INFO] | | \- org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.0.M1:test
[INFO] | \- org.codehaus.plexus:plexus-compiler-javac:jar:2.3:test
[INFO] | \- org.codehaus.plexus:plexus-compiler-api:jar:2.3:test
[INFO] +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:jar:2.2.4:test
[INFO] | +- org.eclipse.aether:aether-api:jar:1.0.0.v20140518:test
[INFO] | +- org.eclipse.aether:aether-impl:jar:1.0.0.v20140518:test
[INFO] | +- org.eclipse.aether:aether-spi:jar:1.0.0.v20140518:test
[INFO] | +- org.eclipse.aether:aether-util:jar:1.0.0.v20140518:test
[INFO] | +- org.eclipse.aether:aether-connector-basic:jar:1.0.0.v20140518:test
[INFO] | +- org.eclipse.aether:aether-transport-wagon:jar:1.0.0.v20140518:test
[INFO] | +- org.apache.maven:maven-aether-provider:jar:3.2.5:test
[INFO] | +- org.apache.maven:maven-model:jar:3.2.5:test
[INFO] | +- org.apache.maven:maven-model-builder:jar:3.2.5:test
[INFO] | | \- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:test
[INFO] | +- org.apache.maven:maven-repository-metadata:jar:3.2.5:test
[INFO] | +- org.apache.maven:maven-settings:jar:3.2.5:test
[INFO] | +- org.apache.maven:maven-settings-builder:jar:3.2.5:test
[INFO] | +- org.codehaus.plexus:plexus-interpolation:jar:1.21:test
[INFO] | +- org.codehaus.plexus:plexus-utils:jar:3.0.20:test
[INFO] | +- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:test
[INFO] | | \- org.sonatype.plexus:plexus-cipher:jar:1.4:test
[INFO] | +- org.apache.maven.wagon:wagon-provider-api:jar:2.6:test
[INFO] | +- org.apache.maven.wagon:wagon-file:jar:2.6:test
[INFO] | \- org.apache.maven.wagon:wagon-http-lightweight:jar:2.6:test
[INFO] | \- org.apache.maven.wagon:wagon-http-shared:jar:2.6:test
[INFO] | +- org.jsoup:jsoup:jar:1.7.2:test
[INFO] | \- commons-io:commons-io:jar:2.5:provided

Idea is using different version of library than defined in project

I have a maven project opened in IntelliJ Idea. Maven build(executed from IDE) works fine, but when I try to run the some JUnit test, it shows me some import issues, because some older version of one library is used. The library is called sf-gml-api and the desired version is 1.50.3, but in the External Libraries node in the project, idea shows this:
The obvious thing to check is if some other library doesn't depend on this version, but mvn dependency:tree seems to be in order - correct version everywhere.
> mvn dependency:tree | grep sf-gml-api
[INFO] +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | | | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:test
[INFO] | | | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:provided
[INFO] | | | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | | | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | | | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | | | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
[INFO] | +- com.snowflakesoft.common:sf-gml-api:jar:1.50.3:compile
I've tried maven reimport in Idea, but without any luck. What could be the issue? The dependencies are only defined in the pom files.
IntelliJ Idea 14.1.4
Maven 3.2.3
Clearing ~/.IntelliJIdea14/system/Maven didn't help as well as invalidating caches and restart.
What fixed the problem was installing Idea update 2016.1.4
I would check if you delete it from Open Module Settings -> libraries and refresh workspace. If It still persists try to analyze this library by intellij with right click on library and Analazy -> Analyze dependencies.

HTTP Status 409 - The target deployment path [...] does not match the POM's expected path prefix

I use Artifactory as a Maven Repository, on which I'm not admin (corporate repo).
I'm trying to use XmlSchema (through many dependencies of appfuse-basic-struts archetype) but I'm face of an issue that I am not able to understand when I run mvn package:
HTTP Status 409 - The target deployment path 'org/apache/ws/commons/XmlSchema/1.1/XmlSchema-1.1.pom' does not match the POM's expected path prefix 'org/apache/ws/commons/XmlSchema/SNAPSHOT'. Please verify your POM content for correctness and make sure the source path is a valid Maven repository root path.
type Status report
message The target deployment path
'org/apache/ws/commons/XmlSchema/1.1/XmlSchema-1.1.pom' does not match
the POM's expected path prefix
'org/apache/ws/commons/XmlSchema/SNAPSHOT'. Please verify your POM
content for correctness and make sure the source path is a valid Maven
repository root path.
description The request could not be completed due to a conflict with
the current state of the resource (The target deployment path
'org/apache/ws/commons/XmlSchema/1.1/XmlSchema-1.1.pom' does not match
the POM's expected path prefix
'org/apache/ws/commons/XmlSchema/SNAPSHOT'. Please verify your POM
content for correctness and make sure the source path is a valid Maven
repository root path.). Apache Tomcat/6.0.18
Even in transitive dependencies, I don't find it.
Can anyone explain me what the trouble ?
I found this post Using Maven-3 Got Http 409 error when re-deploy with archiva but it does not seem to match my issue.
EDIT 1 : this work quite well when I don't use my corporate repo.
EDIT 2 : Here the view of the repo via http :
Index of repo/org/apache/ws/commons/XmlSchema/1.1
Name Last modified Size
../
maven-metadata.xml-> - -
maven-metadata.xml.md5-> - -
maven-metadata.xml.sha1-> - -
XmlSchema-1.1.jar 18-Sep-2006 20:12 124.96 KB
XmlSchema-1.1.jar.asc-> - -
XmlSchema-1.1.jar.md5 18-Sep-2006 20:12 32 bytes
XmlSchema-1.1.jar.sha1 18-Sep-2006 20:12 40 bytes
XmlSchema-1.1.pom-> - -
XmlSchema-1.1.pom.md5-> - -
XmlSchema-1.1.pom.sha1-> - -
EDIT 3 : Dependencies
mvn dependency:tree
[INFO] com.edf.dpi.esip.gdt:gdt-ihm:war:7.0.1-SNAPSHOT
[INFO] +- org.appfuse:appfuse-struts:war:2.0-m5:compile
[INFO] +- org.appfuse:appfuse-struts:warpath:2.0-m5:compile
[INFO] | +- org.appfuse:appfuse-web-common:war:2.0-m5:compile
[INFO] | +- org.appfuse:appfuse-web-common:warpath:2.0-m5:compile
[INFO] | | +- org.appfuse:appfuse-service:jar:2.0-m5:compile
[INFO] | | | +- aspectj:aspectjweaver:jar:1.5.3:compile
[INFO] | | | +- net.sf.ehcache:ehcache:jar:1.3.0-beta2:compile
[INFO] | | | | \- net.sf.jsr107cache:jsr107cache:jar:1.0:compile
[INFO] | | | +- velocity:velocity:jar:1.4:compile
[INFO] | | | | \- velocity:velocity-dep:jar:1.4:runtime
[INFO] | | | \- org.codehaus.xfire:xfire-all:jar:1.2.6:compile
[INFO] | | | +- org.codehaus.xfire:xfire-aegis:jar:1.2.6:compile
[INFO] | | | | \- net.java.dev.stax-utils:stax-utils:jar:20040917:compile
[INFO] | | | +- org.codehaus.xfire:xfire-ws-security:jar:1.2.6:compile
[INFO] | | | | +- xfire:opensaml:jar:1.0.1:compile
[INFO] | | | | +- bouncycastle:bcprov-jdk15:jar:133:compile
[INFO] | | | | +- xerces:xercesImpl:jar:2.7.1:compile
[INFO] | | | | +- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] | | | | +- xml-security:xmlsec:jar:1.3.0:compile
[INFO] | | | | +- wss4j:wss4j:jar:1.5.1:compile
[INFO] | | | | \- commons-discovery:commons-discovery:jar:0.2:compile
[INFO] | | | +- org.codehaus.xfire:xfire-core:jar:1.2.6:compile
[INFO] | | | | +- wsdl4j:wsdl4j:jar:1.6.1:compile
[INFO] | | | | +- jaxen:jaxen:jar:1.1-beta-9:compile
[INFO] | | | | | \- xerces:xmlParserAPIs:jar:2.6.2:compile
[INFO] | | | | +- stax:stax-api:jar:1.0.1:compile
[INFO] | | | | +- org.apache.ws.commons:XmlSchema:jar:1.1:compile
[INFO] | | | | +- org.codehaus.woodstox:wstx-asl:jar:3.2.0:compile
[INFO] | | | | +- jdom:jdom:jar:1.0:compile
[INFO] | | | | \- commons-httpclient:commons-httpclient:jar:3.0:compile
[INFO] | | | +- org.codehaus.xfire:xfire-java5:jar:1.2.6:compile
[INFO] | | | | \- xfire:xfire-jsr181-api:jar:1.0-M1:compile
[INFO] | | | +- org.codehaus.xfire:xfire-generator:jar:1.2.6:compile
[INFO] | | | | \- org.codehaus.xfire:xfire-jaxb2:jar:1.2.6:compile
[INFO] | | | | \- com.sun.xml.bind:jaxb-xjc:jar:2.0.1:compile
[INFO] | | | | \- com.sun.xml.bind:jaxb-impl:jar:2.0.1:compile
[INFO] | | | +- org.codehaus.xfire:xfire-xmlbeans:jar:1.2.6:compile
[INFO] | | | | \- xmlbeans:xbean:jar:2.2.0:compile
[INFO] | | | +- org.codehaus.xfire:xfire-annotations:jar:1.2.6:compile
[INFO] | | | | \- commons-attributes:commons-attributes-api:jar:2.1:compile
[INFO] | | | | +- ant:ant:jar:1.5:compile
[INFO] | | | | \- qdox:qdox:jar:1.5:compile
[INFO] | | | +- org.codehaus.xfire:xfire-jaxws:jar:1.2.6:compile
[INFO] | | | | +- javax.xml.ws:jaxws-api:jar:2.0:compile
[INFO] | | | | | \- javax.xml.bind:jaxb-api:jar:2.0:compile
[INFO] | | | | | \- javax.xml.bind:jsr173_api:jar:1.0:compile
[INFO] | | | | +- com.sun.xml.messaging.saaj:saaj-impl:jar:1.3:compile
[INFO] | | | | \- javax.xml.soap:saaj-api:jar:1.3:compile
[INFO] | | | \- org.codehaus.xfire:xfire-spring:jar:1.2.6:compile
[INFO] | | | \- org.apache.xbean:xbean-spring:jar:2.8:compile
[INFO] | | +- commons-collections:commons-collections:jar:3.2:compile
[INFO] | | +- commons-dbcp:commons-dbcp:jar:1.2.2:compile
[INFO] | | | \- commons-pool:commons-pool:jar:1.3:compile
[INFO] | | +- org.directwebremoting:dwr:jar:2.0.1:compile
[INFO] | | +- javax.servlet:jstl:jar:1.1.2:compile
[INFO] | | +- taglibs:standard:jar:1.1.2:compile
[INFO] | | +- struts-menu:struts-menu:jar:2.4.2:compile
[INFO] | | | +- commons-digester:commons-digester:jar:1.7:compile
[INFO] | | | \- velocity-tools:velocity-tools-view:jar:1.0:compile
[INFO] | | +- opensymphony:clickstream:jar:1.0.2:compile
[INFO] | | +- opensymphony:oscache:jar:2.3:compile
[INFO] | | +- opensymphony:sitemesh:jar:2.2.1:compile
[INFO] | | \- org.tuckey:urlrewrite:jar:2.5.2:compile
[INFO] | +- org.apache.struts:struts2-core:jar:2.0.6:compile
[INFO] | | +- opensymphony:xwork:jar:2.0.1:compile
[INFO] | | +- freemarker:freemarker:jar:2.3.8:compile
[INFO] | | +- opensymphony:ognl:jar:2.6.11:compile
[INFO] | | +- commons-logging:commons-logging:jar:1.1:compile
[INFO] | | \- com.sun:tools:jar:1.5.0:system
[INFO] | +- org.apache.struts:struts2-codebehind-plugin:jar:2.0.6:compile
[INFO] | +- org.apache.struts:struts2-spring-plugin:jar:2.0.6:compile
[INFO] | +- commons-fileupload:commons-fileupload:jar:1.1.1:compile
[INFO] | +- commons-io:commons-io:jar:1.1:compile
[INFO] | +- displaytag:displaytag:jar:1.1:compile
[INFO] | | +- commons-lang:commons-lang:jar:2.1:compile
[INFO] | | +- com.lowagie:itext:jar:1.3:compile
[INFO] | | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
[INFO] | +- org.acegisecurity:acegi-security-tiger:jar:1.0.3:compile
[INFO] | | \- org.acegisecurity:acegi-security:jar:1.0.3:compile
[INFO] | | +- commons-codec:commons-codec:jar:1.3:compile
[INFO] | | \- oro:oro:jar:2.0.8:compile
[INFO] | +- log4j:log4j:jar:1.2.15:compile
[INFO] | | +- javax.mail:mail:jar:1.4:compile
[INFO] | | | \- javax.activation:activation:jar:1.1:compile
[INFO] | | +- javax.jms:jms:jar:1.1:compile
[INFO] | | +- com.sun.jdmk:jmxtools:jar:1.2.1:compile
[INFO] | | \- com.sun.jmx:jmxri:jar:1.2.1:compile
[INFO] | \- org.springframework:spring:jar:2.0.5:compile
[INFO] +- org.appfuse:appfuse-hibernate:jar:2.0-m5:compile
[INFO] | +- org.appfuse:appfuse-data-common:jar:2.0-m5:compile
[INFO] | | \- javax.persistence:persistence-api:jar:1.0:compile
[INFO] | \- org.hibernate:hibernate-annotations:jar:3.2.1.ga:compile
[INFO] | \- org.hibernate:hibernate:jar:3.2.1.ga:compile
[INFO] | +- javax.transaction:jta:jar:1.0.1B:compile
[INFO] | +- asm:asm-attrs:jar:1.5.3:compile
[INFO] | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | +- antlr:antlr:jar:2.7.6:compile
[INFO] | +- cglib:cglib:jar:2.1_3:compile
[INFO] | \- asm:asm:jar:1.5.3:compile
[INFO] +- mysql:mysql-connector-java:jar:5.0.5:compile
[INFO] +- javax.servlet:jsp-api:jar:2.0:provided
[INFO] +- javax.servlet:servlet-api:jar:2.4:provided
[INFO] +- jmock:jmock:jar:1.1.0:test (scope not updated to compile)
[INFO] +- junit:junit:jar:4.10:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.1:test
[INFO] +- org.springframework:spring-mock:jar:2.0.8:test
[INFO] \- org.subethamail:subethasmtp-wiser:jar:1.0.3:test
[INFO] \- org.subethamail:subethasmtp-smtp:jar:1.0.3:test
The transitive dependencies have practically been poisoned.
The best thing you can do is check if the original POM of 'XmlSchema' has been publish with the version 'SNAPSHOT' or not. If it has, ask the project maintainers to correct this mistake and re-publish the POM; If it hasn't been published this way, remove the incorrect POM file and make sure that you resolve it again from a healthy source.
If both of these options aren't applicable, you can download the POM file, edit to correct and redeploy it to your local repository
I had this same problem and I was able to get around it by checking the "Supress POM Consistency Checks" check box in the Artifactory remote repository settings.
maven repo settings
I have the same error: the official pom of XmlSchema v1.1 is wrong, there is no healty source you can get it from so you have the following options:
correct it by hand on artifactory,
copy it by hand to your local repository (no changes needed),
upgrade to a more recent version (since it is a transitive dependency of xfire 1.2.6 this could be not possible, but you can try).
For more info see the answer to this post: Maven Central Repository admins know that the pom is wrong but they cannot correct it and Apache doesn't support XmlSchema 1.1 anymore.
Furthermore this is not the only problematic pom: also Apache commons-logging v1.1 is wrong (it lists wrong dependencies), so I always use v1.1.1 or above.

Resources