I am writing a spring boot application and it needs to fetch records from a ibm notes database. For that I have to use a jar library which is not available as a maven dependency. So I placed the jar in project home as lib/com/ibm/notes/1.0.0/notes-1.0.0.jar and have added it as a local repository in the pom file as below.
<repositories> <repository> <id>ProjectRepo</id> <url>file://${project.basedir}/lib</url> </repository> </repositories> <dependency> <groupId>com.ibm</groupId> <artifactId>notes</artifactId> <version>1.0.0</version> </dependency> My application runs without any problem when executed inside eclipse IDE. But when I maven clean/install the same project by right clicking on pom file from eclipse, the build is success with below warning.
[INFO] --------------------------------[ jar ]--------------------------------- [WARNING] The POM for com.ibm:notes:jar:1.0.0 is missing, no dependency information available
But application execution fails at command line. Below is the error I get.
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2019-08-17 16:37:41.450 ERROR 17868 --- [ main] o.s.boot.SpringApplication
: Application run failedorg.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'craNotesService': Unsatisfied dependency expressed through field 'repository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'craNotesRepository': Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [q2c.project7.craservice.repository.CraNotesRepository] from ClassLoader [org.springframework.boot.loader.LaunchedURLClassLoader@5c7fa833] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596) ~[spring-beans-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
Could you please advise how to fix the issue?
CraNotesRepository is the class which utilize the external jar specified above.