82 lines
2.5 KiB
XML
82 lines
2.5 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0">
|
||
|
||
<modelVersion>4.0.0</modelVersion>
|
||
|
||
<groupId>uno.mloluyu</groupId>
|
||
|
||
<artifactId>game</artifactId>
|
||
|
||
<version>1.0-SNAPSHOT</version>
|
||
|
||
<packaging>jar</packaging>
|
||
|
||
<dependencies>
|
||
<dependency>
|
||
<groupId>com.badlogicgames.gdx</groupId>
|
||
<artifactId>gdx</artifactId>
|
||
<version>${gdx.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>com.badlogicgames.gdx</groupId>
|
||
<artifactId>gdx-backend-lwjgl3</artifactId>
|
||
<version>${gdx.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>com.badlogicgames.gdx</groupId>
|
||
<artifactId>gdx-platform</artifactId>
|
||
<version>${gdx.version}</version>
|
||
<classifier>natives-desktop</classifier>
|
||
</dependency>
|
||
</dependencies>
|
||
|
||
<build>
|
||
<plugins>
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-compiler-plugin</artifactId>
|
||
<version>3.13.0</version>
|
||
<configuration>
|
||
<!-- 建议使用与LibGDX兼容的JDK版本,11或17比较合适 -->
|
||
<source>17</source>
|
||
<target>17</target>
|
||
<!-- 移除不必要的预览特性,除非确实需要 -->
|
||
</configuration>
|
||
</plugin>
|
||
|
||
<plugin>
|
||
<groupId>org.codehaus.mojo</groupId>
|
||
<artifactId>exec-maven-plugin</artifactId>
|
||
<version>3.1.0</version>
|
||
<configuration>
|
||
<!-- 确保这个类路径与你实际的Launcher类位置一致 -->
|
||
<!-- 例如:如果你的类文件在src/main/java/uno/mloluyu/Launcher.java -->
|
||
<mainClass>uno.mloluyu.Launcher</mainClass>
|
||
</configuration>
|
||
</plugin>
|
||
|
||
<!-- 添加运行时类路径配置,解决类找不到问题 -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-jar-plugin</artifactId>
|
||
<version>3.3.0</version>
|
||
<configuration>
|
||
<archive>
|
||
<manifest>
|
||
<addClasspath>true</addClasspath>
|
||
<mainClass>uno.mloluyu.Launcher</mainClass>
|
||
</manifest>
|
||
</archive>
|
||
</configuration>
|
||
</plugin>
|
||
</plugins>
|
||
</build>
|
||
|
||
<properties>
|
||
<maven.compiler.source>17</maven.compiler.source>
|
||
<maven.compiler.target>17</maven.compiler.target>
|
||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||
<gdx.version>1.12.1</gdx.version>
|
||
</properties>
|
||
</project>
|