How can I checkout all dependencies used in a Maven POM?
Given the following project setup:
- Services
- ServicePackage A
- ServicePackage B
- ServicePackage C
- ...
- Processes
- Process 1 (depends on C)
- Process 2 (depends on A & B)
- Process 3 (depends on A & C)
- ...
- Applications
- Application X (depends 开发者_运维问答on 1 & 3)
- Application Y (depends on 2 & 3)
- ...
what would be the best practice to make a clean build for an application?
It depends on whether you are using released version of your dependencies or snapshots. When using the former it does not matter as the necessary versions will be pulled directory from your maven repository server (e.g., nexus, archiva or from your from disk cache).
When using snapshots, you either have to build snapshots by hand or publish the snapshots to your repository server (which can be automated using e.g., hudson). Note that you have to build them in the order they are used. A simple way could be:
- Server A, B, C (any internal order),
- Process 1,2,3 (any internal order),
- Application X, Y (any internal order), .
精彩评论