项目作者: ghusta

项目描述 :
BOM for Apache Tomcat 7.0.x / 8.0.x / 8.5.x / 9.0.x
高级语言:
项目地址: git://github.com/ghusta/tomcat-provided-spec-bom.git
创建时间: 2016-09-22T13:28:57Z
项目社区:https://github.com/ghusta/tomcat-provided-spec-bom

开源协议:

下载


Maven BOM for Tomcat 8.5 provided dependencies

A Maven BOM to simplify dependencies management in your webapp.

Provided specifications

The versions used are summarized here :
Apache Tomcat Versions

Specifications used with Tomcat versions are detailed here :
Specifications

Usage

The BOM must be imported as scope “import” with the “pom” type, in the dependencyManagement section.

  1. <dependencyManagement>
  2. <dependencies>
  3. <dependency>
  4. <groupId>fr.husta.tomcat</groupId>
  5. <artifactId>tomcat-provided-spec-bom</artifactId>
  6. <version>8.5</version>
  7. <type>pom</type>
  8. <scope>import</scope>
  9. </dependency>
  10. </dependencies>
  11. </dependencyManagement>

Then, simply import the needed dependency without specifying the version.

  1. <dependencies>
  2. <dependency>
  3. <groupId>javax.servlet</groupId>
  4. <artifactId>javax.servlet-api</artifactId>
  5. <scope>provided</scope>
  6. </dependency>
  7. </dependencies>

Maven documentation

About the “bill of materials” (BOM) : Introduction to the Dependency Mechanism

Another example of BOM usage with Spring Framework : http://platform.spring.io/platform/#quick-start