Maven搭建SSH的pom的代码详解

前言

因项目需要第一次是用Maven搭建项目,在网上找了许久pom配置总是会出现一些包不兼容等小问题,经过多次改动版本测试,以下pom勉强能使用,但是hibernate配置实体类仍有问题。但因项目进度问题所以没有再进行测试修改了

参考资料

MyEclipse10.7使用Maven搭建Struts2+Spring3+Hibernate4的整合开发环境

maven in action(十)maven项目建立和运行过程中可能的错误

http://www.mvnrepository.com/

Maven配置文件pom.xml详解-Chil1ax

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.0modelVersion>
  <groupId>com.donghaiair.AMS_V1groupId>
  <artifactId>AMS_V1artifactId>
  <version>0.0.1-SNAPSHOTversion>
  <packaging>warpackaging>
  <name>AMS_V1name>
  <description/>
  <properties>
    <project.build.sourceEncoding>UTF-8project.build.sourceEncoding>
  properties>

  <dependencies>
        
        <dependency>
            <groupId>junitgroupId>
            <artifactId>junitartifactId>
            <version>4.12version>
            <scope>testscope>
        dependency>

        
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-coreartifactId>
            <version>3.1.2.RELEASEversion>
        dependency>
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-contextartifactId>
            <version>3.1.2.RELEASEversion>
        dependency>
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-jdbcartifactId>
            <version>3.1.2.RELEASEversion>
        dependency>
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-beansartifactId>
            <version>3.1.2.RELEASEversion>
        dependency>
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-webartifactId>
            <version>3.1.2.RELEASEversion>
        dependency>
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-expressionartifactId>
            <version>3.1.2.RELEASEversion>
        dependency>
        <dependency>
            <groupId>org.springframeworkgroupId>
            <artifactId>spring-ormartifactId>
            <version>3.1.2.RELEASEversion>
        dependency>

        
        <dependency>
            <groupId>org.hibernategroupId>
            <artifactId>hibernate-coreartifactId>
            <version>4.1.7.Finalversion>
        dependency>

        
        <dependency>
            <groupId>org.apache.strutsgroupId>
              <artifactId>struts2-coreartifactId>
              <version>2.3.16version>
              
              <exclusions>
                <exclusion>
                    <groupId>javassistgroupId>
                    <artifactId>javassistartifactId>
                exclusion>
              exclusions> 
        dependency>

        
        <dependency>
             <groupId>org.apache.strutsgroupId>
             <artifactId>struts2-convention-pluginartifactId>
             <version>2.3.20version>
         dependency>
         
         <dependency>
             <groupId>org.apache.strutsgroupId>
             <artifactId>struts2-config-browser-pluginartifactId>
             <version>2.3.20version>
         dependency>

         
         <dependency>
             <groupId>org.apache.strutsgroupId>
             <artifactId>struts2-spring-pluginartifactId>
             <version>2.3.4.1version>
         dependency>

         
        
         
        <dependency>
            <groupId>org.apache.strutsgroupId>
            <artifactId>struts2-json-pluginartifactId>
            <version>2.3.8version>
        dependency>

         <dependency>
            <groupId>com.oraclegroupId>
            <artifactId>ojdbc14artifactId>
            <version>10.2.0.3.0version>
        dependency>
        
        <dependency>
            <groupId>com.alibabagroupId>
            <artifactId>druidartifactId>
            <version>1.0.12version>
        dependency>
        
        <dependency>
            <groupId>org.aspectjgroupId>
            <artifactId>aspectjweaverartifactId>
            <version>1.8.5version>
        dependency>
        

        
        
        
        
        
        

        
        

        
        

        
        

        

        
        

        
        <dependency>
            <groupId>javax.servletgroupId>
            <artifactId>javax.servlet-apiartifactId>
            <version>3.0.1version>
            
            <scope>providedscope>
        dependency>

        <dependency>
            <groupId>javax.servletgroupId>
            <artifactId>jstlartifactId>
            <version>1.2version>
        dependency> 

        
        <dependency>
            <groupId>com.google.code.gsongroupId>
            <artifactId>gsonartifactId>
            <version>2.6.2version>
        dependency>

        
        <dependency>
            <groupId>org.apache.poigroupId>
            <artifactId>poi-ooxmlartifactId>
            <version>3.14version>
        dependency>

    dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-pluginartifactId>
        <version>2.3.2version>
        <configuration>
          <source>1.7source>
          <target>1.7target>
        configuration>
      plugin>
      
      <plugin>
          <groupId>org.apache.tomcat.mavengroupId>
          <artifactId>tomcat7-maven-pluginartifactId>
          <version>2.2version>
          <executions>
            <execution>
                
                <phase>packagephase>
                <goals>
                    <goal>rungoal>
                goals>
            execution>
          executions>
      plugin>
      <plugin>  
        <groupId>org.apache.maven.pluginsgroupId>  
        <artifactId>maven-surefire-pluginartifactId>  
        <version>2.4.2version>  
        <configuration>  
          <skipTests>trueskipTests>  
        configuration>  
      plugin> 
    plugins>
  build>
project>

你可能感兴趣的:(template,for,mine,maven,ssh)