maven项目的常用依赖

mybatis

<dependency>
	<groupId>org.mybatis</groupId>
	<artifactId>mybatis</artifactId>
	<version>3.3.0</version>
</dependency>

jetty

<plugin> 
  <groupId>org.mortbay.jetty</groupId>  
  <artifactId>jetty-maven-plugin</artifactId>  
  <version>8.1.5.v20120716</version>  
  <configuration> 
    <stopKey>foo</stopKey>
    <stopPort>9999</stopPort>
    <scanIntervalSeconds>10</scanIntervalSeconds>  
    <webApp> 
      <contextPath>/</contextPath> 
    </webApp> 
  </configuration> 
</plugin>

spring

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-framework-bom</artifactId>
            <version>4.1.1.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
<dependencies>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
    </dependency>
<dependencies>

只有当外层的dependency元素中没有指明版本信息时,dependencyManagement中的dependencies元素才会起作用

从spring-core模块中移除掉commons-logging

<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-context</artifactId>
  <exclusions>
    <!-- Exclude Commons Logging in favor of SLF4j -->
    <exclusion>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
    </exclusion>
  </exclusions>
</dependency>

使用SLF4J

  <!-- Logging -->  
  <dependency> 
    <groupId>org.slf4j</groupId>  
    <artifactId>jcl-over-slf4j</artifactId>  
    <version>1.5.8</version> 
  </dependency>  
  <dependency> 
    <groupId>org.slf4j</groupId>  
    <artifactId>slf4j-api</artifactId>  
    <version>1.5.8</version> 
  </dependency>  
  <dependency> 
    <groupId>org.slf4j</groupId>  
    <artifactId>slf4j-log4j12</artifactId>  
    <version>1.5.8</version> 
  </dependency>  
  <dependency> 
    <groupId>log4j</groupId>  
    <artifactId>log4j</artifactId>  
    <version>1.2.14</version> 
  </dependency>


hibernate

struts2

mysql

junit

<dependency>
	<groupId>junit</groupId>
	<artifactId>junit</artifactId>
	<version>4.11</version>
</dependency>



你可能感兴趣的:(maven项目的常用依赖)