首次提交:初始化项目,包含 client 和 server 模块的 pom.xml 等文件

This commit is contained in:
你的Gitea用户名
2025-09-17 10:26:40 +08:00
commit c34abe68ed
18 changed files with 399 additions and 0 deletions

39
core/pom.xml Normal file
View File

@@ -0,0 +1,39 @@
<?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>
<!-- 核心模块信息无需重复groupId和version继承自父模块 -->
<artifactId>core</artifactId>
<name>Game Core</name>
<url>http://www.example.com</url>
<!-- 依赖配置(继承父模块的版本管理) -->
<dependencies>
<!-- 测试依赖(无需写版本号) -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<!-- 构建配置(使用父模块定义的插件版本) -->
<build>
<plugins>
<!-- 编译插件(继承父模块版本) -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,13 @@
package com.example;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}

View File

@@ -0,0 +1,20 @@
package com.example;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
/**
* Unit test for simple App.
*/
public class AppTest
{
/**
* Rigorous Test :-)
*/
@Test
public void shouldAnswerWithTrue()
{
assertTrue( true );
}
}

Binary file not shown.

Binary file not shown.