Browse Source

阿里云打包配置

liyafei 3 months ago
parent
commit
0b2b9c76f3

+ 5 - 4
alien-api/src/main/resources/bootstrap-dev.yml

@@ -6,15 +6,16 @@ spring:
     nacos:
     nacos:
       #注册中心
       #注册中心
       discovery:
       discovery:
-        server-addr: 192.168.2.252:8848
+        server-addr: 8.130.79.5:8848
         username: nacos
         username: nacos
-        password: ngfriend198092
+        password: Alien123456
 
 
       #配置中心
       #配置中心
       config:
       config:
         enabled: true
         enabled: true
-        server-addr: 192.168.2.252:8848
+        refresh-enabled: true
+        server-addr: 8.130.79.5:8848
         username: nacos
         username: nacos
-        password: ngfriend198092
+        password: Alien123456
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         file-extension: yml
         file-extension: yml

+ 11 - 6
alien-api/src/main/resources/bootstrap-test.yml

@@ -6,17 +6,22 @@ spring:
     nacos:
     nacos:
       #注册中心
       #注册中心
       discovery:
       discovery:
-        server-addr: 192.168.2.252:8848
+        server-addr: 8.130.79.5:8848
         username: nacos
         username: nacos
-        password: ngfriend198092
-        namespace: 0e1e2d77-56e8-422c-8317-6f71d7285e59
+        password: Alien123456
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
 
 
       #配置中心
       #配置中心
       config:
       config:
         enabled: true
         enabled: true
-        server-addr: 192.168.2.252:8848
+        refresh-enabled: true
+        server-addr: 8.130.79.5:8848
         username: nacos
         username: nacos
-        password: ngfriend198092
+        password: Alien123456
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         file-extension: yml
         file-extension: yml
-        namespace: 0e1e2d77-56e8-422c-8317-6f71d7285e59
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
+        shared-configs:
+          - data-id: common.yml
+            group: DEFAULT_GROUP
+            refresh: true

+ 0 - 4
alien-entity/pom.xml

@@ -94,10 +94,6 @@
     <build>
     <build>
         <plugins>
         <plugins>
             <plugin>
             <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
                 <configuration>

+ 34 - 48
alien-gateway/pom.xml

@@ -207,67 +207,53 @@
     <build>
     <build>
         <plugins>
         <plugins>
             <plugin>
             <plugin>
+                <!-- 指定项目编译时的java版本和编码方式 -->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <target>1.8</target>
+                    <source>1.8</source>
+                    <encoding>UTF-8</encoding>
+                    <!-- <compilerArguments> <extdirs>lib</extdirs> </compilerArguments> -->
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <!-- 是否要把第三方jar加入到类构建路径 -->
+                            <addClasspath>true</addClasspath>
+                            <!-- 外部依赖jar包的最终位置 -->
+                            <classpathPrefix>lib/</classpathPrefix>
+                            <!--指定jar程序入口-->
+                            <mainClass>shop.alien.gateway.AlienGatewayApplication</mainClass>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <!--拷贝依赖到jar外面的lib目录-->
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
                 <artifactId>maven-dependency-plugin</artifactId>
-                <version>3.1.2</version> <!-- 使用最新版本 -->
                 <executions>
                 <executions>
                     <execution>
                     <execution>
                         <id>copy-dependencies</id>
                         <id>copy-dependencies</id>
-                        <phase>prepare-package</phase> <!-- 在package之前执行 -->
+                        <phase>prepare-package</phase>
                         <goals>
                         <goals>
                             <goal>copy-dependencies</goal>
                             <goal>copy-dependencies</goal>
                         </goals>
                         </goals>
                         <configuration>
                         <configuration>
-                            <outputDirectory>${project.build.directory}/lib</outputDirectory> <!-- 指定输出目录 -->
-                            <includeScope>runtime</includeScope> <!-- 仅包含运行时依赖 -->
+                            <!-- 拷贝项目依赖包到lib/目录下 -->
+                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
+                            <overWriteReleases>false</overWriteReleases>
+                            <overWriteSnapshots>false</overWriteSnapshots>
+                            <overWriteIfNewer>true</overWriteIfNewer>
                         </configuration>
                         </configuration>
                     </execution>
                     </execution>
                 </executions>
                 </executions>
             </plugin>
             </plugin>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <mainClass>shop.alien.gateway.AlienGatewayApplication</mainClass>
-                    <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-compiler-plugin</artifactId>
-                <configuration>
-                    <source>8</source>
-                    <target>8</target>
-                </configuration>
-            </plugin>
         </plugins>
         </plugins>
     </build>
     </build>
-    <profiles>
-        <profile>
-            <id>test</id>
-            <properties>
-                <profiles.active>test</profiles.active>
-                <nacos.server-addr>192.168.2.252:8848</nacos.server-addr>
-                <nacos.namespace>0e1e2d77-56e8-422c-8317-6f71d7285e59</nacos.namespace>
-                <nacos.username>nacos</nacos.username>
-                <nacos.password>ngfriend198092</nacos.password>
-            </properties>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-        </profile>
-    </profiles>
 </project>
 </project>

+ 6 - 2
alien-gateway/src/main/resources/bootstrap-test.yml

@@ -9,7 +9,7 @@ spring:
         server-addr: 8.130.79.5:8848
         server-addr: 8.130.79.5:8848
         username: nacos
         username: nacos
         password: Alien123456
         password: Alien123456
-        namespace: 00af4930-5bd5-4994-a6f6-591675a2949d
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
 
 
       #配置中心
       #配置中心
       config:
       config:
@@ -20,4 +20,8 @@ spring:
         password: Alien123456
         password: Alien123456
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         file-extension: yml
         file-extension: yml
-        namespace: 00af4930-5bd5-4994-a6f6-591675a2949d
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
+        shared-configs:
+          - data-id: common.yml
+            group: DEFAULT_GROUP
+            refresh: true

+ 34 - 33
alien-job/pom.xml

@@ -144,52 +144,53 @@
     <build>
     <build>
         <plugins>
         <plugins>
             <plugin>
             <plugin>
+                <!-- 指定项目编译时的java版本和编码方式 -->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <target>1.8</target>
+                    <source>1.8</source>
+                    <encoding>UTF-8</encoding>
+                    <!-- <compilerArguments> <extdirs>lib</extdirs> </compilerArguments> -->
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <!-- 是否要把第三方jar加入到类构建路径 -->
+                            <addClasspath>true</addClasspath>
+                            <!-- 外部依赖jar包的最终位置 -->
+                            <classpathPrefix>lib/</classpathPrefix>
+                            <!--指定jar程序入口-->
+                            <mainClass>shop.alien.job.AlienJobApplication</mainClass>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <!--拷贝依赖到jar外面的lib目录-->
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
                 <artifactId>maven-dependency-plugin</artifactId>
-                <version>3.1.2</version> <!-- 使用最新版本 -->
                 <executions>
                 <executions>
                     <execution>
                     <execution>
                         <id>copy-dependencies</id>
                         <id>copy-dependencies</id>
-                        <phase>prepare-package</phase> <!-- 在package之前执行 -->
+                        <phase>prepare-package</phase>
                         <goals>
                         <goals>
                             <goal>copy-dependencies</goal>
                             <goal>copy-dependencies</goal>
                         </goals>
                         </goals>
                         <configuration>
                         <configuration>
-                            <outputDirectory>${project.build.directory}/lib</outputDirectory> <!-- 指定输出目录 -->
-                            <includeScope>runtime</includeScope> <!-- 仅包含运行时依赖 -->
+                            <!-- 拷贝项目依赖包到lib/目录下 -->
+                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
+                            <overWriteReleases>false</overWriteReleases>
+                            <overWriteSnapshots>false</overWriteSnapshots>
+                            <overWriteIfNewer>true</overWriteIfNewer>
                         </configuration>
                         </configuration>
                     </execution>
                     </execution>
                 </executions>
                 </executions>
             </plugin>
             </plugin>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <mainClass>shop.alien.job.AlienJobApplication</mainClass>
-                    <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-compiler-plugin</artifactId>
-                <configuration>
-                    <source>8</source>
-                    <target>8</target>
-                </configuration>
-            </plugin>
         </plugins>
         </plugins>
     </build>
     </build>
     <profiles>
     <profiles>

+ 5 - 4
alien-job/src/main/resources/bootstrap-dev.yml

@@ -6,15 +6,16 @@ spring:
     nacos:
     nacos:
       #注册中心
       #注册中心
       discovery:
       discovery:
-        server-addr: 192.168.2.252:8848
+        server-addr: 8.130.79.5:8848
         username: nacos
         username: nacos
-        password: ngfriend198092
+        password: Alien123456
 
 
       #配置中心
       #配置中心
       config:
       config:
         enabled: true
         enabled: true
-        server-addr: 192.168.2.252:8848
+        refresh-enabled: true
+        server-addr: 8.130.79.5:8848
         username: nacos
         username: nacos
-        password: ngfriend198092
+        password: Alien123456
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         file-extension: yml
         file-extension: yml

+ 6 - 2
alien-job/src/main/resources/bootstrap-test.yml

@@ -9,7 +9,7 @@ spring:
         server-addr: 8.130.79.5:8848
         server-addr: 8.130.79.5:8848
         username: nacos
         username: nacos
         password: Alien123456
         password: Alien123456
-        namespace: 00af4930-5bd5-4994-a6f6-591675a2949d
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
 
 
       #配置中心
       #配置中心
       config:
       config:
@@ -20,4 +20,8 @@ spring:
         password: Alien123456
         password: Alien123456
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         file-extension: yml
         file-extension: yml
-        namespace: 00af4930-5bd5-4994-a6f6-591675a2949d
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
+        shared-configs:
+          - data-id: common.yml
+            group: DEFAULT_GROUP
+            refresh: true

+ 34 - 33
alien-lawyer/pom.xml

@@ -293,52 +293,53 @@
     <build>
     <build>
         <plugins>
         <plugins>
             <plugin>
             <plugin>
+                <!-- 指定项目编译时的java版本和编码方式 -->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <target>1.8</target>
+                    <source>1.8</source>
+                    <encoding>UTF-8</encoding>
+                    <!-- <compilerArguments> <extdirs>lib</extdirs> </compilerArguments> -->
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <!-- 是否要把第三方jar加入到类构建路径 -->
+                            <addClasspath>true</addClasspath>
+                            <!-- 外部依赖jar包的最终位置 -->
+                            <classpathPrefix>lib/</classpathPrefix>
+                            <!--指定jar程序入口-->
+                            <mainClass>shop.alien.lawyer.AlienLawyerApplication</mainClass>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <!--拷贝依赖到jar外面的lib目录-->
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
                 <artifactId>maven-dependency-plugin</artifactId>
-                <version>3.1.2</version> <!-- 使用最新版本 -->
                 <executions>
                 <executions>
                     <execution>
                     <execution>
                         <id>copy-dependencies</id>
                         <id>copy-dependencies</id>
-                        <phase>prepare-package</phase> <!-- 在package之前执行 -->
+                        <phase>prepare-package</phase>
                         <goals>
                         <goals>
                             <goal>copy-dependencies</goal>
                             <goal>copy-dependencies</goal>
                         </goals>
                         </goals>
                         <configuration>
                         <configuration>
-                            <outputDirectory>${project.build.directory}/lib</outputDirectory> <!-- 指定输出目录 -->
-                            <includeScope>runtime</includeScope> <!-- 仅包含运行时依赖 -->
+                            <!-- 拷贝项目依赖包到lib/目录下 -->
+                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
+                            <overWriteReleases>false</overWriteReleases>
+                            <overWriteSnapshots>false</overWriteSnapshots>
+                            <overWriteIfNewer>true</overWriteIfNewer>
                         </configuration>
                         </configuration>
                     </execution>
                     </execution>
                 </executions>
                 </executions>
             </plugin>
             </plugin>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <mainClass>shop.alien.lawyer.AlienLawyerApplication</mainClass>
-                    <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-compiler-plugin</artifactId>
-                <configuration>
-                    <source>8</source>
-                    <target>8</target>
-                </configuration>
-            </plugin>
         </plugins>
         </plugins>
     </build>
     </build>
 </project>
 </project>

+ 6 - 2
alien-lawyer/src/main/resources/bootstrap-test.yml

@@ -9,7 +9,7 @@ spring:
         server-addr: 8.130.79.5:8848
         server-addr: 8.130.79.5:8848
         username: nacos
         username: nacos
         password: Alien123456
         password: Alien123456
-        namespace: 00af4930-5bd5-4994-a6f6-591675a2949d
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
 
 
       #配置中心
       #配置中心
       config:
       config:
@@ -20,4 +20,8 @@ spring:
         password: Alien123456
         password: Alien123456
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         file-extension: yml
         file-extension: yml
-        namespace: 00af4930-5bd5-4994-a6f6-591675a2949d
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
+        shared-configs:
+          - data-id: common.yml
+            group: DEFAULT_GROUP
+            refresh: true

+ 34 - 48
alien-second/pom.xml

@@ -278,67 +278,53 @@
     <build>
     <build>
         <plugins>
         <plugins>
             <plugin>
             <plugin>
+                <!-- 指定项目编译时的java版本和编码方式 -->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <target>1.8</target>
+                    <source>1.8</source>
+                    <encoding>UTF-8</encoding>
+                    <!-- <compilerArguments> <extdirs>lib</extdirs> </compilerArguments> -->
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <!-- 是否要把第三方jar加入到类构建路径 -->
+                            <addClasspath>true</addClasspath>
+                            <!-- 外部依赖jar包的最终位置 -->
+                            <classpathPrefix>lib/</classpathPrefix>
+                            <!--指定jar程序入口-->
+                            <mainClass>shop.alien.second.AlienSecondApplication</mainClass>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <!--拷贝依赖到jar外面的lib目录-->
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
                 <artifactId>maven-dependency-plugin</artifactId>
-                <version>3.1.2</version> <!-- 使用最新版本 -->
                 <executions>
                 <executions>
                     <execution>
                     <execution>
                         <id>copy-dependencies</id>
                         <id>copy-dependencies</id>
-                        <phase>prepare-package</phase> <!-- 在package之前执行 -->
+                        <phase>prepare-package</phase>
                         <goals>
                         <goals>
                             <goal>copy-dependencies</goal>
                             <goal>copy-dependencies</goal>
                         </goals>
                         </goals>
                         <configuration>
                         <configuration>
-                            <outputDirectory>${project.build.directory}/lib</outputDirectory> <!-- 指定输出目录 -->
-                            <includeScope>runtime</includeScope> <!-- 仅包含运行时依赖 -->
+                            <!-- 拷贝项目依赖包到lib/目录下 -->
+                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
+                            <overWriteReleases>false</overWriteReleases>
+                            <overWriteSnapshots>false</overWriteSnapshots>
+                            <overWriteIfNewer>true</overWriteIfNewer>
                         </configuration>
                         </configuration>
                     </execution>
                     </execution>
                 </executions>
                 </executions>
             </plugin>
             </plugin>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <mainClass>shop.alien.second.AlienSecondApplication</mainClass>
-                    <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-compiler-plugin</artifactId>
-                <configuration>
-                    <source>8</source>
-                    <target>8</target>
-                </configuration>
-            </plugin>
         </plugins>
         </plugins>
     </build>
     </build>
-    <profiles>
-        <profile>
-            <id>test</id>
-            <properties>
-                <profiles.active>test</profiles.active>
-                <nacos.server-addr>192.168.2.252:8848</nacos.server-addr>
-                <nacos.namespace>0e1e2d77-56e8-422c-8317-6f71d7285e59</nacos.namespace>
-                <nacos.username>nacos</nacos.username>
-                <nacos.password>ngfriend198092</nacos.password>
-            </properties>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-        </profile>
-    </profiles>
 </project>
 </project>

+ 6 - 2
alien-second/src/main/resources/bootstrap-test.yml

@@ -9,7 +9,7 @@ spring:
         server-addr: 8.130.79.5:8848
         server-addr: 8.130.79.5:8848
         username: nacos
         username: nacos
         password: Alien123456
         password: Alien123456
-        namespace: 00af4930-5bd5-4994-a6f6-591675a2949d
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
 
 
       #配置中心
       #配置中心
       config:
       config:
@@ -20,4 +20,8 @@ spring:
         password: Alien123456
         password: Alien123456
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         file-extension: yml
         file-extension: yml
-        namespace: 00af4930-5bd5-4994-a6f6-591675a2949d
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
+        shared-configs:
+          - data-id: common.yml
+            group: DEFAULT_GROUP
+            refresh: true

+ 34 - 48
alien-store-platform/pom.xml

@@ -290,67 +290,53 @@
     <build>
     <build>
         <plugins>
         <plugins>
             <plugin>
             <plugin>
+                <!-- 指定项目编译时的java版本和编码方式 -->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <target>1.8</target>
+                    <source>1.8</source>
+                    <encoding>UTF-8</encoding>
+                    <!-- <compilerArguments> <extdirs>lib</extdirs> </compilerArguments> -->
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <!-- 是否要把第三方jar加入到类构建路径 -->
+                            <addClasspath>true</addClasspath>
+                            <!-- 外部依赖jar包的最终位置 -->
+                            <classpathPrefix>lib/</classpathPrefix>
+                            <!--指定jar程序入口-->
+                            <mainClass>shop.alien.storeplatform.AlienStorePlatformApplication</mainClass>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <!--拷贝依赖到jar外面的lib目录-->
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
                 <artifactId>maven-dependency-plugin</artifactId>
-                <version>3.1.2</version> <!-- 使用最新版本 -->
                 <executions>
                 <executions>
                     <execution>
                     <execution>
                         <id>copy-dependencies</id>
                         <id>copy-dependencies</id>
-                        <phase>prepare-package</phase> <!-- 在package之前执行 -->
+                        <phase>prepare-package</phase>
                         <goals>
                         <goals>
                             <goal>copy-dependencies</goal>
                             <goal>copy-dependencies</goal>
                         </goals>
                         </goals>
                         <configuration>
                         <configuration>
-                            <outputDirectory>${project.build.directory}/lib</outputDirectory> <!-- 指定输出目录 -->
-                            <includeScope>runtime</includeScope> <!-- 仅包含运行时依赖 -->
+                            <!-- 拷贝项目依赖包到lib/目录下 -->
+                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
+                            <overWriteReleases>false</overWriteReleases>
+                            <overWriteSnapshots>false</overWriteSnapshots>
+                            <overWriteIfNewer>true</overWriteIfNewer>
                         </configuration>
                         </configuration>
                     </execution>
                     </execution>
                 </executions>
                 </executions>
             </plugin>
             </plugin>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <mainClass>shop.alien.storeplatform.AlienStorePlatformApplication</mainClass>
-                    <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-compiler-plugin</artifactId>
-                <configuration>
-                    <source>8</source>
-                    <target>8</target>
-                </configuration>
-            </plugin>
         </plugins>
         </plugins>
     </build>
     </build>
-    <profiles>
-        <profile>
-            <id>test</id>
-            <properties>
-                <profiles.active>test</profiles.active>
-                <nacos.server-addr>192.168.2.252:8848</nacos.server-addr>
-                <nacos.namespace>0e1e2d77-56e8-422c-8317-6f71d7285e59</nacos.namespace>
-                <nacos.username>nacos</nacos.username>
-                <nacos.password>ngfriend198092</nacos.password>
-            </properties>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-        </profile>
-    </profiles>
 </project>
 </project>

+ 6 - 2
alien-store-platform/src/main/resources/bootstrap-test.yml

@@ -9,7 +9,7 @@ spring:
         server-addr: 8.130.79.5:8848
         server-addr: 8.130.79.5:8848
         username: nacos
         username: nacos
         password: Alien123456
         password: Alien123456
-        namespace: 00af4930-5bd5-4994-a6f6-591675a2949d
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
 
 
       #配置中心
       #配置中心
       config:
       config:
@@ -20,4 +20,8 @@ spring:
         password: Alien123456
         password: Alien123456
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         file-extension: yml
         file-extension: yml
-        namespace: 00af4930-5bd5-4994-a6f6-591675a2949d
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
+        shared-configs:
+          - data-id: common.yml
+            group: DEFAULT_GROUP
+            refresh: true

+ 34 - 33
alien-store/pom.xml

@@ -302,52 +302,53 @@
     <build>
     <build>
         <plugins>
         <plugins>
             <plugin>
             <plugin>
+                <!-- 指定项目编译时的java版本和编码方式 -->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <target>1.8</target>
+                    <source>1.8</source>
+                    <encoding>UTF-8</encoding>
+                    <!-- <compilerArguments> <extdirs>lib</extdirs> </compilerArguments> -->
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <!-- 是否要把第三方jar加入到类构建路径 -->
+                            <addClasspath>true</addClasspath>
+                            <!-- 外部依赖jar包的最终位置 -->
+                            <classpathPrefix>lib/</classpathPrefix>
+                            <!--指定jar程序入口-->
+                            <mainClass>shop.alien.store.AlienStoreApplication</mainClass>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <!--拷贝依赖到jar外面的lib目录-->
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
                 <artifactId>maven-dependency-plugin</artifactId>
-                <version>3.1.2</version> <!-- 使用最新版本 -->
                 <executions>
                 <executions>
                     <execution>
                     <execution>
                         <id>copy-dependencies</id>
                         <id>copy-dependencies</id>
-                        <phase>prepare-package</phase> <!-- 在package之前执行 -->
+                        <phase>prepare-package</phase>
                         <goals>
                         <goals>
                             <goal>copy-dependencies</goal>
                             <goal>copy-dependencies</goal>
                         </goals>
                         </goals>
                         <configuration>
                         <configuration>
-                            <outputDirectory>${project.build.directory}/lib</outputDirectory> <!-- 指定输出目录 -->
-                            <includeScope>runtime</includeScope> <!-- 仅包含运行时依赖 -->
+                            <!-- 拷贝项目依赖包到lib/目录下 -->
+                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
+                            <overWriteReleases>false</overWriteReleases>
+                            <overWriteSnapshots>false</overWriteSnapshots>
+                            <overWriteIfNewer>true</overWriteIfNewer>
                         </configuration>
                         </configuration>
                     </execution>
                     </execution>
                 </executions>
                 </executions>
             </plugin>
             </plugin>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <mainClass>shop.alien.store.AlienStoreApplication</mainClass>
-                    <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-compiler-plugin</artifactId>
-                <configuration>
-                    <source>8</source>
-                    <target>8</target>
-                </configuration>
-            </plugin>
         </plugins>
         </plugins>
     </build>
     </build>
 </project>
 </project>

+ 6 - 2
alien-store/src/main/resources/bootstrap-test.yml

@@ -9,7 +9,7 @@ spring:
         server-addr: 8.130.79.5:8848
         server-addr: 8.130.79.5:8848
         username: nacos
         username: nacos
         password: Alien123456
         password: Alien123456
-        namespace: 00af4930-5bd5-4994-a6f6-591675a2949d
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
 
 
       #配置中心
       #配置中心
       config:
       config:
@@ -20,4 +20,8 @@ spring:
         password: Alien123456
         password: Alien123456
         group: DEFAULT_GROUP
         group: DEFAULT_GROUP
         file-extension: yml
         file-extension: yml
-        namespace: 00af4930-5bd5-4994-a6f6-591675a2949d
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
+        shared-configs:
+          - data-id: common.yml
+            group: DEFAULT_GROUP
+            refresh: true

+ 0 - 4
alien-util/pom.xml

@@ -340,10 +340,6 @@
     <build>
     <build>
         <plugins>
         <plugins>
             <plugin>
             <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>
                 <configuration>

+ 9 - 7
pom.xml

@@ -397,12 +397,14 @@
     </dependencyManagement>
     </dependencyManagement>
 
 
     <build>
     <build>
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <version>2.3.2.RELEASE</version>
-            </plugin>
-        </plugins>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-maven-plugin</artifactId>
+                    <version>2.3.2.RELEASE</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
     </build>
     </build>
 </project>
 </project>