|
@@ -40,4 +40,43 @@
|
|
</dependency>
|
|
</dependency>
|
|
</dependencies>
|
|
</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>
|
|
</project>
|