Why was the maven dependency excluded? - java

After executing mvn dependency:tree, I got the following output:
[INFO] stpr:stpr:war:1.0
[INFO] +- org.jboss.spec:jboss-javaee-6.0:pom:1.0.0.Final:provided
[INFO] | +- org.jboss.spec.javax.annotation:jboss-annotations-api_1.1_spec:jar:
1.0.0.Final:provided
[INFO] | +- org.jboss.spec.javax.resource:jboss-connector-api_1.5_spec:jar:1.0.
0.Final:provided
[INFO] | +- org.jboss.spec.javax.ejb:jboss-ejb-api_3.1_spec:jar:1.0.0.Final:pro
vided
[INFO] | | \- javax.xml:jaxrpc-api:jar:1.1:provided
[INFO] | +- org.jboss.spec.javax.el:jboss-el-api_2.2_spec:jar:1.0.0.Final:provi
ded
[INFO] | +- org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.1_spec:ja
r:1.0.0.Final:provided
[INFO] | +- org.jboss.spec.javax.security.jacc:jboss-jacc-api_1.4_spec:jar:1.0.
0.Final:provided
[INFO] | +- org.jboss.spec.javax.enterprise.deploy:jboss-jad-api_1.2_spec:jar:1
.0.0.Final:provided
[INFO] | +- org.jboss.spec.javax.security.auth.message:jboss-jaspi-api_1.0_spec
:jar:1.0.0.Final:provided
[INFO] | +- org.jboss.spec.javax.xml.registry:jboss-jaxr-api_1.0_spec:jar:1.0.0
.Final:provided
[INFO] | +- org.jboss.spec.javax.jms:jboss-jms-api_1.1_spec:jar:1.0.0.Final:pro
vided
[INFO] | +- org.jboss.spec.javax.servlet.jsp:jboss-jsp-api_2.2_spec:jar:1.0.0.F
inal:provided
[INFO] | +- org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:jar:1.0.0.F
inal:provided
[INFO] | +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar
:1.0.0.Final:provided
[INFO] | +- org.jboss.spec.javax.xml.bind:jboss-jaxb-api_2.2_spec:jar:1.0.0.Fin
al:provided
[INFO] | +- org.jboss.spec.javax.xml.rpc:jboss-jaxrpc-api_1.1_spec:jar:1.0.0.Fi
nal:provided
[INFO] | +- org.jboss.spec.javax.xml.soap:jboss-saaj-api_1.3_spec:jar:1.0.0.Fin
al:provided
[INFO] | +- org.jboss.spec.javax.xml.ws:jboss-jaxws-api_2.2_spec:jar:1.0.0.Fina
l:provided
[INFO] | +- javax.activation:activation:jar:1.1:provided
[INFO] | +- javax.enterprise:cdi-api:jar:1.0-SP4:provided
[INFO] | +- com.sun.faces:jsf-api:jar:2.0.3-b05:provided
[INFO] | +- javax.inject:javax.inject:jar:1:provided
[INFO] | +- javax.jws:jsr181-api:jar:1.0-MR1:provided
[INFO] | +- javax.mail:mail:jar:1.4.2:provided
[INFO] | +- javax.servlet:jstl:jar:1.2:provided
[INFO] | +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Fin
al:provided
[INFO] | +- org.jboss.resteasy:jaxrs-api:jar:2.1.0.GA:provided
[INFO] | +- stax:stax-api:jar:1.0.1:provided
[INFO] | \- javax.validation:validation-api:jar:1.0.0.GA:provided
[INFO] \- javax.transaction:javax.transaction-api:jar:1.2-b03:compile
My question is why javax.transaction-api:jar:1.2-b03:compile were excluded? I didn't specify any exclusion explicitly. What's wrong?
The pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>gr</groupId>
<artifactId>ar</artifactId>
<packaging>war</packaging>
<version>1.0</version>
<name>nm</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>1.0.0.Final</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>javax.transaction-api</artifactId>
<version>1.2-b03</version>
</dependency>
</dependencies>
<profiles>
<!-- profiles here -->
</profiles>
</project>

The output does not show any exclusion for the dependency. In fact, if the dependency were excluded, it would not have been shown in the dependency tree. By looking at the tree, the dependency is shown in the last line:
[INFO] \- javax.transaction:javax.transaction-api:jar:1.2-b03:compile

Maybe you need to update your maven project to reload the dependencies.

Related

no such method org.jboss.logging.Logger.debugf SpringJPA

So I have no idea whenever this started as my project seemed to work perfectly last week and this week throws this error
java.lang.NoSuchMethodError: org.jboss.logging.Logger.debugf(Ljava/lang/String;I)V
at org.hibernate.query.spi.NamedQueryRepository.checkNamedQueries(NamedQueryRepository.java:151)
at org.hibernate.internal.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:533)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:323)
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:462)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:892)
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:57)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:390)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:377)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1758)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1695)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:573)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:224)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1012)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:981)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findDefaultEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:569)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:532)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.resolveEntityManager(PersistenceAnnotationBeanPostProcessor.java:700)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.getResourceToInject(PersistenceAnnotationBeanPostProcessor.java:673)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:180)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:353)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1341)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:572)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1135)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1062)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:372)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1341)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:572)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:372)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1247)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1096)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:535)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:226)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:182)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:177)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAdaptableBeans(ServletContextInitializerBeans.java:159)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:81)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:250)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:237)
at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:54)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5245)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1420)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1410)
at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
at java.util.concurrent.FutureTask.run(FutureTask.java)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2021-04-19 10:46:02 [main] Ontolobridge-dev ERROR o.s.b.d.LoggingFailureAnalysisReporter -
So I went through the POM dependency tree and removed all imports of jboss-logging as I saw on a few stack overflows from 5 years ago to last year. However jboss-logging-3.1.3.GA.jar is still somehow imported. So I deleted the jar so its no longer in the class path and according to the POM is no longer in the dependency tree and yet every time I start the application it gets redownloaded. I cannot use a higher version as the older version is downloaded even if the newer version already exists.
Pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>edu.miami.schurer</groupId>
<artifactId>ontologbridge</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>ontologbridge</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.5.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.9.0</version>
</dependency>
<!-- Mysql Connector -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.20</version>
</dependency>
<!-- Apache Commons DBCP -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>it.ozimov</groupId>
<artifactId>spring-boot-email-core</artifactId>
<version>0.6.3</version>
</dependency>
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>4.1</version>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<scope>test</scope>
</dependency>
<!--SpringFox dependencies --><!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger2 -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry</artifactId>
<version>1.7.30</version>
</dependency>
<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry-logback</artifactId>
<version>1.7.30</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Tried removing all jboss-logging as you can see in the pomexclusions
Tried deleting the jar from the .m2 repository but it gets reloaded anyways
Tried doing the glassfish fix with glassfish-web.xml fix
Tried posting to github due to lack of answers in other threads but closed and told to come back here.
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call the method org.jboss.logging.Logger.debugf(Ljava/lang/String;I)V but it does not exist. Its class, org.jboss.logging.Logger, is available from the following locations:
jar:file:/C:/Users/<user>/.m2/repository/org/jboss/logging/jboss-logging/3.1.3.GA/jboss-logging-3.1.3.GA.jar!/org/jboss/logging/Logger.class
It was loaded from the following location:
file:/C:/Users/<user>/.m2/repository/org/jboss/logging/jboss-logging/3.1.3.GA/jboss-logging-3.1.3.GA.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of org.jboss.logging.Logger
MVN Dependency Tree:
[INFO]
[INFO] ------------------< edu.miami.schurer:ontologbridge >-------------------
[INFO] Building ontologbridge 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:3.0.2:tree (default-cli) # ontologbridge ---
[INFO] edu.miami.schurer:ontologbridge:war:0.0.1-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.0.5.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:2.0.5.RELEASE:compile
[INFO] | | \- org.springframework:spring-context:jar:5.0.9.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.0.5.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-logging:jar:2.0.5.RELEASE:compile
[INFO] | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.10.0:compile
[INFO] | | | \- org.apache.logging.log4j:log4j-api:jar:2.10.0:compile
[INFO] | | \- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] | +- org.springframework:spring-core:jar:5.0.9.RELEASE:compile
[INFO] | | \- org.springframework:spring-jcl:jar:5.0.9.RELEASE:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.19:runtime
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.0.5.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.0.5.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-actuator:jar:2.0.5.RELEASE:compile
[INFO] | | \- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.6:compile
[INFO] | \- io.micrometer:micrometer-core:jar:1.0.6:compile
[INFO] | +- org.hdrhistogram:HdrHistogram:jar:2.1.10:compile
[INFO] | \- org.latencyutils:LatencyUtils:jar:2.0.3:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.0.5.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.0.5.RELEASE:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.6:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.6:compile
[INFO] | +- org.hibernate.validator:hibernate-validator:jar:6.0.12.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] | | \- org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] | +- org.springframework:spring-web:jar:5.0.9.RELEASE:compile
[INFO] | | \- org.springframework:spring-beans:jar:5.0.9.RELEASE:compile
[INFO] | \- org.springframework:spring-webmvc:jar:5.0.9.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:5.0.9.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:2.0.5.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:5.0.9.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-config:jar:5.0.8.RELEASE:compile
[INFO] | | \- org.springframework.security:spring-security-core:jar:5.0.8.RELEASE:compile
[INFO] | \- org.springframework.security:spring-security-web:jar:5.0.8.RELEASE:compile
[INFO] +- org.postgresql:postgresql:jar:42.2.5:runtime
[INFO] +- io.jsonwebtoken:jjwt:jar:0.9.0:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] +- mysql:mysql-connector-java:jar:8.0.20:compile
[INFO] | \- com.google.protobuf:protobuf-java:jar:3.6.1:compile
[INFO] +- org.apache.commons:commons-dbcp2:jar:2.1.1:compile
[INFO] | \- org.apache.commons:commons-pool2:jar:2.5.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.0.5.RELEASE:provided
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.34:provided
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.34:compile
[INFO] | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.34:provided
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.5.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.0.5.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.0.5.RELEASE:test
[INFO] | +- junit:junit:jar:4.12:test
[INFO] | +- org.assertj:assertj-core:jar:3.9.1:test
[INFO] | +- org.mockito:mockito-core:jar:2.15.0:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.7.11:compile
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.7.11:test
[INFO] | | \- org.objenesis:objenesis:jar:2.6:test
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3: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-test:jar:5.0.9.RELEASE:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.5.1:test
[INFO] +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.0.5.RELEASE:compile
[INFO] | +- com.zaxxer:HikariCP:jar:2.7.9:compile
[INFO] | \- org.springframework:spring-jdbc:jar:5.0.9.RELEASE:compile
[INFO] | \- org.springframework:spring-tx:jar:5.0.9.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-configuration-processor:jar:2.0.5.RELEASE:compile (optional)
[INFO] +- org.springframework.boot:spring-boot-starter-validation:jar:2.0.5.RELEASE:compile
[INFO] +- it.ozimov:spring-boot-email-core:jar:0.6.3:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-mail:jar:2.0.5.RELEASE:compile
[INFO] | | +- org.springframework:spring-context-support:jar:5.0.9.RELEASE:compile
[INFO] | | \- com.sun.mail:javax.mail:jar:1.6.2:compile
[INFO] | | \- javax.activation:activation:jar:1.1:compile
[INFO] | +- org.apache.tika:tika-core:jar:1.14:compile
[INFO] | +- org.hibernate:hibernate-validator:jar:5.3.3.Final:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-data-redis:jar:2.0.5.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-redis:jar:2.0.10.RELEASE:compile
[INFO] | | | +- org.springframework.data:spring-data-keyvalue:jar:2.0.10.RELEASE:compile
[INFO] | | | \- org.springframework:spring-oxm:jar:5.0.9.RELEASE:compile
[INFO] | | \- io.lettuce:lettuce-core:jar:5.0.5.RELEASE:compile
[INFO] | | +- io.projectreactor:reactor-core:jar:3.1.9.RELEASE:compile
[INFO] | | | \- org.reactivestreams:reactive-streams:jar:1.0.2:compile
[INFO] | | +- io.netty:netty-common:jar:4.1.29.Final:compile
[INFO] | | +- io.netty:netty-transport:jar:4.1.29.Final:compile
[INFO] | | | +- io.netty:netty-buffer:jar:4.1.29.Final:compile
[INFO] | | | \- io.netty:netty-resolver:jar:4.1.29.Final:compile
[INFO] | | \- io.netty:netty-handler:jar:4.1.29.Final:compile
[INFO] | | \- io.netty:netty-codec:jar:4.1.29.Final:compile
[INFO] | +- it.ozimov:embedded-redis:jar:0.7.0:compile
[INFO] | | \- commons-io:commons-io:jar:2.5:compile
[INFO] | +- org.owasp.encoder:encoder:jar:1.2.1:compile
[INFO] | \- com.google.guava:guava:jar:21.0:compile
[INFO] +- com.opencsv:opencsv:jar:4.1:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.7:compile
[INFO] | +- org.apache.commons:commons-text:jar:1.1:compile
[INFO] | \- commons-beanutils:commons-beanutils:jar:1.9.3:compile
[INFO] | +- commons-logging:commons-logging:jar:1.2:compile
[INFO] | \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | +- net.minidev:json-smart:jar:2.3:test
[INFO] | | \- net.minidev:accessors-smart:jar:1.2:test
[INFO] | | \- org.ow2.asm:asm:jar:5.0.4:test
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- io.springfox:springfox-swagger2:jar:2.9.2:compile
[INFO] | +- io.swagger:swagger-annotations:jar:1.5.20:compile
[INFO] | +- io.swagger:swagger-models:jar:1.5.20:compile
[INFO] | +- io.springfox:springfox-spi:jar:2.9.2:compile
[INFO] | | \- io.springfox:springfox-core:jar:2.9.2:compile
[INFO] | +- io.springfox:springfox-schema:jar:2.9.2:compile
[INFO] | +- io.springfox:springfox-swagger-common:jar:2.9.2:compile
[INFO] | +- io.springfox:springfox-spring-web:jar:2.9.2:compile
[INFO] | +- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] | +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] | +- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] | \- org.mapstruct:mapstruct:jar:1.2.0.Final:compile
[INFO] +- io.springfox:springfox-swagger-ui:jar:2.9.2:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:2.0.5.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:2.0.5.RELEASE:compile
[INFO] | | \- org.aspectj:aspectjweaver:jar:1.8.13:compile
[INFO] | +- javax.transaction:javax.transaction-api:jar:1.2:compile
[INFO] | +- org.hibernate:hibernate-core:jar:5.2.17.Final:compile
[INFO] | | +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.2.Final:compile
[INFO] | | +- org.javassist:javassist:jar:3.22.0-GA:compile
[INFO] | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | +- org.jboss:jandex:jar:2.0.3.Final:compile
[INFO] | | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | | \- org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile
[INFO] | +- org.springframework.data:spring-data-jpa:jar:2.0.10.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-commons:jar:2.0.10.RELEASE:compile
[INFO] | | \- org.springframework:spring-orm:jar:5.0.9.RELEASE:compile
[INFO] | \- org.springframework:spring-aspects:jar:5.0.9.RELEASE:compile
[INFO] +- io.sentry:sentry:jar:1.7.30:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile
[INFO] \- io.sentry:sentry-logback:jar:1.7.30:compile
[INFO] +- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] \- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.686 s
[INFO] Finished at: 2021-04-20T16:36:21-04:00
[INFO] ------------------------------------------------------------------------
How do I fix this.

Jars Pulled by dependency spring-boot-starter-test in pom.xml

I have created a spring boot application.
In the pom.xml there are several dependencies which pull several jars in maven dependencies.
Here is pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.1</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.aciworldwide.tch</groupId>
<artifactId>bmo</artifactId>
<version>1.3.1.0-SNAPSHOT</version>
<name>PmtStsReqApplication</name>
<description>Generation of xml file with the list of unsettled records from Ipf Trans Log</description>
<properties>
<java.version>1.8</java.version>
<start-class>com.aciworldwide.tch.PmtStsReqApplication</start-class>
<jaxb-api.version>2.3.1</jaxb-api.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>19.3.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- JAXB 2.3.0 for jdk9+ -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb-api.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>${jaxb-api.version}</version>
</dependency>
<!-- JAXB needs javax.activation module (jdk9) -->
<dependency>
<groupId>javax.activation</groupId>
<artifactId>javax.activation-api</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>org.jasypt</groupId>
<artifactId>jasypt</artifactId>
<version>1.9.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<packaging>jar</packaging>
</project>
Here is the list of jars present after building the application
I want to know which jars are pulled by the dependency : spring-boot-starter-test when building the application.
It would be helpful to know how to know which dependency jars are downloaded by which dependency mentioned in pom.xml.
You can use mvn dependency:tree on the command line to see a tree of your project's dependencies. Using your pom, it outputs the following:
[INFO] com.aciworldwide.tch:bmo:jar:1.3.1.0-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.4.1:compile
[INFO] | +- com.zaxxer:HikariCP:jar:3.4.5:compile
[INFO] | | \- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] | \- org.springframework:spring-jdbc:jar:5.3.2:compile
[INFO] | +- org.springframework:spring-beans:jar:5.3.2:compile
[INFO] | \- org.springframework:spring-tx:jar:5.3.2:compile
[INFO] +- com.oracle.ojdbc:ojdbc8:jar:19.3.0.0:compile
[INFO] | +- com.oracle.ojdbc:ucp:jar:19.3.0.0:compile
[INFO] | +- com.oracle.ojdbc:oraclepki:jar:19.3.0.0:compile
[INFO] | +- com.oracle.ojdbc:osdt_cert:jar:19.3.0.0:compile
[INFO] | +- com.oracle.ojdbc:osdt_core:jar:19.3.0.0:compile
[INFO] | +- com.oracle.ojdbc:simplefan:jar:19.3.0.0:compile
[INFO] | \- com.oracle.ojdbc:ons:jar:19.3.0.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.4.1:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:2.4.1:compile
[INFO] | | \- org.springframework:spring-context:jar:5.3.2:compile
[INFO] | | +- org.springframework:spring-aop:jar:5.3.2:compile
[INFO] | | \- org.springframework:spring-expression:jar:5.3.2:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.4.1:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-logging:jar:2.4.1:compile
[INFO] | | +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] | | | \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.13.3:compile
[INFO] | | | \- org.apache.logging.log4j:log4j-api:jar:2.13.3:compile
[INFO] | | \- org.slf4j:jul-to-slf4j:jar:1.7.30:compile
[INFO] | +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] | +- org.springframework:spring-core:jar:5.3.2:compile
[INFO] | | \- org.springframework:spring-jcl:jar:5.3.2:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.27:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.4.1:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.4.1:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.4.1:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | | \- net.minidev:json-smart:jar:2.3:test
[INFO] | | \- net.minidev:accessors-smart:jar:1.2:test
[INFO] | | \- org.ow2.asm:asm:jar:5.0.4:test
[INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:test
[INFO] | | \- jakarta.activation:jakarta.activation-api:jar:1.2.2:test
[INFO] | +- org.assertj:assertj-core:jar:3.18.1:test
[INFO] | +- org.hamcrest:hamcrest:jar:2.2:test
[INFO] | +- org.junit.jupiter:junit-jupiter:jar:5.7.0:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-api:jar:5.7.0:test
[INFO] | | | +- org.apiguardian:apiguardian-api:jar:1.1.0:test
[INFO] | | | +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] | | | \- org.junit.platform:junit-platform-commons:jar:1.7.0:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-params:jar:5.7.0:test
[INFO] | | \- org.junit.jupiter:junit-jupiter-engine:jar:5.7.0:test
[INFO] | | \- org.junit.platform:junit-platform-engine:jar:1.7.0:test
[INFO] | +- org.mockito:mockito-core:jar:3.6.28:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.10.18:test
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.10.18:test
[INFO] | | \- org.objenesis:objenesis:jar:3.1:test
[INFO] | +- org.mockito:mockito-junit-jupiter:jar:3.6.28: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-test:jar:5.3.2:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.7.0:test
[INFO] +- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] +- org.glassfish.jaxb:jaxb-runtime:jar:2.3.1:compile
[INFO] | +- org.glassfish.jaxb:txw2:jar:2.3.3:compile
[INFO] | +- com.sun.istack:istack-commons-runtime:jar:3.0.7:compile
[INFO] | +- org.jvnet.staxex:stax-ex:jar:1.8:compile
[INFO] | \- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.15:compile
[INFO] +- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] \- org.jasypt:jasypt:jar:1.9.3:compile
Within this output, you can see spring-boot-starter-test and the dependencies that it contributes:
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.4.1:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.4.1:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.4.1:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | | \- net.minidev:json-smart:jar:2.3:test
[INFO] | | \- net.minidev:accessors-smart:jar:1.2:test
[INFO] | | \- org.ow2.asm:asm:jar:5.0.4:test
[INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:test
[INFO] | | \- jakarta.activation:jakarta.activation-api:jar:1.2.2:test
[INFO] | +- org.assertj:assertj-core:jar:3.18.1:test
[INFO] | +- org.hamcrest:hamcrest:jar:2.2:test
[INFO] | +- org.junit.jupiter:junit-jupiter:jar:5.7.0:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-api:jar:5.7.0:test
[INFO] | | | +- org.apiguardian:apiguardian-api:jar:1.1.0:test
[INFO] | | | +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] | | | \- org.junit.platform:junit-platform-commons:jar:1.7.0:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-params:jar:5.7.0:test
[INFO] | | \- org.junit.jupiter:junit-jupiter-engine:jar:5.7.0:test
[INFO] | | \- org.junit.platform:junit-platform-engine:jar:1.7.0:test
[INFO] | +- org.mockito:mockito-core:jar:3.6.28:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.10.18:test
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.10.18:test
[INFO] | | \- org.objenesis:objenesis:jar:3.1:test
[INFO] | +- org.mockito:mockito-junit-jupiter:jar:3.6.28: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-test:jar:5.3.2:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.7.0:test

Unexpected transitive dependency version

Setting up a clean Maven project with spring boot for testing with JUnit 4 and 5 I end up with these dependencies:
<properties>
<junit-jupiter.version>5.5.2</junit-jupiter.version>
<spring-framework.version>5.2.0.RELEASE</spring-framework.version>
<spring-boot.version>2.2.0.RELEASE</spring-boot.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>${spring-boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring-framework.version}</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-swing</artifactId>
<version>11</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit-jupiter.version}</version>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${junit-jupiter.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit-jupiter.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit-jupiter.version}</version>
</dependency>
</dependencies>
This results in the following dependency tree:
[INFO] ch.sahits.test:junit55:jar:1.0-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.2.0.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.2.0.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot:jar:2.2.0.RELEASE:compile
[INFO] | | | \- org.springframework:spring-context:jar:5.2.0.RELEASE:compile
[INFO] | | | +- org.springframework:spring-aop:jar:5.2.0.RELEASE:compile
[INFO] | | | +- org.springframework:spring-beans:jar:5.2.0.RELEASE:compile
[INFO] | | | \- org.springframework:spring-expression:jar:5.2.0.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.2.0.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:2.2.0.RELEASE:compile
[INFO] | | | +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] | | | | \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] | | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.12.1:compile
[INFO] | | | | \- org.apache.logging.log4j:log4j-api:jar:2.12.1:compile
[INFO] | | | \- org.slf4j:jul-to-slf4j:jar:1.7.28:compile
[INFO] | | +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.25:runtime
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.2.0.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.2.0.RELEASE:compile
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:compile
[INFO] | | +- net.minidev:json-smart:jar:2.3:compile
[INFO] | | | \- net.minidev:accessors-smart:jar:1.2:compile
[INFO] | | | \- org.ow2.asm:asm:jar:5.0.4:compile
[INFO] | | \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.2:compile
[INFO] | | \- jakarta.activation:jakarta.activation-api:jar:1.2.1:compile
[INFO] | +- org.junit.jupiter:junit-jupiter:jar:5.5.2:compile
[INFO] | +- org.mockito:mockito-junit-jupiter:jar:3.1.0:compile
[INFO] | +- org.assertj:assertj-core:jar:3.13.2:compile
[INFO] | +- org.hamcrest:hamcrest:jar:2.1:compile
[INFO] | +- org.mockito:mockito-core:jar:3.1.0:compile
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.9.10:compile
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.9.10:compile
[INFO] | | \- org.objenesis:objenesis:jar:2.6:compile
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:compile
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:compile
[INFO] | +- org.springframework:spring-test:jar:5.2.0.RELEASE:compile
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.6.3:compile
[INFO] +- org.springframework:spring-core:jar:5.2.0.RELEASE:compile
[INFO] | \- org.springframework:spring-jcl:jar:5.2.0.RELEASE:compile
[INFO] +- org.openjfx:javafx-controls:jar:11:compile
[INFO] | +- org.openjfx:javafx-controls:jar:linux:11:compile
[INFO] | \- org.openjfx:javafx-graphics:jar:11:compile
[INFO] | +- org.openjfx:javafx-graphics:jar:linux:11:compile
[INFO] | \- org.openjfx:javafx-base:jar:11:compile
[INFO] | \- org.openjfx:javafx-base:jar:linux:11:compile
[INFO] +- org.openjfx:javafx-swing:jar:11:compile
[INFO] | \- org.openjfx:javafx-swing:jar:linux:11:compile
[INFO] +- junit:junit:jar:4.12:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.junit.jupiter:junit-jupiter-engine:jar:5.5.2:compile
[INFO] | +- org.apiguardian:apiguardian-api:jar:1.1.0:compile
[INFO] | \- org.junit.platform:junit-platform-engine:jar:1.5.2:compile
[INFO] +- org.junit.platform:junit-platform-launcher:jar:1.2.0:compile
[INFO] +- org.junit.vintage:junit-vintage-engine:jar:5.5.2:compile
[INFO] +- org.junit.jupiter:junit-jupiter-params:jar:5.5.2:compile
[INFO] \- org.junit.jupiter:junit-jupiter-api:jar:5.5.2:compile
[INFO] +- org.opentest4j:opentest4j:jar:1.2.0:compile
[INFO] \- org.junit.platform:junit-platform-commons:jar:1.5.2:compile
On a different module/project I do have these dependencies:
<dependencies>
<!-- Module dependencies -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>OpenPatricianUtilities</artifactId>
</dependency>
<dependency>
<groupId>ch.sahits.game</groupId>
<artifactId>GameEvent</artifactId>
</dependency>
<dependency>
<groupId>ch.sahits.game</groupId>
<artifactId>MarvinFXEssentials</artifactId>
<scope>test</scope>
</dependency>
<!-- Spring Framework -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-oxm</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<!-- Other libraries -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ch.sahits</groupId>
<artifactId>sahitsUtil</artifactId>
</dependency>
<!-- Test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.sahits.game</groupId>
<artifactId>OpenPatricianData</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.sahits.game</groupId>
<artifactId>OpenPatricianTestUtilities</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Resulting in this dependency tree:
[INFO] ch.sahits.game:OpenPatricianModel:jar:1.1.0-SNAPSHOT
[INFO] +- ch.sahits.game:OpenPatricianUtilities:jar:1.1.0-SNAPSHOT:compile
[INFO] | +- org.springframework:spring-context:jar:5.2.0.RELEASE:compile
[INFO] | | +- org.springframework:spring-aop:jar:5.2.0.RELEASE:compile
[INFO] | | \- org.springframework:spring-expression:jar:5.2.0.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:5.2.0.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-logging:jar:2.2.0.RELEASE:compile
[INFO] | | +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] | | | \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.12.1:compile
[INFO] | | | \- org.apache.logging.log4j:log4j-api:jar:2.12.1:compile
[INFO] | | \- org.slf4j:jul-to-slf4j:jar:1.7.28:compile
[INFO] | +- org.openjfx:javafx-controls:jar:11:compile
[INFO] | | +- org.openjfx:javafx-controls:jar:linux:11:compile
[INFO] | | \- org.openjfx:javafx-graphics:jar:11:compile
[INFO] | | +- org.openjfx:javafx-graphics:jar:linux:11:compile
[INFO] | | \- org.openjfx:javafx-base:jar:11:compile
[INFO] | | \- org.openjfx:javafx-base:jar:linux:11:compile
[INFO] | +- commons-io:commons-io:jar:2.6:compile
[INFO] | +- com.thoughtworks.xstream:xstream:jar:1.4.11:compile
[INFO] | | +- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] | | \- xpp3:xpp3_min:jar:1.1.4c:compile
[INFO] | +- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] | \- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] +- ch.sahits.game:GameEvent:jar:1.1.0-SNAPSHOT:compile
[INFO] +- ch.sahits.game:MarvinFXEssentials:jar:1.1.0-SNAPSHOT:test
[INFO] | +- junit:junit:jar:4.12:test
[INFO] | | \- org.hamcrest:hamcrest-core:jar:2.1:test
[INFO] | \- org.openjfx:javafx-fxml:jar:11:test
[INFO] | \- org.openjfx:javafx-fxml:jar:linux:11:test
[INFO] +- org.springframework.boot:spring-boot:jar:2.2.0.RELEASE:compile
[INFO] | \- org.springframework:spring-core:jar:5.2.0.RELEASE:compile
[INFO] | \- org.springframework:spring-jcl:jar:5.2.0.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-autoconfigure:jar:2.2.0.RELEASE:compile
[INFO] +- org.springframework:spring-oxm:jar:5.2.0.RELEASE:compile
[INFO] +- org.glassfish.jaxb:jaxb-runtime:jar:2.3.1:compile
[INFO] | +- org.glassfish.jaxb:txw2:jar:2.3.2:compile
[INFO] | +- com.sun.istack:istack-commons-runtime:jar:3.0.7:compile
[INFO] | +- org.jvnet.staxex:stax-ex:jar:1.8:compile
[INFO] | +- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.15:compile
[INFO] | \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] +- com.google.guava:guava:jar:24.1-jre:compile
[INFO] | +- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] | +- org.checkerframework:checker-compat-qual:jar:2.0.0:compile
[INFO] | +- com.google.errorprone:error_prone_annotations:jar:2.1.3:compile
[INFO] | +- com.google.j2objc:j2objc-annotations:jar:1.1:compile
[INFO] | \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:compile
[INFO] +- org.projectlombok:lombok:jar:1.18.10:provided
[INFO] +- ch.sahits:sahitsUtil:jar:1.3.3:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.9:compile
[INFO] | +- org.mockito:mockito-junit-jupiter:jar:3.1.0:compile
[INFO] | \- commons-cli:commons-cli:jar:1.4:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.2.0.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.2.0.RELEASE:test
[INFO] | | +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:test
[INFO] | | \- org.yaml:snakeyaml:jar:1.25:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.2.0.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.2.0.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | | +- net.minidev:json-smart:jar:2.3:test
[INFO] | | | \- net.minidev:accessors-smart:jar:1.2:test
[INFO] | | | \- org.ow2.asm:asm:jar:5.0.4:test
[INFO] | | \- org.slf4j:slf4j-api:jar:1.7.28:compile
[INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.2:test
[INFO] | | \- jakarta.activation:jakarta.activation-api:jar:1.2.1:test
[INFO] | +- org.junit.jupiter:junit-jupiter:jar:5.5.2:test
[INFO] | +- org.junit.vintage:junit-vintage-engine:jar:5.5.2:test
[INFO] | | +- org.apiguardian:apiguardian-api:jar:1.1.0:test
[INFO] | | \- org.junit.platform:junit-platform-engine:jar:1.5.2:test
[INFO] | +- org.assertj:assertj-core:jar:3.13.2:test
[INFO] | +- org.hamcrest:hamcrest:jar:2.1:test
[INFO] | +- org.mockito:mockito-core:jar:3.1.0:compile
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.10.1:compile
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.10.1:compile
[INFO] | | \- org.objenesis:objenesis:jar:2.6:compile
[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-test:jar:5.2.0.RELEASE:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.6.3:test
[INFO] +- ch.sahits.game:OpenPatricianData:jar:1.1.0-SNAPSHOT:test
[INFO] \- ch.sahits.game:OpenPatricianTestUtilities:jar:1.1.0-SNAPSHOT:test
[INFO] +- org.openjfx:javafx-swing:jar:11:test
[INFO] | \- org.openjfx:javafx-swing:jar:linux:11:test
[INFO] +- org.junit.jupiter:junit-jupiter-engine:jar:5.5.2:test
[INFO] +- org.junit.platform:junit-platform-launcher:jar:1.5.2:test
[INFO] +- org.junit.jupiter:junit-jupiter-params:jar:5.5.2:test
[INFO] \- org.junit.jupiter:junit-jupiter-api:jar:5.5.2:test
[INFO] +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] \- org.junit.platform:junit-platform-commons:jar:1.5.2:test
Both define Mockito in version 3.1.0 through the spring-boot-starter-test. However the the porject junit55 has a byte-buddy dependency of version 1.9.10 while OpenPatricianModel has it in version 1.10.1. This dependency is not explicity defined in the project.
How is it possible that I have different dependency of byte-buddy on OpenPatricianModel and how can I find out, where it comes from.
The byte-buddy dependencies are being pulled in transitively by at least one more dependency than org.springframework.boot:spring-boot-starter-test. You can see that by the scope of byte-buddy in the dependency tree of your OpenPatricianModel. Note that the scope is compile and not test.
The best way to find out which dependency is pulling it in is to add exclusions of the byte-buddy dependencies in your declaration of the spring-boot-starter-test. Something like:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
</exclusion>
<exclusion>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
</exclusion>
</exclusions>
</dependency>
Then, by running mvn dependency:tree again you should be able to see which other dependency is pulling in byte-buddy. Note that there could be more than one, in which case you will have to do the same exercise again.

Why maven puts provided dependency?

I created a simple project
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>jersey-mvc-jsp</artifactId>
<version>2.23.1</version>
</dependency>
</dependencies>
Next, I ran
mvn dependency:tree
Results:
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # asd ---
[INFO] sdddas:asd:war:1.0-SNAPSHOT
[INFO] \- org.glassfish.jersey.ext:jersey-mvc-jsp:jar:2.23.1:compile
[INFO] +- org.glassfish.hk2.external:javax.inject:jar:2.4.0-b34:compile
[INFO] +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.23.1:compile
[INFO] | +- org.glassfish.jersey.core:jersey-common:jar:2.23.1:compile
[INFO] | | +- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] | | +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.23.1:compile
[INFO] | | +- org.glassfish.hk2:hk2-api:jar:2.4.0-b34:compile
[INFO] | | | +- org.glassfish.hk2:hk2-utils:jar:2.4.0-b34:compile
[INFO] | | | \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b34:compile
[INFO] | | +- org.glassfish.hk2:hk2-locator:jar:2.4.0-b34:compile
[INFO] | | | \- org.javassist:javassist:jar:3.18.1-GA:compile
[INFO] | | \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] | \- org.glassfish.jersey.core:jersey-server:jar:2.23.1:compile
[INFO] | +- org.glassfish.jersey.core:jersey-client:jar:2.23.1:compile
[INFO] | +- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.23.1:compile
[INFO] | \- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] +- org.glassfish.jersey.ext:jersey-mvc:jar:2.23.1:compile
[INFO] | \- javax.servlet:servlet-api:jar:2.4:compile
[INFO] \- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
[INFO] ------------------------------------------------------------------------
Then
mvn package
As result I see war file with servlet-api-2.4.jar in WEB-INF/lib
Why? If I look at jersey-mvc-jsp.pom, I see
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet2.version}</version>
<scope>provided</scope>
</dependency>
I define the same dependency in my pom file, set scope to provided, and now my war file does not contain servlet-api-2.4.jar. But I still don't understand why maven put it there

Maven package error: An attached artifact must have a different ID than its corresponding main artifact

Geting this error on: mvn package
It fails to build every time with the same error, I've tried renaming the artifact, as well as changing dependencies for build in the pom file. Please see more details below:
Any help would be very much appreciated.
error:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.599 s
[INFO] Finished at: 2014-09-29T14:49:45+01:00
[INFO] Final Memory: 33M/379M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.1.7.RELEASE:repackage (default) on project compiled: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.1.7.RELEASE:repackage failed: For artifact {com.phil-hudson:compiled:1.0-SNAPSHOT:war}: An attached artifact must have a different ID than its corresponding main artifact. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
Process finished with exit code 1
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.phil-hudson</groupId>
<artifactId>compiled</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<!-- Generic properties -->
<java.version>1.8</java.version>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.1.5.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.3.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<dependency>
<groupId>com.wordnik</groupId>
<artifactId>swagger-jaxrs_2.10</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.13</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.2.8-b01</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2-promoted-b65</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-servlet-api</artifactId>
<version>8.0.12</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.1.7.RELEASE</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<warName>disney-product-feed</warName>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-releases</id>
<url>http://repo.spring.io/libs-release</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-releases</id>
<url>http://repo.spring.io/libs-release</url>
</pluginRepository>
</pluginRepositories>
</project>
mvn dependency:tree
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.1.5.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:1.1.5.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot:jar:1.1.5.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:1.1.5.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:1.1.5.RELEASE:compile
[INFO] | | | +- org.slf4j:jcl-over-slf4j:jar:1.7.7:compile
[INFO] | | | +- org.slf4j:jul-to-slf4j:jar:1.7.7:compile
[INFO] | | | +- org.slf4j:log4j-over-slf4j:jar:1.7.7:compile
[INFO] | | | \- ch.qos.logback:logback-classic:jar:1.1.2:compile
[INFO] | | | \- ch.qos.logback:logback-core:jar:1.1.2:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.13:runtime
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.1.5.RELEASE:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:7.0.54:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:7.0.54:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-logging-juli:jar:7.0.54:compile
[INFO] | +- org.hibernate:hibernate-validator:jar:5.0.3.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.1.1.GA:compile
[INFO] | | \- com.fasterxml:classmate:jar:1.0.0:compile
[INFO] | +- org.springframework:spring-core:jar:4.0.6.RELEASE:compile
[INFO] | \- org.springframework:spring-webmvc:jar:4.0.6.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:4.0.6.RELEASE:compile
[INFO] +- org.springframework:spring-web:jar:4.0.6.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:4.0.6.RELEASE:compile
[INFO] | | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] | +- org.springframework:spring-beans:jar:4.0.6.RELEASE:compile
[INFO] | \- org.springframework:spring-context:jar:4.0.6.RELEASE:compile
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.3.3:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.3.3:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.3.3:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.3.2:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:1.1.5.RELEASE:compile
[INFO] | +- junit:junit:jar:4.11:compile
[INFO] | +- org.mockito:mockito-core:jar:1.9.5:compile
[INFO] | | \- org.objenesis:objenesis:jar:1.0:compile
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:compile
[INFO] | \- org.springframework:spring-test:jar:4.0.6.RELEASE:compile
[INFO] +- javax.inject:javax.inject:jar:1:compile
[INFO] +- com.wordnik:swagger-jaxrs_2.10:jar:1.3.2:compile
[INFO] | +- org.scala-lang:scala-library:jar:2.10.0:compile
[INFO] | +- com.wordnik:swagger-core_2.10:jar:1.3.2:compile
[INFO] | | +- commons-lang:commons-lang:jar:2.4:compile
[INFO] | | +- org.slf4j:slf4j-api:jar:1.7.7:compile
[INFO] | | +- com.fasterxml.jackson.module:jackson-module-scala_2.10:jar:2.1.5:compile
[INFO] | | | +- com.thoughtworks.paranamer:paranamer:jar:2.3:compile
[INFO] | | | \- org.scala-lang:scala-reflect:jar:2.10.0:compile
[INFO] | | +- com.fasterxml.jackson.module:jackson-module-jsonSchema:jar:2.1.0:compile
[INFO] | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.0.0:compile
[INFO] | | | \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.0.0:compile
[INFO] | | +- com.wordnik:swagger-annotations:jar:1.3.2:compile
[INFO] | | +- org.json4s:json4s-ext_2.10:jar:3.2.4:compile
[INFO] | | | +- joda-time:joda-time:jar:2.3:compile
[INFO] | | | \- org.joda:joda-convert:jar:1.2:compile
[INFO] | | +- org.json4s:json4s-native_2.10:jar:3.2.4:compile
[INFO] | | | \- org.json4s:json4s-core_2.10:jar:3.2.4:compile
[INFO] | | | +- org.json4s:json4s-ast_2.10:jar:3.2.4:compile
[INFO] | | | \- org.scala-lang:scalap:jar:2.10.0:compile
[INFO] | | | \- org.scala-lang:scala-compiler:jar:2.10.0:compile
[INFO] | | \- org.json4s:json4s-jackson_2.10:jar:3.2.4:compile
[INFO] | +- javax.ws.rs:jsr311-api:jar:1.1.1:compile
[INFO] | \- org.reflections:reflections:jar:0.9.8:compile
[INFO] | +- com.google.guava:guava:jar:11.0.2:compile
[INFO] | | \- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] | +- javassist:javassist:jar:3.12.1.GA:compile
[INFO] | \- dom4j:dom4j:jar:1.6.1:compile
[INFO] | \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] | \- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] +- com.sun.xml.bind:jaxb-core:jar:2.2.8-b01:compile
[INFO] | +- javax.xml.bind:jaxb-api:jar:2.2.9:compile
[INFO] | \- com.sun.istack:istack-commons-runtime:jar:2.16:compile
[INFO] +- com.sun.xml.bind:jaxb-impl:jar:2.2-promoted-b65:compile
[INFO] +- org.apache.tomcat:tomcat-servlet-api:jar:8.0.12:compile
[INFO] \- javax.servlet.jsp:jsp-api:jar:2.1:provided
As Dimitri suggested, I solved this by adding classifier to spring-boot-maven-plugin:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<classifier>boot</classifier>
</configuration>
</plugin>
Looks like a bug in spring-boot-maven-plugin together with your version of Maven.
As far as I can tell, Maven knows that the WAR plugin will generate the file target/compiled-1.0-SNAPSHOT.war. when it asks the spring-boot-maven-plugin for its output, it will get the same name. Since Maven doesn't know what the plugin does, it will assume that both are configured to create the same output file and stop since that can't be what you want (the files will overwrite each other).
Try with the latest version of Maven or file a bug against the spring-boot-maven-plugin. Let them know which version of Maven you're using.
I am currently facing the same issue.
However, providing the required parameter finalName, I can see that the .war file is well boot-ified.
Please note that I still encounter the error message in both cases (with and without the finalName).
Here is the link to the issue I opened on the Spring Boot project: https://github.com/spring-projects/spring-boot/issues/2060
All that is required is to include a <finalName> tag in the build section.
<build>
<finalName>myJar</finalName>
</build>

Categories