Today encountered a problem when packaging their spring boot project report can not find classes and symbols.
Because I have some reliance is placed on the project lib folder, then the time to even put packaged packaged with it.
Modify pom.xml, add about content:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArguments>
<extdirs>lib</extdirs>
</compilerArguments>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>lib</directory>
<targetPath>BOOT-INF/lib/</targetPath>
<includes>
<include>**/*.jar</include>
</includes>
</resource>
</resources>
</build>
Cmd then switch to execute the project root packaging commands: mvn clean package -Dmaven.test.skip = true
jar package after package structure can be seen throughout the lib folder is packed into it.