So I have been assigned a task to convert our applications from Ant to Maven as a part of Devops migrations. I have handled the dependencies except for few which are not present on the nexus repository. I have kept those dependencies in a location under the project's web folder (which gets converted into .war file) under the path (Sorry I cant share the official name and code of the project due to legal issues so sharing a similar project structure and code)
applicationName -> WebContent -> WEB-INF -> lib
Here is the project's folder structure :
ApplicationName(.jar)
ApplicationName-ear(.ear)
ApplicationName-build
ApplicationName-web(.war)
Sample Structure :
Now under the pom.xml of ApplicationName-web project I have entered the following snippet to read the jars from the lib folder :
<plugin>
<groupId>com.googlecode.addjars-maven-plugin</groupId>
<artifactId>addjars-maven-plugin</artifactId>
<version>1.0.5</version>
<executions>
<execution>
<goals>
<goal>add-jars</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>${basedir}/WebContent/WEB-INF/lib</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
but it is still not reading the jars from that location and giving an error like "package {name of the package} does not exist" when i user maven-install under run-as. I am also referring this jar in the ApplicationName(.jar) project as well and I was hoping that it would automatically read the jar once it is added via the above plugin.
I hope my question made sense, I tried to explain it the best I can and again sorry for not providing the actual code snippet and pom.
TL;DR : How to add .jar files present in lib folder of your project as dependencies via maven.