springboot 本地jar发布,打war包
1、pom 这样写:
<build> <finalName>${finalName}</finalName> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <!-- 包含本地jar 到war--> <configuration> <includeSystemScope>true</includeSystemScope> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration> <webResources> <resource> <directory>${project.basedir}/src/libs</directory> <targetPath>WEB-INF/lib/</targetPath> <includes> <include>**/*.jar</include> </includes> </resource> </webResources> </configuration> </plugin> </plugins> </build>
<!-- 工作流集成 --> <dependency> <groupId>com.luban</groupId> <artifactId>workflow-comment</artifactId> <version>0.0.2-SNAPSHOT</version> <scope>system</scope> <systemPath>${project.basedir}/src/libs/workflow-comment-0.0.2-SNAPSHOT.jar</systemPath> </dependency> <dependency> <groupId>com.luban</groupId> <artifactId>workflow-common</artifactId> <version>0.0.2-SNAPSHOT</version> <scope>system</scope> <!-- 包含本地jar --> <systemPath>${project.basedir}/src/libs/workflow-common-0.0.2-SNAPSHOT.jar</systemPath> </dependency> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>${mybatis-plus.version}</version> </dependency> <!-- /工作流集成 -->