1.提示某些java语言特性不支持,这可能是由于maven默认使用的java compiler的版本太低所致,需在pom的<build>中添加maven-compiler-plugin
3132 org.apache.maven.plugins 33maven-compiler-plugin 3435 38
2.注意pom文件中定义dependency时的scope是compile还是provided
3.maven的源代码中,关于dependency:tree这一部分的实现的代码,觉得写得不错,计划后面看,分为graph与tree两个版本?
just interested in how maven pom resolve transitive dependencies
BFS的形式?
4.maven
<optional>true</optional>
详细见https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
是在使用rose上传的功能,遇到与http://www.mkyong.com/struts/java-lang-noclassdeffounderror-orgapachecommonsiooutputdeferredfileoutputstream/
类似的问题时候,排查查到的
从而需要单独添加对commons-io的依赖
5.maven新建工程
mvn archetype:create -DgroupId=groupId -DartifactId=projectName -Dversion=1.0.0 -DpackageName=com.renren.ad
6.maven调试
出错需要进行调试的时候加上一个-x
7.正常使用时需要的插件
7071 72 9373 85org.apache.maven.plugins 74maven-compiler-plugin 7576 8486 92org.apache.maven.plugins 87maven-resources-plugin 8889 91UTF-8 9094 9895 97${project.basedir}/src/main/resources 96
在这个之前的,即文件的开头需要如下配置
13 4.0.0 4 5com.xxx.xxx 6logxxxxxxx 71.0-SNAPSHOT 8jar 9 10logxxxxxxxx 11http://maven.apache.org 12 1314 16 17UTF-8 1518 22 23com.xxxxxx 19xxxxxxx-root-pom 201.0-SNAPSHOT 2124 ...... 25
8.maven插件
maven-assembly-plugin
128129 org.apache.maven.plugins 130maven-assembly-plugin 1312.4.1 132133 134 138135 137jar-with-dependencies 136139 148140 147make-assembly 141 142package 143144 146single 145
maven-shade-plugin
150151 org.apache.maven.plugins 152maven-shade-plugin 1532.4 154155 170156 169package 157158 160shade 159161 168162 167163 166org.apache.thrift 164org.shaded.thrift 165
用于class relocation https://maven.apache.org/plugins/maven-shade-plugin/examples/class-relocation.html
http://www.boyunjian.com/do/article/snapshot.do?uid=684161795280089944
http://www.infoq.com/cn/news/2011/06/xxb-maven-9-package/
http://www.cnblogs.com/xinsheng/p/4109573.html
http://blog.csdn.net/thc1987/article/details/44176481
http://zfei.me/blog/2014/05/23/use-maven-shade-plugin-to-resolve-java-dependency-version-conflict/
relocate时候将package和import涉及到的lib的package都改变了。
jarjar
https://www.mail-archive.com/user@hive.apache.org/msg09819.html
http://grokbase.com/t/hive/user/13aaptne38/is-that-possible-to-use-hive-0-11-with-libthrift-0-7