68 lines
2.2 KiB
XML
68 lines
2.2 KiB
XML
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|||
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|||
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|||
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||
|
|
<modelVersion>4.0.0</modelVersion>
|
|||
|
|
|
|||
|
|
<parent>
|
|||
|
|
<groupId>com.example</groupId>
|
|||
|
|
<artifactId>game-parent</artifactId>
|
|||
|
|
<version>1.0-SNAPSHOT</version>
|
|||
|
|
<relativePath>../pom.xml</relativePath>
|
|||
|
|
</parent>
|
|||
|
|
|
|||
|
|
<artifactId>server</artifactId>
|
|||
|
|
<name>Game Server</name>
|
|||
|
|
<url>http://www.example.com</url>
|
|||
|
|
|
|||
|
|
<!-- 依赖配置 -->
|
|||
|
|
<dependencies>
|
|||
|
|
<!-- 依赖核心模块 -->
|
|||
|
|
<dependency>
|
|||
|
|
<groupId>com.example</groupId>
|
|||
|
|
<artifactId>core</artifactId>
|
|||
|
|
</dependency>
|
|||
|
|
|
|||
|
|
<!-- 测试依赖 -->
|
|||
|
|
<dependency>
|
|||
|
|
<groupId>junit</groupId>
|
|||
|
|
<artifactId>junit</artifactId>
|
|||
|
|
<scope>test</scope>
|
|||
|
|
</dependency>
|
|||
|
|
</dependencies>
|
|||
|
|
|
|||
|
|
<!-- 构建配置(生成可执行JAR) -->
|
|||
|
|
<build>
|
|||
|
|
<plugins>
|
|||
|
|
<!-- 编译插件(继承父模块版本) -->
|
|||
|
|
<plugin>
|
|||
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|||
|
|
</plugin>
|
|||
|
|
|
|||
|
|
<!-- 打包包含所有依赖的可执行JAR -->
|
|||
|
|
<plugin>
|
|||
|
|
<artifactId>maven-assembly-plugin</artifactId>
|
|||
|
|
<configuration>
|
|||
|
|
<descriptorRefs>
|
|||
|
|
<descriptorRef>jar-with-dependencies</descriptorRef>
|
|||
|
|
</descriptorRefs>
|
|||
|
|
<archive>
|
|||
|
|
<manifest>
|
|||
|
|
<mainClass>com.example.server.ServerLauncher</mainClass> <!-- 服务端主类 -->
|
|||
|
|
</manifest>
|
|||
|
|
</archive>
|
|||
|
|
</configuration>
|
|||
|
|
<executions>
|
|||
|
|
<execution>
|
|||
|
|
<id>make-assembly</id>
|
|||
|
|
<phase>package</phase>
|
|||
|
|
<goals>
|
|||
|
|
<goal>single</goal>
|
|||
|
|
</goals>
|
|||
|
|
</execution>
|
|||
|
|
</executions>
|
|||
|
|
</plugin>
|
|||
|
|
</plugins>
|
|||
|
|
</build>
|
|||
|
|
</project>
|
|||
|
|
|