On my windows machine: I have setup jenkins CI to automatically create build.
But every time build is failing because of the third party ojdbc7.jar
file.
[ERROR] Failed to execute goal on project abc-cc-onboarding-repository: Could not resolve dependencies for project com.abc.cc:abc-cc-onboarding-repository:jar:1.0-SNAPSHOT: Could not find artifact com.oracle:ojdbc7:jar:12.1.0.1.0 in central (https://repo.maven.apache.org/maven2) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR]
When I manually build using: mvn -U clean build
, everything works fine.
because I have manually installed ojdbc7.jar
in the local repository (.m2)
Something is wrong with the Jenkins integration with maven.
Can anybody suggest on this?
SOLUTION THAT WORKED FOR ME:
What i found after the analysis and it resolved my problem, hope it will help somebody like me.
Actually jenkins creates a separate repository for separate projects. like if i have 10 project in my jenkins workspace then it creates 10 repository one for each project (inside the project on top level we can see that).
so now i installed manually ojdbc7.jar inside my jenkins project repo and it solved my problem.