I was addicted to Maven's local cache under Eclipce environment, so I would like to keep it as a memorandum.
At the timing when the source was updated by a certain project, git pull
The project cannot be built until the build path error is resolved. ----------------------. jar not found.
An error like this caused the Junit test in the project to stop working.
The timing just happened to be right after git pull
, and I don't know exactly what the trigger was.
Check Maven dependencies for now. The jar file displayed in the error exists. But when I try to view the jar file from Package Explorer, it doesn't open.
invalid LOC header(bad signature)
The above display is displayed on the screen. ~~ ** I don't know. ** ~~
When I tried to get the jar by specifying another version in pom.xml
, the compilation went well.
The Junit test started working, but it didn't solve anything, so I continued the trial.
When I think about it later, the behavior around here may have been a hint for the solution.
Regain your mind, and if you don't understand the error, try it for the time being ...
--Project Refresh --Clean → Build by removing the error from the View Issues tab
I tried it all, but it didn't work.
When asking Google teacher, The local cache of the Maven repository may be wrong.
It seems that there is a Maven cache under ** .m2 **.
Delete all the folders under ~ / .m2 / repository
and
** Right-click Maven project → Maven → Update Maven Project ... ** and re-reflect pom.xml
.
Oh, it's compiled. I was able to execute the Junit test safely, and one case was settled.
For the time being, this is because I always take measures to resolve the error. Let's deal with it after grasping the cause firmly while leaving the lack of knowledge. Obviously, it was a good commandment.
However, when you say "I don't know, but an error is occurring" like this time, You must have a ** weapon that you can try out ** ...
Recommended Posts