简体   繁体   English

如何检查Maven POM中使用的所有依赖项?

[英]How can I checkout all dependencies used in a Maven POM?

Given the following project setup: 给定以下项目设置:

  • Services 服务
    • ServicePackage A 服务包A
    • ServicePackage B 服务包B
    • ServicePackage C 服务包C
    • ... ...
  • Processes 流程
    • Process 1 (depends on C) 进程1(取决于C)
    • Process 2 (depends on A & B) 流程2(取决于A和B)
    • Process 3 (depends on A & C) 流程3(取决于A和C)
    • ... ...
  • Applications 应用
    • Application X (depends on 1 & 3) 应用程序X(取决于1和3)
    • Application Y (depends on 2 & 3) 应用Y(取决于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 (eg, nexus , archiva or from your from disk cache). 当使用前者时,没关系,因为必要的版本将从您的maven存储库服务器中拉出目录(例如, nexusarchiva或从您的磁盘缓存中)。

When using snapshots, you either have to build snapshots by hand or publish the snapshots to your repository server (which can be automated using eg, hudson). 使用快照时,您要么必须手动构建快照,要么将快照发布到您的存储库服务器(可以使用例如hudson进行自动化)。 Note that you have to build them in the order they are used. 请注意,您必须按照使用顺序来构建它们。 A simple way could be: 一种简单的方法可能是:

  1. Server A, B, C (any internal order), 服务器A,B,C(任何内部订单),
  2. Process 1,2,3 (any internal order), 流程1,2,3(任何内部订单),
  3. Application X, Y (any internal order), . 应用X,Y(任何内部订单)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM