简体   繁体   English

没有安装pom的Maven分组依赖关系

[英]Maven Grouping Dependencies without installing pom

I have a maven project which has multiple profiles and lots of dependencies which are specific to each of those profiles. 我有一个Maven项目,该项目具有多个配置文件以及许多特定于每个配置文件的依赖项。 The current solution to clean this up works by creating an intermediate dependency pom for each profile which groups the dependencies together as described here in 3.6.1: http://www.sonatype.com/books/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html Each of these dependency grouping poms lives in their own svn project and is build and deployed as a separate jenkins job. 当前解决问题的方法是通过为每个配置文件创建一个中间依赖项pom来进行工作,该依赖项将依赖项分组在一起,如3.6.1中所述: http : //www.sonatype.com/books/mvnref-book/reference/pom- Relationships-sect-pom-best-practice.html这些依赖项分组pom中的每一个都生活在其自己的svn项目中,并作为单独的jenkins工作进行构建和部署。

The problem is that these poms, and the dependencies within them change and are released often and it has become difficult to maintain. 问题在于这些pom及其内部的依赖项会经常更改和释放,并且变得难以维护。 Ideally, I would like all of the dependency management to live under one svn project and one build. 理想情况下,我希望所有依赖项管理都生活在一个svn项目和一个构建中。

Any suggestions would be appreciated. 任何建议,将不胜感激。

As khmarbaise writes, it would help with more information and an example. 正如khmarbaise所写,它将提供更多信息和示例。

However, just answering your actual question, how to get all your depenency grouping poms as one project and one build. 但是,仅回答您的实际问题,即如何将所有依赖项poms作为一个项目和一个内部版本进行构建。 It sound as if a multi module project with each module being one of your "dependency grouping pom" projects would be what you are looking for. 听起来好像在寻找一个多模块项目 ,而每个模块都是您的“依赖项分组pom”项目之一。

Maven版本插件完成了我们所需的工作。

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

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