[size=large][b]maven插件官网地址:http://maven.apache.org/plugins/index.html[/b][/size]
[size=x-large]安装好maven插件之后的配置[/size]
[img]http://dl2.iteye.com/upload/attachment/0113/1392/8d22843e-fcc0-3227-946f-6fb1cf91fade.png[/img]
[size=large]eclipse maven工程打包和clean命令:[/size]
[size=large]1.执行maven clean 前:[/size]
[img]http://dl2.iteye.com/upload/attachment/0113/1384/0c422264-146f-3510-880d-9b402c8a8943.png[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/1386/61b1ca73-280d-3ea7-a58c-9cd50a3bddd7.png[/img]
[size=large]2.执行maven clean 后:[/size]
[img]http://dl2.iteye.com/upload/attachment/0113/1388/2ac4f7d9-61ff-303e-b606-9d4f8fe2fae3.png[/img]
[size=large]3.执行maven install命令前:[/size]
[img]http://dl2.iteye.com/upload/attachment/0113/1390/f0731dac-231f-329f-97f6-ea419121ddee.png[/img]
[size=large]4.执行maven install 命令后:[/size]
[img]http://dl2.iteye.com/upload/attachment/0113/1384/0c422264-146f-3510-880d-9b402c8a8943.png[/img]
[size=x-large]安装好maven插件之后的配置[/size]
[img]http://dl2.iteye.com/upload/attachment/0113/1392/8d22843e-fcc0-3227-946f-6fb1cf91fade.png[/img]
[size=large]eclipse maven工程打包和clean命令:[/size]
[size=large]1.执行maven clean 前:[/size]
[img]http://dl2.iteye.com/upload/attachment/0113/1384/0c422264-146f-3510-880d-9b402c8a8943.png[/img]
[img]http://dl2.iteye.com/upload/attachment/0113/1386/61b1ca73-280d-3ea7-a58c-9cd50a3bddd7.png[/img]
[size=large]2.执行maven clean 后:[/size]
[img]http://dl2.iteye.com/upload/attachment/0113/1388/2ac4f7d9-61ff-303e-b606-9d4f8fe2fae3.png[/img]
[size=large]3.执行maven install命令前:[/size]
[img]http://dl2.iteye.com/upload/attachment/0113/1390/f0731dac-231f-329f-97f6-ea419121ddee.png[/img]
[size=large]4.执行maven install 命令后:[/size]
[img]http://dl2.iteye.com/upload/attachment/0113/1384/0c422264-146f-3510-880d-9b402c8a8943.png[/img]
<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>com.malt</groupId>
<artifactId>mavenWebApp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<dependencies>
...
</dependencies>
<build>
<plugins>
<!-- 执行maven install 将指定目录下程序打成war,并将lib文件拉取到-->
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webappDirectory>${basedir}/src/main/webapp</webappDirectory>
</configuration>
</plugin>
<!-- 编译-->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<!-- 执行maven clean 时,默认清空哪个文件夹-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.6.1</version>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/src/main/webapp/WEB-INF/lib</directory>
<followSymlinks>false</followSymlinks>
<useDefaultExcludes>true</useDefaultExcludes>
</fileset>
<fileset>
<directory>${basedir}/src/main/webapp/WEB-INF/classes</directory>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</build>
</project>