本地lib

根目录下

├── lib
│   └── top-schema-1.3.1.jar

pom引入

${project.basedir} :代表pom.xml文件所在的项目根目录

    <dependencies>
        <dependency>
            <groupId>com.taobao</groupId>
            <artifactId>top-schema</artifactId>
            <version>1.3.1</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/top-schema-1.3.1.jar</systemPath>
        </dependency>
    </dependencies>

build打包

<build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <version>${spring-boot-maven-plugin.version}</version>
                    <configuration>
                        <mainClass>org.example.Main</mainClass>
                        <includeSystemScope>true</includeSystemScope>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>repackage</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>