why intellij can't import my library deployed on a third party mvn repo system

Answered

I create a new springboot project , then i follow the instruction from https://repsy.io/ to upload and use as a mvn dependency in other projects.

all works fine. I create new project , then I import my library as a maven dependency, the dependency is succesful downloaded, I can see the library inside maven dependency folder. Intellij also detect the library and suggest me to import the classes when i delcare it, but when i click to import class nothing happens. Also when i try to write import manually intellij gives me error. I'm going crazy! HELP !

0
6 comments

Please try File | Invalidate Caches | Invalidate and Restart.

0

thanks, i tried, nothing change, the ide can see my library but can't import the classes . I also tried to change repository system, i tried with github package registry, same issue !

0

Please share a sample project to reproduce: https://uploads.jetbrains.com.

0

2022_01_21_FH77bWK4NTJnu9So   -> the demo

https://repo.repsy.io/mvn/pali/public/  -> this is the public repo that contains the library.

https://github.com/MPalix86/selenium-framework -> this is the library source code.

in the demo i have same issue as above.

thanks

0

Your library project generates spring boot specific jar with all the dependencies stored inside BOOT-INF directory. Such jars cannot be used as the dependencies in another projects.

You need a normal jar where all the .class files are in the root.

See https://stackoverflow.com/a/53680721/104891 and https://stackoverflow.com/a/40795519/104891.

0

thank you very much and sorry for the trouble.

0

Please sign in to leave a comment.