I assume what you want is to add your additional resources/configuration files to the classpath in the generated executable jar of Spring Boot. The only off the shelf solution I have found was to use the maven-jar-plugin
in addition to the spring-boot-maven-plugin
to add the classpath to the manifest, for example:
<!-- setup jar manifest to executable with dependencies -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.0.3.RELEASE</version>
<configuration>
<fork>true</fork>
<mainClass>Application</mainClass>
<classifier>executable</classifier>
<layout>JAR</layout>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- add configuration to manifest -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<archive>
<manifestEntries>
<Class-Path>conf/</Class-Path>
</manifestEntries>
</archive>
</configuration>
</plugin>
Note that the class-path will be relative to the generated executable JAR file.