简体   繁体   中英

Maven finds artifact in local repo but fails to compile

I recently asked this question about a maven project that I inherited from another developer: Maven finds artifact but cannot compile

As per the instructions in the accepted answer I cloned the library from Github and built it with a mvn install. I was able to get past the error that I was stuck on when I asked that question, but once again I am stuck with a strange issue. I thought it was the same so I made sure the library was installed in the local repo and everything was working, Yet when I try to compile my application I get an error that a specific class cannot be found.

error: cannot find symbol class ColorPicker

The library, HoloColorPicker, is in my .m2 repo and maven says nothing about missing dependencies. It just will not find that specific class. I am not sure where to even begin fixing this issue. A pointer towards the right direction would be great. Thanks.

Update:

When I run mvn dependency:tree I see this warning about the ColorPicker pom.xml :

Invalid POM for com.larswerkman:colorpicker:apklib:7, transitive dependencies (if any) will not be available

My bet is that the systemPath dependency in the colorpicker POM is causing you trouble. You should in general not depend on projects that have systemPath dependencies. But if you do, could you make sure it's there?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM