关于:maven项目中pom.xml文件添加依赖无法自动搜索的问题

用的是eclipse

1.Window------>Show View------->Maven Repositories(这个选项一般不直接显示,而在others里面)

2.操作完毕后会在 Console同属的状态栏位置出现一个 

  其结构为

3.Workspace Projects 下面就是项目包,然后在项目包和资源库包上右键 Workspace Projects

 

好了,接下来要慢慢等,等他加载完毕就可以了;

 

  1. <properties>  
  2.         <!-- spring版本号 -->  
  3.         <spring.version>4.0.2.RELEASE</spring.version>  
  4.         <!-- mybatis版本号 -->  
  5.         <mybatis.version>3.2.6</mybatis.version>  
  6.         <!-- log4j日志文件管理包版本 -->  
  7.         <slf4j.version>1.7.7</slf4j.version>  
  8.         <log4j.version>1.2.17</log4j.version>  
  9.     </properties>  
  10.   
  11.     <dependencies>  
  12.         <dependency>  
  13.             <groupId>junit</groupId>  
  14.             <artifactId>junit</artifactId>  
  15.             <version>4.11</version>  
  16.             <!-- 表示开发的时候引入,发布的时候不会加载此包 -->  
  17.             <scope>test</scope>  
  18.         </dependency>  
  19.         <!-- spring核心包 -->  
  20.         <dependency>  
  21.             <groupId>org.springframework</groupId>  
  22.             <artifactId>spring-core</artifactId>  
  23.             <version>${spring.version}</version>  
  24.         </dependency>  
  25.   
  26.         <dependency>  
  27.             <groupId>org.springframework</groupId>  
  28.             <artifactId>spring-web</artifactId>  
  29.             <version>${spring.version}</version>  
  30.         </dependency>  
  31.         <dependency>  
  32.             <groupId>org.springframework</groupId>  
  33.             <artifactId>spring-oxm</artifactId>  
  34.             <version>${spring.version}</version>  
  35.         </dependency>  
  36.         <dependency>  
  37.             <groupId>org.springframework</groupId>  
  38.             <artifactId>spring-tx</artifactId>  
  39.             <version>${spring.version}</version>  
  40.         </dependency>  
  41.   
  42.         <dependency>  
  43.             <groupId>org.springframework</groupId>  
  44.             <artifactId>spring-jdbc</artifactId>  
  45.             <version>${spring.version}</version>  
  46.         </dependency>  
  47.   
  48.         <dependency>  
  49.             <groupId>org.springframework</groupId>  
  50.             <artifactId>spring-webmvc</artifactId>  
  51.             <version>${spring.version}</version>  
  52.         </dependency>  
  53.         <dependency>  
  54.             <groupId>org.springframework</groupId>  
  55.             <artifactId>spring-aop</artifactId>  
  56.             <version>${spring.version}</version>  
  57.         </dependency>  
  58.   
  59.         <dependency>  
  60.             <groupId>org.springframework</groupId>  
  61.             <artifactId>spring-context-support</artifactId>  
  62.             <version>${spring.version}</version>  
  63.         </dependency>  
  64.   
  65.         <dependency>  
  66.             <groupId>org.springframework</groupId>  
  67.             <artifactId>spring-test</artifactId>  
  68.             <version>${spring.version}</version>  
  69.         </dependency>  
  70.         <!-- mybatis核心包 -->  
  71.         <dependency>  
  72.             <groupId>org.mybatis</groupId>  
  73.             <artifactId>mybatis</artifactId>  
  74.             <version>${mybatis.version}</version>  
  75.         </dependency>  
  76.         <!-- mybatis/spring包 -->  
  77.         <dependency>  
  78.             <groupId>org.mybatis</groupId>  
  79.             <artifactId>mybatis-spring</artifactId>  
  80.             <version>1.2.2</version>  
  81.         </dependency>  
  82.         <!-- 导入java ee jar 包 -->  
  83.         <dependency>  
  84.             <groupId>javax</groupId>  
  85.             <artifactId>javaee-api</artifactId>  
  86.             <version>7.0</version>  
  87.         </dependency>  
  88.         <!-- 导入Mysql数据库链接jar包 -->  
  89.         <dependency>  
  90.             <groupId>mysql</groupId>  
  91.             <artifactId>mysql-connector-java</artifactId>  
  92.             <version>5.1.30</version>  
  93.         </dependency>  
  94.         <!-- 导入dbcp的jar包,用来在applicationContext.xml中配置数据库 -->  
  95.         <dependency>  
  96.             <groupId>commons-dbcp</groupId>  
  97.             <artifactId>commons-dbcp</artifactId>  
  98.             <version>1.2.2</version>  
  99.         </dependency>  
  100.         <!-- JSTL标签类 -->  
  101.         <dependency>  
  102.             <groupId>jstl</groupId>  
  103.             <artifactId>jstl</artifactId>  
  104.             <version>1.2</version>  
  105.         </dependency>  
  106.         <!-- 日志文件管理包 -->  
  107.         <!-- log start -->  
  108.         <dependency>  
  109.             <groupId>log4j</groupId>  
  110.             <artifactId>log4j</artifactId>  
  111.             <version>${log4j.version}</version>  
  112.         </dependency>  
  113.           
  114.           
  115.         <!-- 格式化对象,方便输出日志 -->  
  116.         <dependency>  
  117.             <groupId>com.alibaba</groupId>  
  118.             <artifactId>fastjson</artifactId>  
  119.             <version>1.1.41</version>  
  120.         </dependency>  
  121.   
  122.   
  123.         <dependency>  
  124.             <groupId>org.slf4j</groupId>  
  125.             <artifactId>slf4j-api</artifactId>  
  126.             <version>${slf4j.version}</version>  
  127.         </dependency>  
  128.   
  129.         <dependency>  
  130.             <groupId>org.slf4j</groupId>  
  131.             <artifactId>slf4j-log4j12</artifactId>  
  132.             <version>${slf4j.version}</version>  
  133.         </dependency>  
  134.         <!-- log end -->  
  135.         <!-- 映入JSON -->  
  136.         <dependency>  
  137.             <groupId>org.codehaus.jackson</groupId>  
  138.             <artifactId>jackson-mapper-asl</artifactId>  
  139.             <version>1.9.13</version>  
  140.         </dependency>  
  141.         <!-- 上传组件包 -->  
  142.         <dependency>  
  143.             <groupId>commons-fileupload</groupId>  
  144.             <artifactId>commons-fileupload</artifactId>  
  145.             <version>1.3.1</version>  
  146.         </dependency>  
  147.         <dependency>  
  148.             <groupId>commons-io</groupId>  
  149.             <artifactId>commons-io</artifactId>  
  150.             <version>2.4</version>  
  151.         </dependency>  
  152.         <dependency>  
  153.             <groupId>commons-codec</groupId>  
  154.             <artifactId>commons-codec</artifactId>  
  155.             <version>1.9</version>  
  156.         </dependency>  
  157.           
  158.           
  159.     </dependencies>
posted @ 2016-11-18 11:54  天涯已可  阅读(2646)  评论(0编辑  收藏  举报