许鹏程
2023-05-31 de626bcbea9829e7ad1931a5d3fcc660af8728bb
添加tool-face
已修改1个文件
93 ■■■■■ 文件已修改
pom.xml 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml
@@ -115,6 +115,10 @@
        </dependency>
        <dependency>
            <groupId>com.lx</groupId>
            <artifactId>product-server-tool-face</artifactId>
        </dependency>
        <dependency>
            <groupId>com.lx</groupId>
            <artifactId>product-server-tool-dev</artifactId>
        </dependency>
        <dependency>
@@ -265,95 +269,6 @@
                    </execution>
                </executions>
            </plugin>
            <!-- SpringBoot 打包插件,把 maven-jar-plugin 打成的jar包重新打成可运行jar包 -->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <!-- 重写包含依赖,包含不存在的依赖,jar里没有pom里的依赖 -->
                    <includes>
                        <include>
                            <groupId>null</groupId>
                            <artifactId>null</artifactId>
                        </include>
                    </includes>
                    <includeSystemScope>true</includeSystemScope>
                    <layout>ZIP</layout>
                    <!-- 使用外部配置文件,jar包里没有资源文件 -->
                    <addResources>true</addResources>
                    <outputDirectory>${project.build.directory}</outputDirectory>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- 执行bat 前端编译 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target description="run the bat">
                                <echo>开始运行packed.bat命令行</echo>
                                <exec dir="D:/product/lxworkspaces/product-web" executable="cmd.exe">
                                    <arg line="packed.bat"></arg>
                                </exec>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- 拷贝文件 -->
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>package</phase>
                        <configuration>
                            <tasks>
                                <copy todir="D:/product/lxworkspaces/product-server-install/resources/product-server/lib">
                                    <fileset dir="${project.build.directory}/lib">
                                        <include name="*.jar"/>
                                        <exclude name="product-server-core-1.0.0-SNAPSHOT.jar"/>
                                    </fileset>
                                </copy>
                                <copy todir="D:/product/lxworkspaces/product-server-install/resources/product-server/resources">
                                    <fileset dir="${project.build.directory}/resources">
                                        <include name="application-prod.properties"/>
                                        <include name="cache-prod.properties"/>
                                        <include name="*.txt"/>
                                        <include name="*.xml"/>
                                    </fileset>
                                </copy>
                                <copy todir="D:/product/lxworkspaces/product-server-install/resources/product-server/web">
                                    <fileset dir="D:/product/lxworkspaces/product-web/dist">
                                        <include name="*.*"/>
                                    </fileset>
                                </copy>
                                <copy file="${project.build.directory}/product-server-web-1.0.0-SNAPSHOT.jar"
                                      tofile="D:/product/lxworkspaces/product-server-install/resources/product-server/product-server-web-1.0.0-SNAPSHOT.jar"
                                      overwrite="true"/>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>