Update 10.1.1. Maven installation.md

master
qibaoguang 2015-05-15 10:10:43 +08:00
parent 252dd23e9c
commit 1f5852d988
1 changed files with 3 additions and 3 deletions

View File

@ -4,9 +4,9 @@ Spring Boot兼容Apache Maven 3.2或更高版本。如果没有安装Maven
**注**在很多操作系统上你可以通过一个包管理器安装Maven。如果你是一个OSX Homebrew用户可以尝试`brew install maven`。Ubuntu用户可以运行`sudo apt-get install maven`。
Spring Boot依赖的`groupId`为`org.springframework.boot`。通常你的Maven POM文件需要继承`spring-boot-starter-parent`,然后声明一个或多个[“Starter POMs”](../III. Using Spring Boot/13.4. Starter POMs.md)依赖。Spring Boot也提供了一个用于创建可执行jars的[Maven插件](../VIII. Build tool plugins/58. Spring Boot Maven plugin.md)。
Spring Boot依赖的groupId为`org.springframework.boot`。通常你的Maven POM文件需要继承`spring-boot-starter-parent`,然后声明一个或多个[“Starter POMs”](../III. Using Spring Boot/13.4. Starter POMs.md)依赖。Spring Boot也提供了一个用于创建可执行jars的[Maven插件](../VIII. Build tool plugins/58. Spring Boot Maven plugin.md)。
下面是一个典型的`pom.xml`文件:
下面是一个典型的pom.xml文件
```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"
@ -67,4 +67,4 @@ Spring Boot依赖的`groupId`为`org.springframework.boot`。通常你的Maven P
</pluginRepositories>
</project>
```
**注**`spring-boot-starter-parent`是使用Spring Boot的一个不错的方式但它不总是合适的。有时你需要继承一个不同的parent POM或者你可能只是不喜欢我们的默认配置。查看[Section 13.1.2, “Using Spring Boot without the parent POM”](../III. Using Spring Boot/13.1.2. Using Spring Boot without the parent POM.md)获取使用`import`的替代解决方案。
**注**`spring-boot-starter-parent`是使用Spring Boot的一个不错的方式但它不总是合适的。有时你需要继承一个不同的parent POM或者你可能只是不喜欢我们的默认配置。查看[Section 13.1.2, “Using Spring Boot without the parent POM”](../III. Using Spring Boot/13.1.2. Using Spring Boot without the parent POM.md)获取使用import的替代解决方案。