buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matteo Vaccari <vacc...@pobox.com>
Subject Problems with dependent projects
Date Mon, 01 Aug 2011 14:58:13 GMT
Hi,

I'm new to Buildr; I'd really want to use it for my project, but I'm running
into a couple of problems with dependent projects, and I would be very
grateful if you could lend me a hand.

It boils down to this: if you have a simple setup like

define 'problematic', :version => '0.0' do
  define 'foo' do
    package :jar
  end

  define 'bar' do
    compile.with project('foo')
  end
end

where both projects are Java project.

Problem one: it will only work if project 'foo' is packaged as a jar.  Is
there a way to make it work when 'foo' is packaged as a war?  Because when
you package 'foo' as a war, the compile task for 'bar' fails.

Problem two: suppose project 'bar's test classes need to be compiled with
project 'foo's test classes.  I see in the wiki there's a suggested
workaround

define "A" do
  package(:jar)
end

define "B" do
  compile.with project("A")
  test.with project("A").test.compile.target  # <---- HERE
  package(:jar)
end

This works for the compile task, but it breaks the eclipse task.  It turns
out that the generated .classpath contains an entry like

  <classpathentry
path="/Users/matteo/work/problematic/foo/target/test/classes" kind="src"
excluding="**/.svn/|**/CVS/"/>

that does not work in Eclipse.

What can I do?

Matteo

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message