如何将Spring boot项目lib/resouce分开打包

<build>
        <plugins>
            
            <plugin>
                <groupId>org.apache.maven.pluginsgroupId>
                <artifactId>maven-jar-pluginartifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>trueaddClasspath>
                            
                            <classpathPrefix>lib/classpathPrefix>
                            
                            <useUniqueVersions>falseuseUniqueVersions>
                            
                            <mainClass>com.hlytec.cloud.NetServiceApplicationmainClass>
                        manifest>
                        <manifestEntries>
                            
                            <Class-Path>resources/Class-Path>
                        manifestEntries>
                    archive>
                    
                    <excludes>
                        <exclude>*.ymlexclude>
                        <exclude>*.propertiesexclude>
                        <exclude>com/hlytec/cloud/mapper/*/*.xmlexclude>
                    excludes>
                    
                    <outputDirectory>${project.build.directory}/outputoutputDirectory>
                configuration>
            plugin>
            
            <plugin>
                <groupId>org.apache.maven.pluginsgroupId>
                <artifactId>maven-dependency-pluginartifactId>
                <executions>
                    <execution>
                        <id>copy-dependenciesid>
                        <phase>packagephase>
                        <goals>
                            <goal>copy-dependenciesgoal>
                        goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/output/lib/outputDirectory>
                        configuration>
                    execution>
                executions>
            plugin>
            
            <plugin>
                <artifactId>maven-resources-pluginartifactId>
                <executions>
                    <execution>
                        <id>copy-resourcesid>
                        <phase>packagephase>
                        <goals>
                            <goal>copy-resourcesgoal>
                        goals>
                        <configuration>
                            <resources>
                                <resource>
                                    
                                    <directory>src/main/resourcesdirectory>
                                resource>
                            resources>
                            
                            <outputDirectory>${project.build.directory}/output/resourcesoutputDirectory>
                        configuration>
                    execution>
                executions>
            plugin>
        plugins>
    build>

你可能感兴趣的:(Spring,Boot)