I have added some Maven dependencies with SystemPath tag:
<dependency>
<groupId>OFRestCallBroker</groupId>
<artifactId>OFRestCallBroker</artifactId>
<scope>system</scope>
<version>1.0</version>
<systemPath>${basedir}\src\lib\OFRestCallBroker.jar</systemPath>
</dependency>
Ok, so following one of the stackoverflow thread Add external library .jar to Spring boot .jar internal /lib
I updated to this
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
</plugins>
But when I generate the .war file, these dependencies are not included in the WEB-INF folder and a separate lib-provided folder is generated but still I get this error java.lang.NoClassDefFoundError.
And due to this, when I deploy these files on the Tomcat server. I get java.lang.NoClassDefFoundError error.
My Spring Boot version <version>2.2.11.RELEASE</version>
Please help out with the correct approach and preferred some example