如何让buildr将子项目的依赖项放入POM?

时间:2016-08-23 01:35:45

标签: pom.xml buildr

我的一个Buildr构建文件的结构如下:

require 'buildr/custom_pom'

# Omitting a lot of off-topic header stuff.
# Full version of the file is at GitHub.

desc 'Main project'
define 'hex' do
  project.version = VERSION_NUMBER
  project.group = 'org.trypticon.hex'

  pom.add_lgpl_v3_license
  pom.add_github_project('trejkaz/hex-components')
  pom.add_developer('trejkaz', 'Trejkaz', 'trejkaz@trypticon.org')

  desc 'Hex Utilities'
  define 'util' do
    pom.description = 'Utilities used by other hex components'
    compile.with INTELLIJ_ANNOTATIONS
    compile.with ICU4J
    compile.with SWINGX
    package :jar
    package :sources
    package :javadoc
  end

  #... omitting more ...

  desc 'Hex Viewer'
  define 'viewer' do
    pom.description = 'Hex viewer and related components'
    compile.with projects('anno', 'binary', 'interpreter', 'util')
    compile.with INTELLIJ_ANNOTATIONS
    compile.with SWINGX
    package :jar
    package :sources
    package :javadoc
  end
end

hex-viewer取决于hex-util。然而,当Buildr创建POM时,POM缺少子项目之间的这些依赖关系。

阅读Buildr本身的来源,出于某种原因似乎they deliberately omit all dependencies which are not an Artifact。子项目不是工件,它们自然会从POM中省略。

是否有解决方法让他们重新进入?

0 个答案:

没有答案