Eclipse m2eclipse getting dependencies from local repository

前端 未结 5 1950
眼角桃花
眼角桃花 2021-02-07 13:49

I have dependencies installed local on my machine (~/.m2/repository/blah/blah/blah) and m2eclipse is not recognizing them as there - I think m2eclipse is using its own maven ins

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-07 14:10

    I was getting the exact same issue. I added the JARs to the local repository via the install-file command. I verified they were installed. I rebuilt the index. I went to the directory and inspected the JAR file using 7Zip, but I could not get it to appear in the Maven Dependencies inside of my eclipse project.

    For me the solution was pretty silly. When I added the dependency into the pom.xml using the dependencies editor, Maven threw in a packaging stanza into the XML. So the XML entry looked like:

        
            slf4j
            jdk14
            1.5.8
            JAR
        
    

    When I removed the last stanza "JAR" and made the entry:

        
            slf4j
            jdk14
            1.5.8
        
    

    it all worked fine.

提交回复
热议问题