maven doesn't find class

前端 未结 6 2014
遇见更好的自我
遇见更好的自我 2021-01-13 09:39

I\'ve inherited a huge maven java project and can\'t get it to compile.

mvn compile

Its telling me it can\'t find a class even though its r

6条回答
  •  醉酒成梦
    2021-01-13 10:35

    The jar file is located in the wrong folder compared to the coordinates you are using for the dependency. Maven would not look in your location. The correct path would be .m2/repository/com/sun/mirror/apt/apt-mirror-api/0.1/apt-mirror-api-0.1.jar.

    The local repository you have created is invalid. I would suggest to instead use a repository manager like Nexus and upload the jars there and then get Maven to download from there. This way you get pom files created and the structure will be automatically correct compared to the GAV coordinates you use.

提交回复
热议问题