You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by to...@apache.org on 2016/08/21 22:22:49 UTC
buildr git commit: Fix more errors,
now that the root Rakefile is not used mistakenly for the project's
buildfile
Repository: buildr
Updated Branches:
refs/heads/master cb629a4f4 -> 0b3985088
Fix more errors, now that the root Rakefile is not used mistakenly for the project's buildfile
Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/0b398508
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/0b398508
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/0b398508
Branch: refs/heads/master
Commit: 0b3985088062d809c44fbded32115e0aec594e98
Parents: cb629a4
Author: Antoine Toulme <an...@lunar-ocean.com>
Authored: Sun Aug 21 15:22:41 2016 -0700
Committer: Antoine Toulme <an...@lunar-ocean.com>
Committed: Sun Aug 21 15:22:41 2016 -0700
----------------------------------------------------------------------
lib/buildr/core/generate.rb | 1 +
spec/core/generate_from_eclipse_spec.rb | 30 ++++++++++++++++++++--------
2 files changed, 23 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/buildr/blob/0b398508/lib/buildr/core/generate.rb
----------------------------------------------------------------------
diff --git a/lib/buildr/core/generate.rb b/lib/buildr/core/generate.rb
index 2e18808..9f21fbe 100644
--- a/lib/buildr/core/generate.rb
+++ b/lib/buildr/core/generate.rb
@@ -168,6 +168,7 @@ EOF
if natures && natures.index('org.eclipse.pde.PluginNature')
script << " package(:jar)"
end
+ script << " dependencies ||= []"
if mf && mf.main['Require-Bundle']
mf.main['Require-Bundle'].split(',').each do
|bundle|
http://git-wip-us.apache.org/repos/asf/buildr/blob/0b398508/spec/core/generate_from_eclipse_spec.rb
----------------------------------------------------------------------
diff --git a/spec/core/generate_from_eclipse_spec.rb b/spec/core/generate_from_eclipse_spec.rb
index 333fa3f..fabc536 100644
--- a/spec/core/generate_from_eclipse_spec.rb
+++ b/spec/core/generate_from_eclipse_spec.rb
@@ -116,6 +116,7 @@ describe Buildr::Generate do
buildFile = File.join(top, 'buildfile')
file(buildFile).should exist
file(buildFile).should contain("GROUP = \"#{top}\"")
+ chdir(top)
lambda { Buildr.application.run }.should_not raise_error
end
@@ -127,17 +128,19 @@ describe Buildr::Generate do
file(buildFile).should exist
file(buildFile).should contain('define "single"')
file(buildFile).should_not contain('define "myproject"')
+ chdir(top)
lambda { Buildr.application.run }.should_not raise_error
end
- it 'should honour Bundle-Version in MANIFEST.MF' do
- define('bundle_version')
- buildFile = File.join(top, 'buildfile')
- file(buildFile).should exist
- file(buildFile).should contain('define "single"')
- file(buildFile).should contain('define "single", :version => "1.1"')
- lambda { Buildr.application.run }.should_not raise_error
- end
+ it 'should honour Bundle-Version in MANIFEST.MF' do
+ define('bundle_version')
+ buildFile = File.join(top, 'buildfile')
+ file(buildFile).should exist
+ file(buildFile).should contain('define "single"')
+ file(buildFile).should contain('define "single", :version => "1.1"')
+ chdir(top)
+ lambda { Buildr.application.run }.should_not raise_error
+ end
it "should pass source in build.properties to layout[:source, :main, :java] and layout[:source, :main, :scala]" do
define('layout_source')
@@ -147,6 +150,7 @@ describe Buildr::Generate do
file(buildFile).should contain('define "single"')
file(buildFile).should contain('layout[:source, :main, :java]')
file(buildFile).should contain('layout[:source, :main, :scala]')
+ chdir(top)
lambda { Buildr.application.run }.should_not raise_error
end
@@ -159,6 +163,7 @@ describe Buildr::Generate do
file(buildFile).should contain('layout[:target, :main]')
file(buildFile).should contain('layout[:target, :main, :java]')
file(buildFile).should contain('layout[:target, :main, :scala]')
+ chdir(top)
lambda { Buildr.application.run }.should_not raise_error
end
@@ -168,6 +173,7 @@ describe Buildr::Generate do
file(buildFile).should exist
file(buildFile).should contain('define')
file(buildFile).should contain('package(:jar)')
+ chdir(top)
lambda { Buildr.application.run }.should_not raise_error
end
@@ -183,6 +189,7 @@ describe Buildr::Generate do
buildFile = File.join(top, 'buildfile')
file(buildFile).should exist
file(buildFile).should contain('define "singleSymbolicName"')
+ chdir(top)
lambda { Buildr.application.run }.should_not raise_error
end
end
@@ -198,6 +205,7 @@ describe Buildr::Generate do
buildFile = File.join(top, 'buildfile')
file(buildFile).should exist
file(buildFile).should contain('define "singleSymbolicName"')
+ chdir(top)
lambda { Buildr.application.run }.should_not raise_error
end
end
@@ -218,6 +226,7 @@ describe Buildr::Generate do
buildFile = File.join(top, 'buildfile')
file(buildFile).should contain("GROUP = \"#{top}\"")
file(buildFile).should contain('define "single"')
+ chdir(top)
lambda { Buildr.application.run }.should_not raise_error
end
@@ -227,6 +236,7 @@ describe Buildr::Generate do
file(buildFile).should exist
file(buildFile).should contain('define "single"')
file(buildFile).should contain('define "single", :version => "1.1", :base_dir => "nested/single"')
+ chdir(top)
lambda { Buildr.application.run }.should_not raise_error
end
@@ -251,6 +261,7 @@ describe Buildr::Generate do
file(buildFile).should exist
file(buildFile).should contain('compile.with dependencies')
file(buildFile).should contain('resources')
+ chdir(top)
lambda { Buildr.application.run }.should_not raise_error
end
#dependencies << projects("first")
@@ -258,10 +269,12 @@ describe Buildr::Generate do
it 'should honour Require-Bundle in MANIFEST.MF' do
define('base_dir')
buildFile = File.join(top, 'buildfile')
+
file(buildFile).should exist
file(buildFile).should contain(/define "second"/)
file(buildFile).should contain( /dependencies << projects\("first"\)/)
file(buildFile).should contain(/define "second".*do.*dependencies << projects\("first"\).* end/m)
+ chdir(top)
lambda { Buildr.application.run }.should_not raise_error
end
@@ -272,6 +285,7 @@ describe Buildr::Generate do
file(buildFile).should exist
# system("cat #{buildFile}") # if $VERBOSE
file(buildFile).should contain('define "first"')
+ chdir(top)
lambda { Buildr.application.run }.should_not raise_error
end