I have a Spring Boot application that I am trying to compile into a proper WAR file. Using the mvnw script, I am experiencing compilation failures.
The problem is that the company I am working for has a set of proprietary classes and JARs that it wants to use in the Spring Boot application. The company is using Eclipse. These proprietary resources are in separate source folders (in the case of the java files) and folders (in the case of the jars). In the IDE we can set the jars to be included in the compilation, and when we compile and run the application as a runnable jar, everything compiles.
Unfortunately, if we want to create a deployment, it doesn't matter whether we are creating a war or a jar, mvnw does not find the company's java or jar files and the compilation fails.
There is no problem creating the WAR file. We make the appropriate changes to the pom file and the main class, and as long as we don't use the company proprietary stuff, mvnw compiles and runs the jar (or it properly creates the WAR which runs well on Tomcat). It is only when we want to use the proprietary code that the mvnw compilation fails.
I amcertain that there has got to be some way to make mvnw include external jars and code in external packages, because surely other companies have proprietary code in jars that they need to include in a Spring Boot application. I just don't know how to do it.
So how does one include such code in a Spring Boot application, such that mvnw will compile it?
Aucun commentaire:
Enregistrer un commentaire