root | db0b96f | 2025-04-20 06:46:16 +0000 | [diff] [blame] | 1 | <project xmlns="http://maven.apache.org/POM/4.0.0" |
| 2 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 3 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 |
| 4 | http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 5 | |
| 6 | <!-- 基本坐标 --> |
| 7 | <modelVersion>4.0.0</modelVersion> |
| 8 | <groupId>com.example</groupId> |
| 9 | <artifactId>simple-maven-project</artifactId> |
| 10 | <version>1.0-SNAPSHOT</version> |
| 11 | |
| 12 | <!-- 指定 Java 版本 --> |
| 13 | <properties> |
| 14 | <maven.compiler.source>1.8</maven.compiler.source> |
| 15 | <maven.compiler.target>1.8</maven.compiler.target> |
| 16 | </properties> |
| 17 | |
| 18 | <!-- 可选:添加执行插件,方便 mvn exec:java 直接运行 --> |
| 19 | <build> |
| 20 | <plugins> |
| 21 | <plugin> |
| 22 | <groupId>org.codehaus.mojo</groupId> |
| 23 | <artifactId>exec-maven-plugin</artifactId> |
| 24 | <version>3.1.0</version> |
| 25 | <configuration> |
| 26 | <mainClass>api.ApiMain</mainClass> |
| 27 | </configuration> |
| 28 | </plugin> |
| 29 | </plugins> |
| 30 | </build> |
| 31 | |
| 32 | </project> |