|
127 | 127 | * http://ant.apache.org/ivy/ivyde/index.html
|
128 | 128 |
|
129 | 129 |
|
130 |
| - |
131 |
| - |
132 | 130 | # asmplugin
|
133 | 131 |
|
134 | 132 | * 项目地址:http://sourceforge.net/projects/asmplugin/
|
|
268 | 266 | * 项目地址:https://github.com/google/guava
|
269 | 267 |
|
270 | 268 |
|
| 269 | +# Java Class Dependency Analyzer |
| 270 | + |
| 271 | +* Class Dependency Analyzer (CDA): http://www.dependency-analyzer.org/ |
| 272 | +* Classycle: Analysing Tools for Java Class and Package Dependencies: http://classycle.sourceforge.net/ |
| 273 | +* STAN, the leading Eclipse-based structure analysis tool for Java: http://stan4j.com/ |
| 274 | +* nWire, Code Exploration for Eclipse(not free): http://www.nwiresoftware.com/ |
| 275 | + |
| 276 | + |
271 | 277 | # Apache Commons
|
272 | 278 |
|
273 | 279 | Apache Commons is an Apache project focused on all aspects of reusable Java components.
|
274 | 280 |
|
275 | 281 | * 官网:http://commons.apache.org/
|
276 |
| -* BeanUtils: http://commons.apache.org/proper/commons-beanutils/ |
277 |
| -* DBCP: http://commons.apache.org/proper/commons-dbcp/ |
278 |
| -* IO:http://commons.apache.org/proper/commons-io/ |
279 |
| -* Lang:http://commons.apache.org/proper/commons-lang/ |
280 |
| -* Logging: http://commons.apache.org/proper/commons-logging/ |
281 |
| -* Math: http://commons.apache.org/proper/commons-math/ |
282 |
| -* Net: http://commons.apache.org/proper/commons-net/ |
283 |
| -* OGNL:http://commons.apache.org/proper/commons-ognl/ |
| 282 | + |
| 283 | +sandbox中的项目无法直接通过maven进行依赖,必须通过svn下载源码,部署到本地maven仓库中。例如对于sandbox中的classscan项目(http://commons.apache.org/sandbox/commons-classscan/): |
| 284 | +```shell |
| 285 | + svn checkout http://svn.apache.org/repos/asf/commons/sandbox/classscan classscan |
| 286 | + cd classscan |
| 287 | + |
| 288 | + # 当install带有parent的maven项目时,如果没有把parent一并install,其它项目引用时会出现 |
| 289 | + # mvn install--Failed to read artifact descriptor for org.apache.maven.plugins:maven-source-plugin:jar:2.1.2 |
| 290 | + cd parent (classscan/parent) |
| 291 | + mvn clean package install -DskipTests |
| 292 | + |
| 293 | + |
| 294 | + cd ../api (classscan/api) |
| 295 | + mvn clean package install -DskipTests |
| 296 | + |
| 297 | + cd ../bcel (classscan/bcel) |
| 298 | + mvn clean package install -DskipTests |
| 299 | +``` |
| 300 | + |
| 301 | +在pom.xml中添加依赖 |
| 302 | +```xml |
| 303 | + <dependency> |
| 304 | + <groupId>org.apache.commons.classscan</groupId> |
| 305 | + <artifactId>bcel</artifactId> |
| 306 | + <version>0.2-SNAPSHOT</version> |
| 307 | + </dependency> |
| 308 | + |
| 309 | + <dependency> |
| 310 | + <groupId>org.apache.commons.classscan</groupId> |
| 311 | + <artifactId>api</artifactId> |
| 312 | + <version>0.2-SNAPSHOT</version> |
| 313 | + </dependency> |
| 314 | +``` |
| 315 | + |
| 316 | +Eclipse中`Update Project`,选择`Force Update of Snapshots/Releases` |
| 317 | + |
| 318 | + |
284 | 319 |
|
285 | 320 |
|
286 | 321 | # Maven and M2Eclipse
|
|
341 | 376 |
|
342 | 377 | 经常碰到这种事情:在一些非maven工程中(由于某种原因这种工程还是手工添加依赖的),需要用到某个新的类库(假设这个类库发布在maven库中),而这个类库又间接依赖很多其他类库,如果依赖路径非常复杂的话,一个个检查手动下载是很麻烦的事.下面给出一个便捷的办法,创建一个新目录里面建一个maven pom文件, 添加需要依赖的类库:
|
343 | 378 |
|
344 |
| -``` |
| 379 | +```xml |
345 | 380 | <?xml version="1.0"?>
|
346 | 381 | <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">
|
347 | 382 | <modelVersion>4.0.0</modelVersion>
|
|
361 | 396 |
|
362 | 397 | 在这个目录下运行命令,所有跟这个类库相关的直接和间接依赖的jar包都会下载到 ./target/dependency/下
|
363 | 398 |
|
364 |
| - mvn -f download-dep-pom.xml dependency:copy-dependencies |
| 399 | + `mvn -f download-dep-pom.xml dependency:copy-dependencies` |
365 | 400 |
|
366 | 401 |
|
367 | 402 | ## 杂项
|
@@ -394,6 +429,8 @@ mvn javadoc:javadoc
|
394 | 429 |
|
395 | 430 |
|
396 | 431 |
|
| 432 | + |
| 433 | + |
397 | 434 | # Gradle
|
398 | 435 |
|
399 | 436 | 一个开源的自动化构建系统,建立在Apache Ant和Maven Apache概念的基础上,并引入了基于Groovy的特定领域语言(DSL),而不是使用Apache Maven宣布的项目配置XML形式。
|
|
0 commit comments