### 10.1.1. Maven安装 Spring Boot兼容Apache Maven 3.2或更高版本。如果没有安装Maven,你可以参考[maven.apache.org](http://maven.apache.org/)指南。 **注**:在很多操作系统上,你可以通过一个包管理器安装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”](http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#using-boot-starter-poms)依赖。Spring Boot也提供了一个用于创建可执行jars的[Maven插件](http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#build-tool-plugins-maven-plugin)。 下面是一个典型的`pom.xml`文件: ```xml 4.0.0 com.example myproject 0.0.1-SNAPSHOT org.springframework.boot spring-boot-starter-parent 1.3.0.BUILD-SNAPSHOT org.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-maven-plugin spring-snapshots http://repo.spring.io/snapshot true spring-milestones http://repo.spring.io/milestone spring-snapshots http://repo.spring.io/snapshot spring-milestones http://repo.spring.io/milestone ``` **注**:`spring-boot-starter-parent`是使用Spring Boot的一个不错的方式,但它不总是合适的。有时你需要继承一个不同的parent POM,或者你可能只是不喜欢我们的默认配置。查看[Section 13.1.2, “Using Spring Boot without the parent POM”](http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#using-boot-maven-without-a-parent)获取使用`import`的替代解决方案。