Ver Fonte

Merge branch 'equip' of https://codeup.aliyun.com/62c1add3e4166464dc314001/mmo/ioGameMMO into dev

toby há 1 ano atrás
pai
commit
ace1b27e28

+ 38 - 0
broker/pom.xml

@@ -40,4 +40,42 @@
         </dependency>
     </dependencies>
 
+    <build>
+        <plugins>
+            <!--
+            java 打包成 jar
+            https://gitee.com/iohao/iogame/issues/I5CXDU#note_11037550
+
+            会在 target 目录下生成 broker-xxx-jar-with-dependencies.jar
+            执行命令启动
+            java -jar target/broker-xxx-jar-with-dependencies.jar
+            -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>3.3.0</version>
+                <executions>
+                    <execution>
+                        <id>make-assembly</id>
+                        <!-- 绑定到package生命周期 -->
+                        <phase>package</phase>
+                        <goals>
+                            <!-- 只运行一次 -->
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <descriptorRefs>
+                        <descriptorRef>jar-with-dependencies</descriptorRef>
+                    </descriptorRefs>
+                    <archive>
+                        <manifest>
+                            <mainClass>com.iohao.mmo.broker.MyBrokerServer</mainClass>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 </project>

+ 1 - 1
common/common-core/src/main/java/com/iohao/mmo/common/kit/MyExternalCommunicationKit.java

@@ -41,7 +41,7 @@ public class MyExternalCommunicationKit {
                 .optionalAnySuccess()
                 // 得到返回值
                 .map(ResponseCollectExternalItemMessage::getData)
-                // 为 String
+                // 为 String
                 .map(Objects::toString)
                 // 如果没获取到给个空串,调用方就不需要做 null 判断了。
                 .orElse("");

+ 39 - 0
external/pom.xml

@@ -40,4 +40,43 @@
         </dependency>
     </dependencies>
 
+    <build>
+        <plugins>
+            <!--
+            java 打包成 jar
+            https://gitee.com/iohao/iogame/issues/I5CXDU#note_11037550
+
+            会在 target 目录下生成 external-xxx-jar-with-dependencies.jar
+            执行命令启动
+            java -jar target/external-xxx-jar-with-dependencies.jar
+            -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>3.3.0</version>
+                <executions>
+                    <execution>
+                        <id>make-assembly</id>
+                        <!-- 绑定到package生命周期 -->
+                        <phase>package</phase>
+                        <goals>
+                            <!-- 只运行一次 -->
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <descriptorRefs>
+                        <descriptorRef>jar-with-dependencies</descriptorRef>
+                    </descriptorRefs>
+                    <archive>
+                        <manifest>
+                            <mainClass>com.iohao.mmo.external.MyExternalServer</mainClass>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
 </project>

+ 28 - 0
one-application/pom.xml

@@ -44,4 +44,32 @@
         </dependency>
     </dependencies>
 
+    <build>
+        <plugins>
+            <!--
+            java 打包成 jar
+            https://www.yuque.com/iohao/game/ruaqza#cdvw9
+
+            会在 target 目录下生成 one-application-1.0-SNAPSHOT.jar
+            执行命令启动
+            java -jar target/one-application-1.0-SNAPSHOT.jar
+            -->
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <mainClass>com.iohao.mmo.OneApplication</mainClass>
+                    <layout>JAR</layout>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
 </project>