buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mat Schaffer <mat.schaf...@gmail.com>
Subject Generating eclipse files for non-maven dependencies
Date Mon, 14 Sep 2009 00:39:15 GMT
I'm working on redcar and we have a handful of dependencies that I  
don't think are available from maven. Specifically the latest versions  
of the SWT suite and accompanying platform-dependent jars.

We have them in a lib folder in the project at the moment, and it  
builds fine, but when I try to use buildr, it assumes that they should  
be source dependencies rather than lib dependencies.

The problem seems to be this line in eclipse.rb:

               # Generated: classpath elements in the project are  
assumed to be generated
               generated, libs = others.partition { |path|  
path.to_s.index(project.path_to.to_s) == 0 }

If I change it to this, it works much better:

               # Generated: classpath elements in the project are  
assumed to be generated
               generated, libs = others.partition { |path|  
path.to_s.index(project.path_to.to_s) == 0 && path.to_s !~ /\.jar\Z/}

But it feels hackish it'd be an ugly monkey-patch since I'd have to  
rewrite a fairly large function. Once I get through all the  
dependencies and get the eclipse_spec.rb running I'll see if I can  
come up with something nicer.

Does anyone have any advice on this one? I'd rather not have to set up  
a maven repository just for our project.

The code is up on http://github.com/matschaffer/java-mateview/tree/buildr 
  if it helps as a reference.

Thanks in advance for the help. Definitely love what I've seen of  
buildr so far!
-Mat
Mime
View raw message