Maven随笔

1. mvn clean compile

clean告诉Maven删除目录target(输出目录),compile告诉Maven编译项目主代码,从输出中看到Maven首先执行了clean:clean任务,删除target目录。默认情况下,Maven构建的所有输出都在target目录中;接着执行resources:resources任务;最后执行compiler:compiler任务,将项目主代码编译至target/classes目录

 

2.clean,resources,compiler对应了一些Maven插件及插件目标

 

3.Unlike many other errors, this exception is not generated by the Maven core itself but by a plugin. As a rule of thumb, plugins use this error to signal a failure of the build because there is something wrong with the dependencies or sources of a project, e.g. a compilation or a test failure. The concrete meaning of the exception depends on the plugin so please have a look at its documentation. The documentation for many common Maven plugins can be reached via our plugin index.

与许多其他错误不同,这个异常不是被Maven core自己产生的,而是一个插件。一般来说,插件用这个错误来标示构建失败,因为工程的sources或dependencies有错误。eg编译或测试失败,

原因:是因为我打开了target文件夹中的东西,导致使用mvn clean install命令时删除不了target文件夹

 

4.eclipse中的MANIFEST.MF文件有什么用

manifest中配置Main-Class的意义?http://blog.sina.com.cn/s/blog_9075354e0101kc37.html

 

5.xsd文件有什么用?

 

6.java命令的参数

 

7.使用Archetype生成项目骨架

HelloWorld项目中有一些Maven的约定:在项目的根目录中放置pom.xml,在src/main/java目录中放置项目的主代码,在src/test/java中放置项目的测试代码。我们称这些基本的目录结构和pom.xml文件内容称为项目的骨架。Maven提供了Archetype以帮助我们快速勾勒出项目骨架

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值