maven---边摸边学
最近,一直沉醉于神奇的maven,从开始的极其排斥,觉得他部署的时候很慢,到部署第二个项目、第三个,自己简历了jar仓库nexus,有点小爱他了,慢慢的开始扣点细节。。今天先分享一部分,也是写下来,记录下,以后自己也能看!
开始觉得好神奇,看了很多大神的pom配置的文章,每次google我碰到的“红线”problem,真的都有答案。。。
废话多了。回归整体。。pom
<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>yl.zc</groupId><artifactId>fileuploadDemo</artifactId><packaging>war</packaging><version>0.0.1-SNAPSHOT</version><name>fileuploadDemo Maven Webapp</name><url>http://maven.apache.org</url><dependencies><!--自己要的包 --> </dependencies><build><finalName>fileuploadDemo</finalName><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.1</version><configuration><source>${java.version}</source><target>${java.version}</target><encoding>utf8</encoding></configuration></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-resources-plugin</artifactId><version>2.6</version><configuration><encoding>UTF-8</encoding></configuration></plugin></plugins></build>[color=red]<properties>[/color]<java.version>1.7</java.version><junit.version>4.4</junit.version></properties></project>
<dependency> <groupId>com.sun</groupId> <artifactId>tools</artifactId> <version>1.4.2</version> <scope>system</scope> <systemPath>C:/Program Files/Java/jdk1.6.0_30/lib/tools.jar</systemPath> </dependency>