Question

I have the following definition:

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

I would like to compile the second project - engine with the jar that was created from common project. (it depends on it)

How can I do it?

Was it helpful?

Solution

You can pass the project directly to the compile.with, excerpt from 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')

You can simplify the projects call to just compile.with projects('common') as well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top