Fork me on GitHub
  1 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  3     <modelVersion>4.0.0</modelVersion>
  4     <groupId>com.baidu.mavenweb</groupId>
  5     <artifactId>mavenweb</artifactId>
  6     <version>0.0.1-SNAPSHOT</version>
  7     <packaging>war</packaging>
  8     
  9     <!--以值替代名称,Properties可以在整个POM中使用。格式是<name>value</name>。 -->  
 10 <properties>  
 11     <!-- spring版本号 -->  
 12     <spring.version>4.3.4.RELEASE</spring.version>  
 13 </properties>  
 14     <build>
 15         <plugins>
 16             <plugin>
 17                 <groupId>org.apache.maven.plugins</groupId>
 18                 <artifactId>maven-compiler-plugin</artifactId>
 19                 <version>2.3.2</version>
 20                 <configuration>
 21                     <source>1.7</source>
 22                     <target>1.7</target>
 23                 </configuration>
 24             </plugin>
 25 
 26             <plugin>
 27                 <groupId>org.apache.tomcat.maven</groupId>
 28                 <artifactId>tomcat7-maven-plugin</artifactId>
 29                 <version>2.2</version>
 30                 <configuration>
 31                     <!-- 指定端口 -->
 32                     <port>8080</port>
 33                     <!-- 请求路径 -->
 34                     <path>/</path>
 35                 </configuration>
 36             </plugin>
 37             <plugin>
 38                 <groupId>org.codehaus.mojo</groupId>
 39                 <artifactId>tomcat-maven-plugin</artifactId>
 40                 <version>1.1</version>
 41             </plugin>
 42         </plugins>
 43     </build>
 44     <dependencies>
 45         <dependency>
 46             <groupId>javax.servlet</groupId>
 47             <artifactId>servlet-api</artifactId>
 48             <version>2.5</version>
 49             <!-- 编译但不打包  由于  服务器也有  会发生冲突   会报错 -->
 50             <scope>provided</scope>
 51         </dependency>
 52         <!-- 解决了jsp错误问题 -->
 53         <dependency>
 54             <groupId>javax.servlet</groupId>
 55             <artifactId>jsp-api</artifactId>
 56             <version>2.0</version>
 57             <scope>provided</scope>
 58         </dependency>
 59         
 60         <!-- 日志文件管理依赖 -->  
 61     <!-- java日志:slf4j,log4j,logback,common-logging; slf4j 是规范/接口 ;日志实现:log4j,logback,common-logging -->  
 62     <!-- log start -->  
 63     <dependency>  
 64         <groupId>org.slf4j</groupId>  
 65         <artifactId>slf4j-api</artifactId>  
 66         <version>1.7.12</version>  
 67     </dependency>  
 68     <dependency>  
 69         <groupId>ch.qos.logback</groupId>  
 70         <artifactId>logback-core</artifactId>  
 71         <version>1.1.1</version>  
 72     </dependency>  
 73     <dependency>  
 74         <groupId>ch.qos.logback</groupId>  
 75         <artifactId>logback-classic</artifactId>  
 76         <version>1.1.1</version>  
 77     </dependency>  
 78     <dependency>  
 79         <groupId>log4j</groupId>  
 80         <artifactId>log4j</artifactId>  
 81         <version>1.2.16</version>  
 82     </dependency>  
 83     
 84     <!-- 数据库相关依赖 -->  
 85     <!-- mysql数据库驱动 -->  
 86     <dependency>  
 87         <groupId>mysql</groupId>  
 88         <artifactId>mysql-connector-java</artifactId>  
 89         <version>5.1.35</version>  
 90     </dependency>  
 91     <!-- c3p0数据库连接池 -->  
 92     <dependency>  
 93         <groupId>c3p0</groupId>  
 94         <artifactId>c3p0</artifactId>  
 95         <version>0.9.1.2</version>  
 96     </dependency>  
 97         <!-- Struts2 start -->  
 98     <!-- Struts2 核心包 -->  
 99     <dependency>  
100         <groupId>org.apache.struts</groupId>  
101         <artifactId>struts2-core</artifactId>  
102         <version>2.3.14</version>  
103         <!-- 这里的 exclusions 是排除包,因为 Struts2中有javassist,Hibernate中也有javassist,   
104             所以如果要整合Hibernate,一定要排除掉Struts2中的javassist,否则就冲突了。 -->  
105         <exclusions>  
106             <exclusion>  
107                 <groupId>javassist</groupId>  
108                 <artifactId>javassist</artifactId>  
109             </exclusion>  
110         </exclusions>  
111     </dependency>  
112     <!-- strus2整合spring的插件包 -->  
113     <dependency>  
114         <groupId>org.apache.struts</groupId>  
115         <artifactId>struts2-spring-plugin</artifactId>  
116         <version>2.3.14</version>  
117     </dependency>  
118     <!--使用了这个插件之后,就可以很方便的浏览项目中的所有action及其与 jsp view的映射 -->  
119     <dependency>  
120         <groupId>org.apache.struts</groupId>  
121         <artifactId>struts2-config-browser-plugin</artifactId>  
122         <version>2.3.14</version>  
123     </dependency>  
124     <!-- strus2的支持注解的包 -->  
125     <dependency>  
126         <groupId>org.apache.struts</groupId>  
127         <artifactId>struts2-convention-plugin</artifactId>  
128         <version>2.3.14</version>  
129     </dependency>  
130     <!-- Struts2 end -->  
131     
132      <!-- Spring start -->  
133     <!-- Spring 核心依赖 -->  
134     <dependency>  
135         <groupId>org.springframework</groupId>  
136         <artifactId>spring-core</artifactId>  
137         <version>${spring.version}</version>  
138     </dependency>  
139     <dependency>  
140         <groupId>org.springframework</groupId>  
141         <artifactId>spring-beans</artifactId>  
142         <version>${spring.version}</version>  
143     </dependency>  
144     <dependency>  
145         <groupId>org.springframework</groupId>  
146         <artifactId>spring-context</artifactId>  
147         <version>${spring.version}</version>  
148     </dependency>  
149     <dependency>  
150         <groupId>org.springframework</groupId>  
151         <artifactId>spring-context-support</artifactId>  
152         <version>${spring.version}</version>  
153     </dependency>  
154     <!-- Spring DAO层依赖 -->  
155     <dependency>  
156         <groupId>org.springframework</groupId>  
157         <artifactId>spring-jdbc</artifactId>  
158         <version>${spring.version}</version>  
159     </dependency>  
160     <dependency>  
161         <groupId>org.springframework</groupId>  
162         <artifactId>spring-tx</artifactId>  
163         <version>${spring.version}</version>  
164     </dependency>  
165     <!-- Spring web相关依赖 -->  
166     <dependency>  
167         <groupId>org.springframework</groupId>  
168         <artifactId>spring-web</artifactId>  
169         <version>${spring.version}</version>  
170     </dependency>  
171     <!-- Spring 单元测试依赖 -->  
172     <dependency>  
173         <groupId>org.springframework</groupId>  
174         <artifactId>spring-test</artifactId>  
175         <version>${spring.version}</version>  
176         <scope>test</scope>  
177     </dependency>  
178     <!-- Spring 表达式语言依赖 -->  
179     <dependency>  
180         <groupId>org.springframework</groupId>  
181         <artifactId>spring-expression</artifactId>  
182         <version>${spring.version}</version>  
183     </dependency>  
184     <!-- Spring aop依赖 -->  
185     <dependency>  
186         <groupId>org.springframework</groupId>  
187         <artifactId>spring-aop</artifactId>  
188         <version>${spring.version}</version>  
189     </dependency>  
190     <dependency>  
191         <groupId>org.springframework</groupId>  
192         <artifactId>spring-aspects</artifactId>  
193         <version>${spring.version}</version>  
194     </dependency>  
195     <!-- Spring 整合Hibernate依赖 -->  
196     <dependency>  
197         <groupId>org.springframework</groupId>  
198         <artifactId>spring-orm</artifactId>  
199         <version>${spring.version}</version>  
200     </dependency>  
201     <!-- Spring end -->  
202   
203     <!-- 添加Hibernate依赖 -->  
204     <dependency>  
205         <groupId>org.hibernate</groupId>  
206         <artifactId>hibernate-core</artifactId>  
207         <version>5.0.7.Final</version>  
208     </dependency>  
209   
210     <!-- Servlet Web相关依赖 -->  
211     <dependency>  
212         <groupId>taglibs</groupId>  
213         <artifactId>standard</artifactId>  
214         <version>1.1.2</version>  
215     </dependency>  
216     <!-- JSTL标签类 -->  
217     <dependency>  
218         <groupId>jstl</groupId>  
219         <artifactId>jstl</artifactId>  
220         <version>1.2</version>  
221     </dependency>  
222     <!-- JSON依赖 -->  
223     <dependency>  
224         <groupId>com.fasterxml.jackson.core</groupId>  
225         <artifactId>jackson-databind</artifactId>  
226         <version>2.5.4</version>  
227     </dependency>  
228     <dependency>  
229         <groupId>org.codehaus.jackson</groupId>  
230         <artifactId>jackson-mapper-asl</artifactId>  
231         <version>1.9.13</version>  
232     </dependency>  
233    
234     </dependencies>
235 </project>
View Code

 

posted on 2017-12-04 16:35  TopTime  阅读(572)  评论(0编辑  收藏  举报