大漠驼铃

置身浩瀚的沙漠,方向最为重要,希望此blog能向大漠驼铃一样,给我方向和指引。
Java,Php,Shell,Python,服务器运维,大数据,SEO, 网站开发、运维,云服务技术支持,IM服务供应商, FreeSwitch搭建,技术支持等. 技术讨论QQ群:428622099
随笔 - 238, 文章 - 3, 评论 - 117, 引用 - 0
数据加载中……

Eclipse+jetty+maven+Struts2+Spring2+Hibernate3+annotation注册系统V1.0 没有实现0配置

主要是整合了开发环境,同时也有一些不足,用deploy.bat可以方便的进行部署。
下面是我用的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>cn.edu.nku</groupId>
  
<artifactId>ssh</artifactId>
  
<packaging>war</packaging>
  
<version>0.0.1-SNAPSHOT</version>
  
<name>ssh Maven Webapp</name>
  
<url>http://maven.apache.org</url>
  
<dependencies>
    
<dependency>
        
<groupId>org.apache.struts</groupId>
        
<artifactId>struts2-core</artifactId>
        
<version>2.1.6</version>
        
<scope>compile</scope>
    
</dependency>
    
<dependency>
        
<groupId>org.springframework</groupId>
        
<artifactId>spring</artifactId>
        
<version>2.5.6</version>
        
<type>jar</type>
        
<scope>compile</scope>
    
</dependency>
    
<dependency>
        
<groupId>org.apache.struts</groupId>
        
<artifactId>struts2-spring-plugin</artifactId>
        
<version>2.1.6</version>
        
<type>jar</type>
        
<scope>compile</scope>
    
</dependency>
    
<dependency>
        
<groupId>org.hibernate</groupId>
        
<artifactId>hibernate</artifactId>
        
<version>3.2.6.ga</version>
        
<scope>compile</scope>
    
</dependency>
    
<dependency>
        
<groupId>org.hibernate</groupId>
        
<artifactId>hibernate-annotations</artifactId>
        
<version>3.4.0.GA</version>
        
<type>jar</type>
        
<scope>compile</scope>
    
</dependency>
    
<dependency>
        
<groupId>mysql</groupId>
        
<artifactId>mysql-connector-java</artifactId>
        
<version>5.1.6</version>
        
<type>jar</type>
        
<scope>compile</scope>
    
</dependency>
    
<dependency>
        
<groupId>junit</groupId>
        
<artifactId>junit</artifactId>
        
<version>4.5</version>
        
<type>jar</type>
        
<scope>compile</scope>
    
</dependency>
    
<dependency>
        
<groupId>org.slf4j</groupId>
        
<artifactId>slf4j-log4j12</artifactId>
        
<version>1.5.6</version>
        
<type>jar</type>
        
<scope>compile</scope>
    
</dependency>
    
<dependency>
        
<groupId>org.slf4j</groupId>
        
<artifactId>slf4j-api</artifactId>
        
<version>1.5.6</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>
    
<dependency>
        
<groupId>org.hibernate</groupId>
        
<artifactId>hibernate-commons-annotations</artifactId>
        
<version>3.3.0.ga</version>
        
<type>jar</type>
        
<scope>compile</scope>
    
</dependency>
    
<dependency>
        
<groupId>org.hibernate</groupId>
        
<artifactId>hibernate-ehcache</artifactId>
        
<version>3.3.1.GA</version>
        
<type>jar</type>
        
<scope>compile</scope>
    
</dependency>
    
<dependency>
        
<groupId>org.springframework</groupId>
        
<artifactId>spring-orm</artifactId>
        
<version>2.5.6</version>
        
<type>jar</type>
        
<scope>compile</scope>
    
</dependency>
    
<dependency>
        
<groupId>org.springframework</groupId>
        
<artifactId>spring-webmvc</artifactId>
        
<version>2.5.6</version>
        
<type>jar</type>
        
<scope>compile</scope>
    
</dependency>
  
</dependencies>
  
<build>
    
<finalName>ssh</finalName>
    
<plugins>
        
<plugin>
            
<groupId>org.mortbay.jetty</groupId>
            
<artifactId>maven-jetty-plugin</artifactId>
            
<version>6.1.15.pre0</version>
               
<configuration>
                
<scanIntervalSeconds>3</scanIntervalSeconds>
                
<stopKey>foo</stopKey>
                
<stopPort>9999</stopPort>
        
</configuration>                 
        
        
<executions>
                
<execution>
                        
<id>start-jetty</id>
                        
<phase>pre-integration-test</phase>
                        
<goals>
                                
<goal>run</goal>
                        
</goals>
                        
<configuration>
                                
<scanIntervalSeconds>0</scanIntervalSeconds>
                                
<daemon>true</daemon>
                        
</configuration>
                
</execution>
                
<execution>
                        
<id>stop-jetty</id>
                        
<phase>post-integration-test</phase>
                        
<goals>
                                
<goal>stop</goal>
                        
</goals>
                
</execution>
        
</executions>

        
</plugin>
        
<plugin>
            
<groupId>org.apache.maven.plugins</groupId>
            
<artifactId>maven-compiler-plugin</artifactId>
            
<version>2.0.2</version>
            
<configuration>
                    
<source>1.5</source>
                    
<target>1.5</target>
                    
<encoding>UTF-8</encoding>
            
</configuration>
        
</plugin>
    
</plugins>
  
</build>
</project>


代码如下:http://www.blogjava.net/Files/nkjava/ssh.rar



posted on 2009-03-29 12:15 草原上的骆驼 阅读(1254) 评论(0)  编辑  收藏 所属分类: JAVA基础知识


只有注册用户登录后才能发表评论。


网站导航: