I really were suffered by this problem almost over 2 months. 

Even I enter "cannot find local jar file in local repository" at google, there is no solution I can use.


My case was Eclipse's project setting problem.

So If you do all the thing I will mention below, then just check this settings.


<What I want to do>

- import classes which are in the other project(not sub project relationship, just totally in different project)

- not bring dependencies from online maven repository. Need to get dependencies from local repository.


<What I was suffered>

- Eclipse m2e couldn't detect my locally built jar file. (not searched by artifect id)

- Even I add dependency by manually writing group, artifect id, it was not imported.


<The things that I did before I found this>

- register my local repository under my maven project file and copy-paste jar file in that

- check .m2 folder which is under my user folder

- (This is meaningless and wrong) try to add jar as external java library.


<The things that I think seem to work>

- Eclipse's menu, window > preference > Maven > check "download artifact sources", "download artifact javadoc", "download repository index updates on startup", "do not automatically update dependencies from remote repository"

- project > properties > maven > uncheck "resolve dependencies from workspace projects"


When I just unchecked that bolded option, suddenly, my local jar file was not only successfully imported but also successfully built. 


Is there anyone who is also suffered by maven dependency problem of locally built jar file, I really hope you can get solution by my report. 


+ Recent posts