`
最王座
  • 浏览: 137116 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

整合SSH之pom.xml文件配置

阅读更多

整合Struts2+Spring+HIbernate时Maven(3.3.3)的pom.xml文件的配置

 

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.wbf.ssh</groupId>
	<artifactId>ssh</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>war</packaging>
	<name />
	<description />
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	<dependencies>
		<dependency>
			<groupId>javax</groupId>
			<artifactId>javaee-api</artifactId>
			<version>7.0</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.glassfish.web</groupId>
			<artifactId>javax.servlet.jsp.jstl</artifactId>
			<version>1.2.2</version>
		</dependency>
		
		<!-- junit -->  
        <dependency>  
            <groupId>junit</groupId>  
            <artifactId>junit</artifactId>  
            <version>4.12</version>  
            <scope>test</scope>  
        </dependency>  
          
        <!-- log4j -->  
        <dependency>  
            <groupId>log4j</groupId>  
            <artifactId>log4j</artifactId>  
            <version>1.2.17</version>  
        </dependency>
        
        <!-- spring3 -->  
        <dependency>  
            <groupId>org.springframework</groupId>  
            <artifactId>spring-core</artifactId>  
            <version>3.2.12.RELEASE</version>  
        </dependency>  
        <dependency>  
            <groupId>org.springframework</groupId>  
            <artifactId>spring-context</artifactId>  
            <version>3.2.12.RELEASE</version>  
        </dependency>  
        <dependency>  
            <groupId>org.springframework</groupId>  
            <artifactId>spring-jdbc</artifactId>  
            <version>3.2.12.RELEASE</version>  
        </dependency>  
        <dependency>  
            <groupId>org.springframework</groupId>  
            <artifactId>spring-beans</artifactId>  
            <version>3.2.12.RELEASE</version>  
        </dependency>  
        <dependency>  
            <groupId>org.springframework</groupId>  
            <artifactId>spring-web</artifactId>  
            <version>3.2.12.RELEASE</version>  
        </dependency>  
        <dependency>  
            <groupId>org.springframework</groupId>  
            <artifactId>spring-expression</artifactId>  
            <version>3.2.12.RELEASE</version>  
        </dependency>  
        <dependency>  
            <groupId>org.springframework</groupId>  
            <artifactId>spring-orm</artifactId>  
            <version>3.2.12.RELEASE</version>  
        </dependency>  
		
		<!-- struts2 -->  
        <dependency>  
            <groupId>org.apache.struts</groupId>  
            <artifactId>struts2-core</artifactId>  
            <version>2.3.20.1</version>  
            <exclusions>  
                <exclusion>  
                    <groupId>javassist</groupId>  
                    <artifactId>javassist</artifactId>  
                </exclusion>  
            </exclusions>  
        </dependency>  
        <dependency>  
            <groupId>org.apache.struts</groupId>  
            <artifactId>struts2-spring-plugin</artifactId>  
            <version>2.3.20.1</version>  
        </dependency>  
        <dependency>  
            <groupId>org.apache.struts</groupId>  
            <artifactId>struts2-convention-plugin</artifactId>  
            <version>2.3.20.1</version>  
        </dependency>  
		
		<!-- hibernate4 -->  
        <dependency>  
            <groupId>org.hibernate</groupId>  
            <artifactId>hibernate-core</artifactId>  
            <version>4.2.16.Final</version>  
        </dependency> 
		
		<!-- druid -->    
        <dependency>    
            <groupId>com.alibaba</groupId>    
            <artifactId>druid</artifactId>    
            <version>1.0.13</version>    
        </dependency>  
          
        <!-- mysql数据库驱动 -->    
        <dependency>    
            <groupId>mysql</groupId>    
            <artifactId>mysql-connector-java</artifactId>    
            <version>5.1.35</version>    
        </dependency>
        
        <!-- aspectjweaver -->  
        <dependency>  
            <groupId>org.aspectj</groupId>  
            <artifactId>aspectjweaver</artifactId>  
            <version>1.8.5</version>  
        </dependency>
        
	</dependencies>
	<build>
		<plugins>
			<!-- 清除插件 -->  
            <plugin>  
                <groupId>org.apache.maven.plugins</groupId>  
                <artifactId>maven-clean-plugin</artifactId>  
                <version>2.6.1</version>  
            </plugin>  
            <!-- 编译插件 -->  
            <plugin>  
                <groupId>org.apache.maven.plugins</groupId>  
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>  
                <configuration>  
                    <source>1.6</source>  
                    <target>1.6</target>  
                    <encoding>utf-8</encoding>  
                </configuration>  
            </plugin>  
            <!-- 单元测试插件 -->  
            <plugin>  
                <groupId>org.apache.maven.plugins</groupId>  
                <artifactId>maven-surefire-plugin</artifactId>  
                <version>2.18.1</version>  
                <configuration>  
                    <argLine>-Dfile.encoding=UTF-8</argLine>  
                    <skip>false</skip>  
                    <testFailureIgnore>true</testFailureIgnore>  
                </configuration>  
            </plugin>  
            <!-- 打包插件 -->  
            <plugin>  
                <groupId>org.apache.maven.plugins</groupId>  
                <artifactId>maven-war-plugin</artifactId>  
                <version>2.6</version>  
            </plugin>  
            <plugin>  
                <groupId>org.apache.maven.plugins</groupId>  
                <artifactId>maven-jar-plugin</artifactId>  
                <version>2.6</version>  
            </plugin>  
            <!-- 安装插件 -->  
            <plugin>  
                <groupId>org.apache.maven.plugins</groupId>  
                <artifactId>maven-install-plugin</artifactId>  
                <version>2.5.2</version>  
            </plugin>  
            <!-- 资源文件(默认src/main/resources)处理插件 -->  
            <plugin>  
                <groupId>org.apache.maven.plugins</groupId>  
                <artifactId>maven-resources-plugin</artifactId>  
                <version>2.7</version>  
            </plugin>  
            <!-- 生成源码插件 -->  
            <plugin>  
                <artifactId>maven-source-plugin</artifactId>  
                <version>2.4</version>  
                <executions>  
                    <execution>  
                        <!-- 当把项目打包成jar、war等时,为其生成源代码jar包 -->  
                        <phase>package</phase>  
                        <goals>  
                            <goal>jar-no-fork</goal>  
                        </goals>  
                    </execution>  
                </executions>  
            </plugin> 
		</plugins>
	</build>
</project>

 

 

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics