maven常用命令及配置

[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]


<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>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值