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 2010/08/29 00:55:25 UTC
svn commit: r990465 - in /buildr/trunk: ./ tests/ tests/package_war_as_jar/
tests/package_war_as_jar/src/ tests/package_war_as_jar/src/main/
tests/package_war_as_jar/src/main/java/
Author: toulmean
Date: Sat Aug 28 22:55:25 2010
New Revision: 990465
URL: http://svn.apache.org/viewvc?rev=990465&view=rev
Log:
added test to change war spec
Added:
buildr/trunk/tests/package_war_as_jar/
buildr/trunk/tests/package_war_as_jar/Buildfile
buildr/trunk/tests/package_war_as_jar/src/
buildr/trunk/tests/package_war_as_jar/src/main/
buildr/trunk/tests/package_war_as_jar/src/main/java/
buildr/trunk/tests/package_war_as_jar/src/main/java/Foo.java
Modified:
buildr/trunk/CHANGELOG
buildr/trunk/tests/integration_testing.rb
Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=990465&r1=990464&r2=990465&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Sat Aug 28 22:55:25 2010
@@ -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 change the war packaging spec.
* Added: Integration test to show how to use junit 3.
* 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
Modified: buildr/trunk/tests/integration_testing.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/tests/integration_testing.rb?rev=990465&r1=990464&r2=990465&view=diff
==============================================================================
--- buildr/trunk/tests/integration_testing.rb (original)
+++ buildr/trunk/tests/integration_testing.rb Sat Aug 28 22:55:25 2010
@@ -42,4 +42,15 @@ end
test("JavaSystemProperty", "#{BUILDR} test")
test("helloWorld", "#{BUILDR} package")
test("compile_with_parent", "#{BUILDR} compile")
-test("junit3", "#{BUILDR} test")
\ No newline at end of file
+test("junit3", "#{BUILDR} test")
+
+class Package_war_as_jar < Test::Unit::TestCase
+
+ def test_war_extension_is_jar
+ result = %x[cd #{File.join(File.expand_path(File.dirname(__FILE__)), "package_war_as_jar")} ; #{BUILDR} package]
+ assert($?.success?)
+ assert(File.exist? File.join(File.expand_path(File.dirname(__FILE__)), "package_war_as_jar", "target", "webapp-1.0.jar"))
+ %x[cd #{File.join(File.expand_path(File.dirname(__FILE__)), "package_war_as_jar")} ; #{BUILDR} clean]
+ assert($?.success?)
+ end
+end
\ No newline at end of file
Added: buildr/trunk/tests/package_war_as_jar/Buildfile
URL: http://svn.apache.org/viewvc/buildr/trunk/tests/package_war_as_jar/Buildfile?rev=990465&view=auto
==============================================================================
--- buildr/trunk/tests/package_war_as_jar/Buildfile (added)
+++ buildr/trunk/tests/package_war_as_jar/Buildfile Sat Aug 28 22:55:25 2010
@@ -0,0 +1,15 @@
+
+module PackageWarAsJar
+
+ def package_as_war_spec(spec)
+ spec.merge(:type => "jar")
+ end
+end
+
+define "webapp", :version => "1.0", :group => "org.group" do
+ project.extend PackageWarAsJar
+
+ package(:war)
+
+end
+
\ No newline at end of file
Added: buildr/trunk/tests/package_war_as_jar/src/main/java/Foo.java
URL: http://svn.apache.org/viewvc/buildr/trunk/tests/package_war_as_jar/src/main/java/Foo.java?rev=990465&view=auto
==============================================================================
--- buildr/trunk/tests/package_war_as_jar/src/main/java/Foo.java (added)
+++ buildr/trunk/tests/package_war_as_jar/src/main/java/Foo.java Sat Aug 28 22:55:25 2010
@@ -0,0 +1,3 @@
+
+public class Foo {
+}
\ No newline at end of file