maven的JAVA-EE项目pom总结

step1:
maven的JAVA-EE项目pom总结

 

step2:


maven的JAVA-EE项目pom总结
 
 step3:


maven的JAVA-EE项目pom总结

step4:

 

<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>com.hujiabo</groupId>
  <artifactId>myspring</artifactId>
  <packaging>war</packaging>
  <version>0.0.1-SNAPSHOT</version>
  <name>myspring Maven Webapp</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
      	<dependency>
  		<groupId>javax.servlet</groupId>
  		<artifactId>servlet-api</artifactId>
  		<version>2.5</version>
  	</dependency>
  	<dependency>
  		<groupId>tomcat</groupId>
  		<artifactId>jasper</artifactId>
  		<version>3.3.2</version>
  	</dependency>
  	<dependency>
  		<groupId>javax.servlet.jsp</groupId>
  		<artifactId>jsp-api</artifactId>
  		<version>2.1</version>
  	</dependency>
  	<dependency>
  		<groupId>javax.el</groupId>
  		<artifactId>el-api</artifactId>
  		<version>1.0</version>
  	</dependency>
  	<dependency>
  		<groupId>org.apache.tomcat</groupId>
  		<artifactId>annotations-api</artifactId>
  		<version>6.0.20</version>
  	</dependency>
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-aop</artifactId>
  		<version>3.0.5.RELEASE</version>
  	</dependency>
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-asm</artifactId>
  		<version>3.0.5.RELEASE</version>
  	</dependency>
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-beans</artifactId>
  		<version>3.0.5.RELEASE</version>
  	</dependency>
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-context</artifactId>
  		<version>3.0.5.RELEASE</version>
  	</dependency>
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-context-support</artifactId>
  		<version>3.0.5.RELEASE</version>
  	</dependency>
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-core</artifactId>
  		<version>3.0.5.RELEASE</version>
  	</dependency>
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-expression</artifactId>
  		<version>3.0.5.RELEASE</version>
  	</dependency>
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-web</artifactId>
  		<version>3.0.5.RELEASE</version>
  	</dependency>
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-jdbc</artifactId>
  		<version>3.0.5.RELEASE</version>
  	</dependency>
  	<dependency>
  		<groupId>commons-logging</groupId>
  		<artifactId>commons-logging</artifactId>
  		<version>1.1.1</version>
  	</dependency>
  	<dependency>
  		<groupId>log4j</groupId>
  		<artifactId>log4j</artifactId>
  		<version>1.2.9</version>
  	</dependency>
  	<dependency>
  		<groupId>aopalliance</groupId>
  		<artifactId>aopalliance</artifactId>
  		<version>1.0</version>
  	</dependency>
  	<dependency>
  		<groupId>mysql</groupId>
  		<artifactId>mysql-connector-java</artifactId>
  		<version>5.1.15</version>
  	</dependency>
  	<dependency>
  		<groupId>org.springframework</groupId>
  		<artifactId>spring-webmvc</artifactId>
  		<version>3.0.5.RELEASE</version>
  	</dependency>
  </dependencies>
  <build>
    <finalName>myspring</finalName>
    <!-- 
    	本部分的设置属于纠结着解决问题
    	maven在打包的时候,对空目录是不打入包的。这个问题不论是国内的还是国外的都在问
    	处理方式:
    	比如日志文件夹,在里面建立一个.tmp文件,然后利用excludes元素将这个空文件给过滤掉
     -->
    <plugins>
    	<plugin>
    		<groupId>org.apache.maven.plugins</groupId>
    		<artifactId>maven-war-plugin</artifactId>
    		<version>2.1.1</version>
    		<configuration>
    			<webResources>
    				<resource>
    					<directory>src/main/webapp/log</directory>
    					<excludes>
    						<exclude>**/*.tmp</exclude>
    					</excludes>
    				</resource>
    			</webResources>
    		</configuration>
    	</plugin>
    </plugins>
  </build>
</project>
 

 

你可能感兴趣的:(java,apache,spring,maven,mysql)