这两天用maven整合ssh, 难的地方就在于jar的依赖上, 下面是我完成基本整合的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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>hk.ces</groupId>
<artifactId>Test</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>Test Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.0.14</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<!-- spring base configure -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.5.6</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>2.0.14</version>
<type>jar</type>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>spring-beans</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-core</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-context</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>spring-web</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>transaction-api</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.6.ga</version>
<type>jar</type>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>jta</artifactId>
<groupId>javax.transaction</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1.2</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>2.1_3</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.9</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2.2</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<!-- spring 集成 jta分布式事务 -->
<dependency>
<groupId>jotm</groupId>
<artifactId>jotm</artifactId>
<version>2.0.10</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.experlog</groupId>
<artifactId>xapool</artifactId>
<version>1.5.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<finalName>Test</finalName>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<!-- 添加maven hibernate plugin -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.2</version>
</plugin>
<!-- 配制compiler 插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>utf-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>endorsed</id>
<activation>
<jdk>1.6</jdk>
</activation>
</profile>
</profiles>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
分享到:
相关推荐
SSH是JavaEE中三种框架(Struts+Spring+Hibernate)的集成框架,是目前比较流行的一种Java Web开源框架。 SSH主要用于Java Web的开发。现在SSH有SSH1和SSH2两种,区别在于Struts的版本是struts1.x还是2.x。
用注解的方式集成struts+spring+hirbnate开发网站web应用
maven整合ssh框架、ehcache搭建、可直接运行导入运行
MAVEN项目:HibernateSearchDemo IDE :MyEclipse jdk :1.6 数据库 :MySql 应用服务器:Tomcat struts2版本 2.3.4 spring版本 3.2.6.RELEASE hibernate版本 4.2.8.Final hibernate search 版本 4.4.1.Final
Jenkins + Maven + SVN + SSH持续集成 图文结合
Jenkins + Maven + SVN + SSH持续集成实战手册
使用maven管理,集成SSH框架和shiro的学生管理系统 资源/模板下的页面文件是freemarker的,当前该项目已经注释掉了配置,该文件夹的内容无用。 由于mysql的jdbc版本的问题,如果不幸报错,就只能在jdbc的链接上或...
一个小型maven管理的ssh框架开发的人员管理网站,能基本对与ssh框架有一个基本了解,内容也不多,框架条理都分好了,易于学习。配置文件都有注解。默认字符集为UTF-8,数据库直接按照bean创建就行,注解形式无法自动...
SSH框架整合(spring+spring mvc+hibernate+bootstrap+maven)开发学生籍贯后台管理系统
如何安装maven 来管理架包 下载完之后还可以看下我上传的用maven 来搭建ssm
使用Maven核心概念介绍(坐标、依赖、仓库、插件、生命周期等)、Maven与第三方Elicpse整合及如何在Eclipse中使用Maven、什么是私服、Maven为什么...Web应用、使用Maven构建SSH应用、使用Maven进行测试、什么是持续集成等...
SSH项目 有Freemarker模版 原本带的还有maven 但是被我简化掉了
SSH框架详细整合(Spring5+HIbernate5+Maven);maven:jar包管理仓库,方便引用可以打包,项目结构也比经典的WEB项目要清晰。
本文以部署 Spring boot + Maven 项目为例,使用码云作为代码托管仓库,在 CentOS 7 上搭建 Jenkins 持续集成环境。 1. 准备工作 1.1 安装 Java 环境 Jenkins 是基于 Java 开发的持续集成工具,需要在 Java 环境下...
JQuery1.4.2+Struts2.1.8+JSON0.34+Spring2.5.6+Hibernate3.5+...7、源文件使用maven的文件结构。这个项目只是做个示例,未经实用,有些代码可能写的不是很完整,仅供参考,有什么问题欢迎给我留言,或者QQ523260276。
struts+spring+hibernate+maven+easyui, 已经实现后台对资源的管理,数据表自动生成,框架可以重复使用
Eclipse Che 是一个高性能的基于浏览器的集成开发环境,通过提供结构化的...构建工具支持:Ant、Bower、Grunt、Gulp、Maven 和 Npm支持开发工具链:Code Mirror、Git、Orion、SSH、Subversion 标签:Eclipse
这个是做深圳市家顺康企业微信中一个应用的功能,程序我采用maven,集成SSH,页面用jquery mobile写的。源码里面基本注释都有,里面的数据库实体映射采用hibernate注解方式 注入bean采用sprig注解方式,结果客户要求...
里面包含了Jenkins的war包,以及已经包含了maven的、ssh、svn的插件集成,只需高级安装选择插件文件就行了,另外里面也有写了一套的远程部署脚本