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

后端 未结 10 1671
别跟我提以往
别跟我提以往 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:23

    May not be the exactly same problem. but there is a nice article on the same line Here

    0 讨论(0)
  • 2020-12-04 10:25

    If anyone still wants to use jms1.1 then add the public jboss repository and maven will find it...

    project->dependencies:

      <dependencies>
        <dependency>
          <groupId>javax.jms</groupId>
          <artifactId>jms</artifactId>
          <version>1.1</version>
        </dependency>
    

    project->repositories:

      <repositories>
        <repository>
          <id>repository.jboss.org-public</id>
          <name>JBoss.org Maven repository</name>
          <url>https://repository.jboss.org/nexus/content/groups/public</url>
        </repository>  
    

    It works -

    F:\mvn-repo-stuff>mvn verify
    [INFO] Scanning for projects...
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building mvn-repo-stuff 1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    Downloading: http://repo1.maven.org/maven2/javax/jms/jms/1.1/jms-1.1.pom
    Downloaded: http://repo1.maven.org/maven2/javax/jms/jms/1.1/jms-1.1.pom (677 B at 0.8 KB/sec)
    [WARNING] The artifact xml-apis:xml-apis:jar:2.0.2 has been relocated to xml-apis:xml-apis:jar:1.0.b2
    Downloading: http://repo1.maven.org/maven2/javax/jms/jms/1.1/jms-1.1.jar
    Downloading: https://repository.jboss.org/nexus/content/groups/public/javax/jms/jms/1.1/jms-1.1.jar
    Downloaded: https://repository.jboss.org/nexus/content/groups/public/javax/jms/jms/1.1/jms-1.1.jar (26 KB at 8.5 KB/sec)
    
    0 讨论(0)
  • 2020-12-04 10:25

    In fact the real solution for this issue is to use the jms-api-1.1-rev-1.jar artifact available on Maven Central : http://search.maven.org/#artifactdetails%7Cjavax.jms%7Cjms-api%7C1.1-rev-1%7Cjar

    0 讨论(0)
  • 2020-12-04 10:25

    A check of ibliblio and java.net repositories reveal that jmx related jar is not present in either. I think you should manually download jms and install them locally as discussed here.

    0 讨论(0)
提交回复
热议问题