惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Palo Alto Networks Blog
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
博客园_首页
博客园 - 三生石上(FineUI控件)
G
Google Developers Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 【当耐特】
Microsoft Security Blog
Microsoft Security Blog
P
Privacy & Cybersecurity Law Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
S
Secure Thoughts
爱范儿
爱范儿
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
H
Help Net Security
The Cloudflare Blog
Recorded Future
Recorded Future
Attack and Defense Labs
Attack and Defense Labs
J
Java Code Geeks
O
OpenAI News
T
Tor Project blog
B
Blog RSS Feed
D
Darknet – Hacking Tools, Hacker News & Cyber Security
PCI Perspectives
PCI Perspectives
V
Visual Studio Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
A
About on SuperTechFans
www.infosecurity-magazine.com
www.infosecurity-magazine.com
W
WeLiveSecurity
Cyberwarzone
Cyberwarzone
云风的 BLOG
云风的 BLOG
Security Latest
Security Latest
S
Schneier on Security
Know Your Adversary
Know Your Adversary
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
Vulnerabilities – Threatpost
D
DataBreaches.Net
宝玉的分享
宝玉的分享
T
Troy Hunt's Blog
V
V2EX
Cisco Talos Blog
Cisco Talos Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Latest news
Latest news
量子位
Microsoft Azure Blog
Microsoft Azure Blog

博客园 - MyFavorite

成长、改变、突破 软件工程相关整理 INCLUDE COMMON FILES IN HTML USING JQUERY Oracle取TOP N条记录 Oracle:分割字符串 use CheckBoxMultipleChoice in wicket 根据对象名获取对象 外网SQL服务器设置 VB6.0调用SetTimer实现定时器 cmd命令控制台窗口一闪就消失解决办法 jdbc访问数据库 - MyFavorite - 博客园 java与MSSQL2000连接 - MyFavorite - 博客园 关于java CountDownLatch java InputStream读取数据问题 MyEclipse中防止代码格式化时出现换行的情况的设置 java监控多个线程的实现 TCP连接状态 Java定时器代码 java下的日期函数实现
5个必须掌握的maven命令
MyFavorite · 2012-03-18 · via 博客园 - MyFavorite

1. mvn help:describe 你是否因为记不清某个插件有哪些goal而痛苦过,你是否因为想不起某个goal有哪些参数而苦恼,那就试试这个命令吧,它会告诉你一切的. 参数: 1. -Dplugin=pluginName 2. -Dgoal(或-Dmojo)=goalName:与-Dplugin一起使用,它会列出某个插件的goal信息,如果嫌不够详细,同样可以加-Ddetail.(注:一个插件goal也被认为是一个 “Mojo”) 下面大家就运行mvn help:describe -Dplugin=help -Dmojo=describe感受一下吧!

2. mvn archetype:generate 你是怎么创建你的maven项目的?是不是像这样:mvn archetype:create -DarchetypeArtifactId=maven-archetype-quickstart -DgroupId=com.ryanote -Dartifact=common,如果你还再用的话,那你就out了,现代人都用mvn archetype:generate了,它将创建项目这件枯燥的事更加人性化,你再也不需要记那么多的archetypeArtifactId,你只需输入archetype:generate,剩下的就是做”选择题”了.

3. mvn tomcat:run 用了maven后,你再也不需要用eclipse里的tomcat来运行web项目(实际工作中经常会发现用它会出现不同步更新的情况),只需在对应目录(如/ryanote)里运行 mvn tomat:run命令,然后就可在浏览器里运行http://localhost:8080/ryanote查看了.如果你想要更多的定制,可以在pom.xml文件里加下面配置: 01 02 03 04 org.codehaus.mojo 05 tomcat-maven-plugin 06 07 /web 08 9090 09 10 11 12 当然你也可以在命令里加参数来实现特定的功能,下面几个比较常用: 1. 跳过测试:-Dmaven.test.skip(=true) 2. 指定端口:-Dmaven.tomcat.port=9090 3. 忽略测试失败:-Dmaven.test.failure.ignore=true 当然,如果你的其它关联项目有过更新的话,一定要在项目根目录下运行mvn clean install来执行更新,再运行mvn tomcat:run使改动生效.

4. mvnDebug tomcat:run 这条命令主要用来远程测试,它会监听远程测试用的8000端口,在eclipse里打开远程测试后,它就会跑起来了,设断点,调试,一切都是这么简单.上面提到的那几个参数在这里同样适用.

5. mvn dependency:sources 故名思义,有了它,你就不用到处找源码了,运行一下,你项目里所依赖的jar包的源码就都有了