The following artifacts could not be resolved: javax.jms:jms:jar:1.1

后端 未结 10 1675
别跟我提以往
别跟我提以往 2020-12-04 09:27

I am trying to compile a maven project, but I systematically get the following error message:

[ERROR]Failed to execute goal on project ...:
Could not resolve         


        
10条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-04 10:01

    Log4 version 1.2.17 automatically resolves the issue as it has depency on geronimo-jms. I got the same issue with log4j- 1.2.15 version.


    Added with more around the issue


    using 1.2.17 resolved the issue during the compile time but the server(Karaf) was using 1.2.15 version thus creating conflict at run time. Thus I had to switch back to 1.2.15.

    The JMS and JMX api were available for me at the runtime thus i did not import the J2ee api.

    what i did was I used the compile time dependency on 1.2.17 but removed it at the runtime.

                
                log4j
                log4j
                1.2.17
            
    ....
        
            
                
                    org.apache.felix
                    maven-bundle-plugin
                    true
                    
                        
                            ${project.groupId}.${project.artifactId}
                                                              !org.apache.log4j.*,*
    
    .....
    

提交回复
热议问题