Skip to content

Commit

Permalink
test case to show how to get to parent
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/buildr/trunk@990389 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Antoine Toulme committed Aug 28, 2010
1 parent 00ba748 commit 1493631
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
1.4.2 (pending)
* Added: BUILDR-415 Ability to exclude tests from command line
* Added: BUILDR-495 Document twitter on Buildr's homepage
* Added: Integration test to show how to get ahold of parent project
* Change: BUILDR-473 Update jruby-openssl dependency version or support a range of versions
* Change: BUILDR-478 Upgrade to net-ssh 2.0.23 and net-sftp 2.0.4 (Shane Witbeck)
* Change: BUILDR-475 Support for long names on tar.gz (updated to minitar 0.5.3)
Expand Down
18 changes: 18 additions & 0 deletions tests/compile_with_parent/Buildfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

repositories.remote << "http://repo1.maven.org/maven2"

LOG4J = artifact("log4j:log4j:jar:1.2.16")
unless File.exist? File.join("lib", File.basename(LOG4J.to_s))
LOG4J.invoke
cp LOG4J.to_s, "lib"
end

define "parent" do

define "child" do

compile.with project.parent.path_to(File.join("lib", File.basename(LOG4J.to_s)))

end
end

7 changes: 7 additions & 0 deletions tests/compile_with_parent/child/src/main/java/Foo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

import org.apache.log4j.Logger;

public class Foo {

private static final Logger _logger = Logger.getLogger(Foo.class);
}
3 changes: 2 additions & 1 deletion tests/integration_testing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ def test_circular_dependency
end

test("JavaSystemProperty", "#{BUILDR} test")
test("helloWorld", "#{BUILDR} package")
test("helloWorld", "#{BUILDR} package")
test("compile_with_parent", "#{BUILDR} compile")

0 comments on commit 1493631

Please sign in to comment.