Finding missing Maven artifacts

后端 未结 9 2166
你的背包
你的背包 2021-01-02 05:01

I\'m new to Maven, and struggling with adding dependencies. I\'m trying to convert an existing project to Maven, and after adding the dependencies for all the jars in my ref

相关标签:
9条回答
  • 2021-01-02 05:33

    Use maven search or mvnrepository.com. If you can not find use google looking for jar in other public repositories, for example for stax:

    maven stax-ri pom

    My first result is:

    http://maven.nuxeo.org/nexus/content/groups/public/stax/stax-ri/1.0/

    Other public repositories:

    http://download.java.net/maven/2

    http://download.java.net/maven/1

    http://repository.codehaus.org

    http://repository.jboss.org/nexus/content/groups/public-jboss

    http://maven.springframework.org/release

    0 讨论(0)
  • 2021-01-02 05:34

    After several days this stupid error bugged me, I found the following article

    The author describes that there is a workspace repository, which may out of date. In my case it helped just to import the correct plugins again. The workspace repository has been updated and everything is fine.

    0 讨论(0)
  • 2021-01-02 05:36

    you can try to add new repositories to your pom.xml

    <repositories>
         <repository>
        <id>java.net</id>
        <url>http://download.java.net/maven/2/</url>
        </repository>
          <repository>
            <id>jboss</id>
            <url>http://repository.jboss.com/maven2</url>
     </repository>
    </repositories>
    
    0 讨论(0)
  • 2021-01-02 05:38

    I solved this problem by changing the log4j version from 1.2.15 to 1.2.16.

    0 讨论(0)
  • 2021-01-02 05:40

    It also could be cause by the dom4j. The same error occurred when I use the following settings.

    <dependency>
        <groupId>dom4j</groupId>
        <artifactId>dom4j</artifactId>
        <version>20040902.021138</version>
    </dependency>
    

    After changing to the following, the error disappeared.

    <dependency>
        <groupId>dom4j</groupId>
        <artifactId>dom4j</artifactId>
        <version>1.6.1</version>
    </dependency>
    
    0 讨论(0)
  • 2021-01-02 05:42

    Your problem might be something to do with MNG-4142. This bug means that maven will not download a new snapshot if localCopy is set to true in the artifact maven-metadata-local.xml.

    Note that the title of this bug is slightly misleading so it is work reading the comments.

    You might think that using the -U flag with maven would fix this problem but apparently this is not the case.

    The current workaround seems to be searching for all instances of maven-metadata-local.xml and changing the value of localCopy to false.

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