3

我有以下定义:

define "BE" do
    project.version = VERSION_NUMBER
    project.group = GROUP
    manifest['Copyright'] = COPYRIGHT

    desc 'Building common project for engine and API'
    define 'common' do
        compile.with XXX
        package :jar
    end

    desc 'Building the engine project based on common'
    define 'engine' do
        compile.with XXX
        package :jar
    end


    desc 'Building API project'
    define 'API' do
        package(:war).with :libs=>project('common')
    end

end

我想用从公共项目创建的 jar 编译第二个项目 - 引擎。(这取决于它)

我该怎么做?

4

1 回答 1

4

您可以将项目直接传递给compile.with,摘自http://buildr.apache.org/building.html

   compile.with 'org.apache.axis2:axis2:jar:1.2', 
        'org.apache.derby:derby:jar:10.1.2.1', projects('teh-api', 'teh-impl')

您也可以简化项目调用compile.with projects('common')

于 2012-08-06T15:29:04.653 回答