Before for web development with .war output, there was option for modularization war overlays http://maven.apache.org/plugins/maven-war-plugin/overlays.html
Now with Spring Boot adopting jar packaging, how can make some shared web resources?
That is there is dependency on com.company.shared.web
module, with ,say, image
/com.company.shared.web/src/main/resources/static/images/background-image.png
How this image can be made to be available for running Spring boot app within main module? Maven standard dependency resolution will make only Java classes available.
P.S. Similar question, but for .war packaging was Spring Boot & Maven war overlay and not resolved https://github.com/spring-projects/spring-boot/issues/1030
You can use this plugin to unpack jar dependencies and copy the files to another directory.
In this sample project you've got a Parent POM followed by two Maven Modules of Jar packaging.
Instructions:
mvn clean package
java -jar web-app/target/web-app-0.0.1-SNAPSHOT.jar
Browse to localhost:8080 and notice that style.css & script.js are loaded which come from the Web-Library module.