1、编辑打包方式,避免生成的jar过大在升级过程耗费大量时间
将target下的config、lib和jar 统一放在同一目录下,修改服务启动命令
后续升级在不修改依赖、配置文件的情况下替换jar即可
涉及依赖、配置文件仅需在lib、config下新增/替换相关文件即可
8个文件已修改
193 ■■■■■ 已修改文件
hangzhoumesParent/gateway/pom.xml 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/pom.xml 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/pom.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/GlassStorageModule/pom.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/LoadGlassModule/pom.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/TemperingGlassModule/pom.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/pom.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/pom.xml 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/gateway/pom.xml
@@ -13,8 +13,7 @@
    <artifactId>gateway</artifactId>
    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <java.run.main.class>com.mes.GateWayApplication</java.run.main.class>
    </properties>
    <dependencies>
        <!--        服务注册/发现-->
@@ -33,6 +32,87 @@
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>2.3.0.RELEASE</version> <!-- 根据你的Spring Boot版本调整 -->
                <configuration>
                    <layout>ZIP</layout>
                    <includes>
                        <include>
                            <groupId>nothing</groupId>
                            <artifactId>nothing</artifactId>
                        </include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>3.1.2</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/config</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/resources</directory>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>lib/</classpathPrefix>
                            <mainClass>${java.run.main.class}</mainClass>
                        </manifest>
                        <manifestEntries>
                            <Class-Path>resources/</Class-Path>
                        </manifestEntries>
                    </archive>
                    <outputDirectory>${project.build.directory}</outputDirectory>
                </configuration>
            </plugin>
        </plugins>
    </build>
hangzhoumesParent/moduleService/CacheGlassModule/pom.xml
@@ -23,16 +23,15 @@
            <artifactId>jcifs</artifactId>
            <version>1.2.19</version>
        </dependency>
<!--        <dependency>-->
<!--            <groupId>com.github.yulichang</groupId>-->
<!--            <artifactId>mybatis-plus-join-boot-starter</artifactId>-->
<!--            <version>1.4.12</version>-->
<!--        </dependency>-->
        <!--        <dependency>-->
        <!--            <groupId>com.github.yulichang</groupId>-->
        <!--            <artifactId>mybatis-plus-join-boot-starter</artifactId>-->
        <!--            <version>1.4.12</version>-->
        <!--        </dependency>-->
    </dependencies>
    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <java.run.main.class>com.mes.CacheGlassModuleApplication</java.run.main.class>
    </properties>
hangzhoumesParent/moduleService/CacheVerticalGlassModule/pom.xml
@@ -19,8 +19,7 @@
        </dependency>
    </dependencies>
    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <java.run.main.class>com.mes.CacheVerticalClassModuleApplication</java.run.main.class>
    </properties>
</project>
hangzhoumesParent/moduleService/GlassStorageModule/pom.xml
@@ -33,8 +33,7 @@
    </dependencies>
    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <java.run.main.class>com.mes.GlassStorageApplication</java.run.main.class>
    </properties>
</project>
hangzhoumesParent/moduleService/LoadGlassModule/pom.xml
@@ -26,8 +26,7 @@
    </dependencies>
    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <java.run.main.class>com.mes.LoadGlassModuleApplication</java.run.main.class>
    </properties>
</project>
hangzhoumesParent/moduleService/TemperingGlassModule/pom.xml
@@ -26,8 +26,7 @@
    </dependencies>
    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <java.run.main.class>com.mes.TemperingGlassModuleApplication</java.run.main.class>
    </properties>
</project>
hangzhoumesParent/moduleService/hollowGlassModule/pom.xml
@@ -12,8 +12,7 @@
    <artifactId>hollowGlass</artifactId>
    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <java.run.main.class>com.mes.HollowGlassApplication</java.run.main.class>
    </properties>
</project>
hangzhoumesParent/moduleService/pom.xml
@@ -80,6 +80,87 @@
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>2.3.0.RELEASE</version> <!-- 根据你的Spring Boot版本调整 -->
                <configuration>
                    <layout>ZIP</layout>
                    <includes>
                        <include>
                            <groupId>nothing</groupId>
                            <artifactId>nothing</artifactId>
                        </include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>3.1.2</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/config</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/resources</directory>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>lib/</classpathPrefix>
                            <mainClass>${java.run.main.class}</mainClass>
                        </manifest>
                        <manifestEntries>
                            <Class-Path>resources/</Class-Path>
                        </manifestEntries>
                    </archive>
                    <outputDirectory>${project.build.directory}</outputDirectory>
                </configuration>
            </plugin>
        </plugins>
    </build>