重大改版
 鱼翔空 2014-07-13 框架封装|   0 1917 
文章评分 90 次,平均分 5.0

框架的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>framework</groupId>
  <artifactId>framework</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>war</packaging>
  <name>framework</name>
  <description/>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <!-- 版本控制
            (1,2)   1<1.x<2
            [1,2]   1<=1.x<=2
            [1,)    x>1的版本
      -->
      <junit.version>[4,)</junit.version>
      <servlet-api.version>2.5</servlet-api.version>
      <jsp-api.version>2.1</jsp-api.version>
      <jstl.version>1.2</jstl.version>
      <spring.version>3.2.9.RELEASE</spring.version>
      <jackson.version>1.9.13</jackson.version>
      <hibernate.version>3.6.9.Final</hibernate.version>
      <hibernate.annotations>3.5.6-Final</hibernate.annotations>
      <jpa.version>1.0.0.Draft-10</jpa.version>
      <freemarker.version>2.3.20</freemarker.version>
      <aspectj.version>[1,2)</aspectj.version>
      <mybatis.version>[3,4)</mybatis.version>
      <mybatis-spring.version>1.2.2</mybatis-spring.version>
      <druid.version>[1,)</druid.version>
      <oracle.version>10.2.0.3.0</oracle.version>
      <hsqldb.version>2.3.2</hsqldb.version>
      <mysql.version>[5,)</mysql.version>
      <dom4j.version>1.6.1</dom4j.version>
      <gson.version>2.2.4</gson.version>
      <log4j.version>1.2.17</log4j.version>
      <slf4j.version>1.7.7</slf4j.version>
      <cglib.version>[3,)</cglib.version>
      <cxf.version>3.0.0</cxf.version>
      <fileupload.version>1.3.1</fileupload.version>
      <beanutils.version>[1.9,)</beanutils.version>
      <lang.version>3.3.2</lang.version>
      <dbutils.version>1.5</dbutils.version>
      <quartz.version>2.2.1</quartz.version>
      <thumbnailator.version>0.4.7</thumbnailator.version>
  </properties>
  <!-- 通过http://search.maven.org/找对应的jar -->
  <dependencies>
     <!-- junit  -->
     <!-- 
      * scope:是用来限制Dependency的作用范围的, 影响maven项目在各个生命周期时导入的package的状态
           compile:默认的scope,表示 dependency 都可以在生命周期中使用。而且,这些dependencies 会传递到依赖的项目中。
           provided:跟compile相似,但是表明了dependency 由JDK或者容器提供,例如Servlet AP和一些Java EE APIs。这个scope 只能作用在编译和测试时,同时没有传递性。        
           runtime:表示dependency不作用在编译时,但会作用在运行和测试时
           test:表示dependency作用在测试时,不作用在运行时。
           system:跟provided 相似,但是在系统中要以外部JAR包的形式提供,maven不会在repository查找它
           import:它只使用在<dependencyManagement>中,表示从其它的pom中导入dependency的配置
      -->
	 <dependency>
	     <groupId>junit</groupId>
	     <artifactId>junit</artifactId>
         <version>${junit.version}</version>
         <scope>test</scope>
	 </dependency>
	 <!-- 集成servlet -->
     <dependency>  
         <groupId>javax.servlet</groupId>  
         <artifactId>servlet-api</artifactId>  
         <version>${servlet-api.version}</version>  
     </dependency> 
     <dependency>
		 <groupId>javax.servlet.jsp</groupId>
		 <artifactId>jsp-api</artifactId>
		 <version>${jsp-api.version}</version>
	 </dependency>
     <dependency>
         <groupId>javax.servlet</groupId>
         <artifactId>jstl</artifactId>
         <version>${jstl.version}</version>
     </dependency> 
     <dependency>
	    <groupId>javax</groupId>
	    <artifactId>javaee-api</artifactId>
	    <version>6.0</version>
	    <scope>provided</scope>
	</dependency>
     <!-- 集成spring start -->
     <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-core</artifactId>
         <version>${spring.version}</version>
     </dependency>
     <dependency>
	     <groupId>org.springframework.batch</groupId>
	     <artifactId>spring-batch-core</artifactId>
	     <version>3.0.0.RELEASE</version>
	     <exclusions>
	         <exclusion>
	             <groupId>org.springframework</groupId>
	             <artifactId>spring-beans</artifactId>
	        </exclusion>
	    </exclusions>
	 </dependency>
	 <!-- 
     <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-beans</artifactId>
         <version>${spring.version}</version>
     </dependency>
      -->
      <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-context</artifactId>
         <version>${spring.version}</version>
     </dependency>
      <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-aop</artifactId>
         <version>${spring.version}</version>
     </dependency>
     <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-tx</artifactId>
         <version>${spring.version}</version>
     </dependency>
     <!--数据源依赖项datasource  -->
     <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jdbc</artifactId>
        <version>${spring.version}</version>
     </dependency>
     <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
        <version>${spring.version}</version>
     </dependency>
     <!-- aop依赖 -->
     <dependency>
        <groupId>org.aspectj</groupId>
        <artifactId>aspectjrt</artifactId>
        <version>${aspectj.version}</version>
     </dependency>
      <dependency>
        <groupId>org.aspectj</groupId>
        <artifactId>aspectjweaver</artifactId>
        <version>${aspectj.version}</version>
     </dependency>
     <!-- springmvc -->
      <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-webmvc</artifactId>
         <version>${spring.version}</version>
     </dependency>
     <!-- 视图解析依赖 -->
     <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-context-support</artifactId>
         <version>${spring.version}</version>
     </dependency>
     <!-- spring 测试 -->
     <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-test</artifactId>
         <version>${spring.version}</version>
     </dependency>
     <!-- 避免IE执行AJAX时,返回JSON出现下载文件 所需jar -->
     <dependency>
         <groupId>org.codehaus.jackson</groupId>
         <artifactId>jackson-core-asl</artifactId>
         <version>${jackson.version}</version>
     </dependency>
     <dependency>
         <groupId>org.codehaus.jackson</groupId>
         <artifactId>jackson-mapper-asl</artifactId>
         <version>${jackson.version}</version>
     </dependency>
     <!-- 集成spring end -->
     <!-- 集成freemarker -->
      <dependency>
        <groupId>org.freemarker</groupId>
        <artifactId>freemarker</artifactId>
        <version>${freemarker.version}</version>
     </dependency>
     <!-- 集成 sitemesh
     <dependency>
	   <groupId>org.sitemesh</groupId>
	   <artifactId>sitemesh</artifactId>
	   <version>3.0-alpha-2</version>
	 </dependency>
	  -->
     <!-- 集成hibernate自动建表所需jar  start-->
       <!-- 实体注解 -->
     <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-annotations</artifactId>
        <version>${hibernate.annotations}</version>
     </dependency>
     <dependency>
        <groupId>org.javassist</groupId>
        <artifactId>javassist</artifactId>
        <version>3.18.2-GA</version>
     </dependency>
     <!-- 
      <dependency>
        <groupId>org.hibernate.javax.persistence</groupId>
        <artifactId>hibernate-jpa-2.1-api</artifactId>
        <version>${jpa.version}</version>
     </dependency>
      -->
     <!-- 集成hibernate自动建表所需jar  end-->
     <!-- 集成mybatis -->
     <dependency>
         <groupId>org.mybatis</groupId>
         <artifactId>mybatis</artifactId>
         <version>${mybatis.version}</version>
     </dependency>
     <!-- mybatis和spring集成插件  -->
     <dependency>
         <groupId>org.mybatis</groupId>
         <artifactId>mybatis-spring</artifactId>
         <version>${mybatis-spring.version}</version>
     </dependency>
     <!-- 添加oracle jdbc driver,如果本地没有对应的版本,会报错,无法从远程的maven库中获取
     maven Missing artifact com.oracle:ojdbc14:jar:10.2.0.4:compile
      -->  
    <dependency>    
        <groupId>com.oracle</groupId>    
        <artifactId>ojdbc14</artifactId>    
        <version>${oracle.version}</version>
    </dependency>
    <dependency>
        <groupId>org.hsqldb</groupId>
        <artifactId>hsqldb</artifactId>
        <version>${hsqldb.version}</version>
        <scope>runtime</scope>
    </dependency>
    <!-- 集成msql驱动 -->
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>${mysql.version}</version>
    </dependency>
     <!-- com.alibaba 集成阿里巴巴的连接池 druid-->
     <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>druid</artifactId>
        <version>${druid.version}</version>
     </dependency>
     <!-- xml解析包 dom4j,远程下载不下来 -->
     <dependency>
        <groupId>dom4j</groupId>
        <artifactId>dom4j</artifactId>
        <version>${dom4j.version}</version>
     </dependency>
     <!-- json 解析包 -->
     <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>${gson.version}</version>
     </dependency>
     <!-- 集成sl4j  start
     创建 <bean id="sessionFactory"
		class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> 
		时需要-->
     <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
     </dependency>
     <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>${slf4j.version}</version>
     </dependency>
     <!-- 集成sl4j end -->
     <!-- 集成log4j ,如果集成了slf4j-log4j12 会自动依赖log4j,不需要再加载,防止版本冲突
     <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>${log4j.version}</version>
     </dependency>
     -->
     <dependency>
        <groupId>cglib</groupId>
        <artifactId>cglib</artifactId>
        <version>${cglib.version}</version>
     </dependency>
     <!-- 集成cxf start -->
     <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-frontend-jaxws</artifactId>
        <version>${cxf.version}</version>
        <exclusions>
			<exclusion>
				<artifactId>asm</artifactId>
				<groupId>asm</groupId>
			</exclusion>
			<exclusion>
				<artifactId>xml-resolver</artifactId>
				<groupId>xml-resolver</groupId>
			</exclusion>
			<exclusion>
				<artifactId>cxf-rt-bindings-xml</artifactId>
				<groupId>org.apache.cxf</groupId>
			</exclusion>
			<exclusion>
				<artifactId>jaxb-impl</artifactId>
				<groupId>com.sun.xml.bind</groupId>
			</exclusion>
		</exclusions>
     </dependency>
     <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-transports-http</artifactId>
        <version>${cxf.version}</version>
        <exclusions>
				<exclusion>
					<artifactId>cxf-rt-transports-common</artifactId>
					<groupId>org.apache.cxf</groupId>
				</exclusion>
			</exclusions>
     </dependency>
     <!-- 集成cxf end -->
     <!-- 集成apache commons 工具包 start -->
     <dependency>
         <groupId>commons-beanutils</groupId>
         <artifactId>commons-beanutils</artifactId>
         <version>${beanutils.version}</version>
     </dependency>
     <dependency>
        <groupId>commons-fileupload</groupId>
        <artifactId>commons-fileupload</artifactId>
        <version>${fileupload.version}</version>
     </dependency>
     <dependency>
       <groupId>org.apache.commons</groupId>
	   <artifactId>commons-lang3</artifactId>
	   <version>${lang.version}</version>
     </dependency>
     <dependency>
       <groupId>commons-dbutils</groupId>
	   <artifactId>commons-dbutils</artifactId>
	   <version>${dbutils.version}</version>
     </dependency>
     <!-- 集成apache commons 工具包 end -->
     <!-- 集成quartz start-->
     <dependency>
        <groupId>org.quartz-scheduler</groupId>
        <artifactId>quartz</artifactId>
        <version>${quartz.version}</version>        
     </dependency>
     <!-- 集成quartz end-->
     <!-- 缩略图  -->
     <dependency>
        <groupId>net.coobird</groupId>
        <artifactId>thumbnailator</artifactId>
        <version>${thumbnailator.version}</version>
     </dependency>
  </dependencies>
  <build>
    <plugins>
    
      <plugin>
         <groupId>org.mortbay.jetty</groupId>
         <artifactId>jetty-maven-plugin</artifactId>
         <configuration> 
              <webAppConfig>  
                     <contextPath>/framework</contextPath>
                  <!--  <defaultsDescriptor>src/main/resources/webdefault.xml</defaultsDescriptor>  
                   --> 
              </webAppConfig>  
               <!--  
              <stopKey>foo</stopKey>
	          <stopPort>9999</stopPort>
	         
              <connectors>
                  <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
                      <port>8080</port>
                      <maxIdleTime>60000</maxIdleTime>
                  </connector>
              </connectors>
             <scanTargetPatterns>
                  <scanTargetPattern>
                      <directory>src/main/webapp</directory>
                      <includes>
                         <include>**/*.xml</include>
                         <include>**/*.properties</include>
                      </includes>
                  </scanTargetPattern>
              </scanTargetPatterns>
              -->
               <!-- 热部署扫描间隔的时间 -->
              <scanIntervalSeconds>5</scanIntervalSeconds>
               <!-- 
              <scanTargets>
                  <scanTarget>./target/classes</scanTarget>
                 <scanTarget>../lease-core/target/classes</scanTarget>
              </scanTargets>
               -->
              <webDefaultXml>src/main/resources/webdefault.xml</webDefaultXml>
		      <!-- <systemProperties>
		       <systemProperty>
		         <name>org.eclipse.jetty.util.URI.charset</name>
		         <value>utf-8</value>
		       </systemProperty>
		      </systemProperties>
              -->
          </configuration>  
      </plugin>
     <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.1</version>
          <configuration>
              <source>1.7</source>
              <target>1.7</target>
              <compilerArgument>-Xlint:all</compilerArgument>
              <showWarnings>true</showWarnings>
              <showDeprecation>true</showDeprecation>
          </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.2</version>
        <configuration>
          <version>2.5</version>
          <failOnMissingWebXml>false</failOnMissingWebXml>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>


 

除特别注明外,本站所有文章均为我要编程原创,转载请注明出处来自http://5ycode.com/article/11.html

关于
该用户很懒!
切换注册

登录

忘记密码 ?

切换登录

注册

扫一扫二维码分享