You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by as...@apache.org on 2008/02/29 04:27:49 UTC

svn commit: r632218 - in /incubator/buildr/trunk: buildfile lib/ide/idea7x.rb

Author: assaf
Date: Thu Feb 28 19:27:47 2008
New Revision: 632218

URL: http://svn.apache.org/viewvc?rev=632218&view=rev
Log:
Another quick fix, certified to 'works on my machine'

Modified:
    incubator/buildr/trunk/buildfile
    incubator/buildr/trunk/lib/ide/idea7x.rb

Modified: incubator/buildr/trunk/buildfile
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/buildfile?rev=632218&r1=632217&r2=632218&view=diff
==============================================================================
--- incubator/buildr/trunk/buildfile (original)
+++ incubator/buildr/trunk/buildfile Thu Feb 28 19:27:47 2008
@@ -5,6 +5,7 @@
 options = :javac, { :source=>'1.4', :target=>'1.4', :debug=>false }
 define 'java' do
   compile.from(FileList['lib/java/**/*.java']).into('lib/java').using(*options)
+  package :jar, :group=>'foo', :version=>'1.0'
 end
 define 'buildr' do
   compile.from(FileList['lib/buildr/**/*.java']).into('lib/buildr').using(*options).with(Buildr::Jetty::REQUIRES)

Modified: incubator/buildr/trunk/lib/ide/idea7x.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/ide/idea7x.rb?rev=632218&r1=632217&r2=632218&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/ide/idea7x.rb (original)
+++ incubator/buildr/trunk/lib/ide/idea7x.rb Thu Feb 28 19:27:47 2008
@@ -55,7 +55,7 @@
 
       # Find a path relative to the project's root directory.
       relative = lambda do |path|
-        Pathname.new(path.to_s).relative_path_from(Pathname.new(project.path_to)).to_s
+        Pathname.new(File.expand_path(path.to_s)).relative_path_from(Pathname.new(project.path_to)).to_s
       end
 
       m2repo = Buildr::Repositories.instance.local
@@ -132,7 +132,7 @@
 
       def generate_content(project, xml, generated, relative)
         xml.content(:url=>"#{MODULE_DIR_URL}") do
-          if project.has_compile_sources
+          unless project.sources.empty?
             srcs = project.compile.sources.map { |src| relative[src.to_s] } + generated.map { |src| relative[src.to_s] }
             srcs.sort.uniq.each do |path|
               xml.sourceFolder :url=>"#{MODULE_DIR_URL}/#{path}", :isTestSource=>"false"
@@ -152,7 +152,7 @@
               end
             end
           end
-          xml.excludeFolder :url=>"#{MODULE_DIR_URL}/#{relative[project.compile.target.to_s]}" if project.has_compile_sources
+          xml.excludeFolder :url=>"#{MODULE_DIR_URL}/#{relative[project.compile.target.to_s]}" if project.compile.target
         end
       end