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/02 22:40:36 UTC
svn commit: r617901 - in /incubator/buildr/trunk: ./ lib/buildr/
lib/buildr/jetty/ lib/buildr/org/ lib/buildr/org/apache/
lib/buildr/org/apache/buildr/ lib/java/org/apache/buildr/ spec/
Author: assaf
Date: Sat Feb 2 13:40:34 2008
New Revision: 617901
URL: http://svn.apache.org/viewvc?rev=617901&view=rev
Log:
Moved JettyWrapper to org.apache.buildr package, and compile for JDK 1.4
Added:
incubator/buildr/trunk/lib/buildr/org/
incubator/buildr/trunk/lib/buildr/org/apache/
incubator/buildr/trunk/lib/buildr/org/apache/buildr/
incubator/buildr/trunk/lib/buildr/org/apache/buildr/JettyWrapper$1.class (with props)
incubator/buildr/trunk/lib/buildr/org/apache/buildr/JettyWrapper$BuildrHandler.class (with props)
incubator/buildr/trunk/lib/buildr/org/apache/buildr/JettyWrapper.class (with props)
incubator/buildr/trunk/lib/buildr/org/apache/buildr/JettyWrapper.java
- copied, changed from r616131, incubator/buildr/trunk/lib/buildr/jetty/JettyWrapper.java
Removed:
incubator/buildr/trunk/lib/buildr/jetty/
Modified:
incubator/buildr/trunk/Rakefile
incubator/buildr/trunk/lib/buildr/jetty.rb
incubator/buildr/trunk/lib/java/org/apache/buildr/JUnitTestFilter.class
incubator/buildr/trunk/lib/java/org/apache/buildr/JUnitTestFilter.java
incubator/buildr/trunk/spec/java_compilers_spec.rb
incubator/buildr/trunk/spec/java_packaging_spec.rb
Modified: incubator/buildr/trunk/Rakefile
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/Rakefile?rev=617901&r1=617900&r2=617901&view=diff
==============================================================================
--- incubator/buildr/trunk/Rakefile (original)
+++ incubator/buildr/trunk/Rakefile Sat Feb 2 13:40:34 2008
@@ -103,6 +103,7 @@
task.spec_opts << '--format' << 'html:html/report.html' << '--backtrace'
task.rcov = true
task.rcov_dir = 'html/coverage'
+ task.rcov_opts = ['--exclude', 'spec,bin']
end
task 'spec:jruby' do
@@ -270,13 +271,13 @@
task 'compile' do
# RJB, JUnit and friends.
Dir.chdir 'lib/java' do
- `javac -Xlint:all org/apache/buildr/*.java`
+ `javac -source 1.4 -target 1.4 -Xlint:all org/apache/buildr/*.java`
end
# Jetty server.
cp = ['jetty-6.1.1.jar', 'jetty-util-6.1.1.jar', 'servlet-api-2.5-6.1.1'].
map { |jar| `locate #{jar}`.split.first }.join(File::PATH_SEPARATOR)
- Dir.chdir 'lib/buildr/jetty' do
- `javac -Xlint:all -cp #{cp} JettyWrapper.java`
+ Dir.chdir 'lib/buildr' do
+ `javac -source 1.4 -target 1.4 -Xlint:all -cp #{cp} org/apache/buildr/*.java`
end
end
Modified: incubator/buildr/trunk/lib/buildr/jetty.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/jetty.rb?rev=617901&r1=617900&r2=617901&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/jetty.rb (original)
+++ incubator/buildr/trunk/lib/buildr/jetty.rb Sat Feb 2 13:40:34 2008
@@ -37,7 +37,7 @@
"org.slf4j:slf4j-simple:jar:#{SLF4J_VERSION}", "org.slf4j:jcl104-over-slf4j:jar:#{SLF4J_VERSION}" ]
Java.classpath << REQUIRES
- Java.classpath << File.join(__DIR__, "jetty")
+ Java.classpath << File.join(__DIR__)
# Default URL for Jetty (change with options.jetty.url).
URL = "http://localhost:8080"
@@ -79,7 +79,7 @@
port = URI.parse(url).port
puts "Starting Jetty at http://localhost:#{port}" if verbose
Java.load
- jetty = Java.JettyWrapper.new(port)
+ jetty = Java.org.apache.buildr.JettyWrapper.new(port)
sync << "Started" if sync
sleep # Forever
rescue Interrupt # Stopped from console
Added: incubator/buildr/trunk/lib/buildr/org/apache/buildr/JettyWrapper$1.class
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/org/apache/buildr/JettyWrapper%241.class?rev=617901&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/buildr/trunk/lib/buildr/org/apache/buildr/JettyWrapper$1.class
------------------------------------------------------------------------------
svn:mime-type = application/java
Added: incubator/buildr/trunk/lib/buildr/org/apache/buildr/JettyWrapper$BuildrHandler.class
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/org/apache/buildr/JettyWrapper%24BuildrHandler.class?rev=617901&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/buildr/trunk/lib/buildr/org/apache/buildr/JettyWrapper$BuildrHandler.class
------------------------------------------------------------------------------
svn:mime-type = application/java
Added: incubator/buildr/trunk/lib/buildr/org/apache/buildr/JettyWrapper.class
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/org/apache/buildr/JettyWrapper.class?rev=617901&view=auto
==============================================================================
Binary file - no diff available.
Propchange: incubator/buildr/trunk/lib/buildr/org/apache/buildr/JettyWrapper.class
------------------------------------------------------------------------------
svn:mime-type = application/java
Copied: incubator/buildr/trunk/lib/buildr/org/apache/buildr/JettyWrapper.java (from r616131, incubator/buildr/trunk/lib/buildr/jetty/JettyWrapper.java)
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/org/apache/buildr/JettyWrapper.java?p2=incubator/buildr/trunk/lib/buildr/org/apache/buildr/JettyWrapper.java&p1=incubator/buildr/trunk/lib/buildr/jetty/JettyWrapper.java&r1=616131&r2=617901&rev=617901&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/jetty/JettyWrapper.java (original)
+++ incubator/buildr/trunk/lib/buildr/org/apache/buildr/JettyWrapper.java Sat Feb 2 13:40:34 2008
@@ -48,7 +48,7 @@
private class BuildrHandler extends AbstractHandler {
- private HashMap<String,WebAppContext> _apps = new HashMap<String,WebAppContext>();
+ private HashMap _apps = new HashMap();
public void handle(String string, HttpServletRequest request,
HttpServletResponse response, int i) throws IOException, ServletException {
Modified: incubator/buildr/trunk/lib/java/org/apache/buildr/JUnitTestFilter.class
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/java/org/apache/buildr/JUnitTestFilter.class?rev=617901&r1=617900&r2=617901&view=diff
==============================================================================
Binary files - no diff available.
Modified: incubator/buildr/trunk/lib/java/org/apache/buildr/JUnitTestFilter.java
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/java/org/apache/buildr/JUnitTestFilter.java?rev=617901&r1=617900&r2=617901&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/java/org/apache/buildr/JUnitTestFilter.java (original)
+++ incubator/buildr/trunk/lib/java/org/apache/buildr/JUnitTestFilter.java Sat Feb 2 13:40:34 2008
@@ -24,8 +24,8 @@
}
public String[] filter(String[] names) throws ClassNotFoundException {
- Vector<String> testCases = new Vector<String>();
- Class<?> testCase = _loader.loadClass("junit.framework.TestCase");
+ Vector testCases = new Vector();
+ Class testCase = _loader.loadClass("junit.framework.TestCase");
for (int i = 0 ; i < names.length ; ++i) {
Class cls = _loader.loadClass(names[i]);
if (testCase.isAssignableFrom(cls))
Modified: incubator/buildr/trunk/spec/java_compilers_spec.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/spec/java_compilers_spec.rb?rev=617901&r1=617900&r2=617901&view=diff
==============================================================================
--- incubator/buildr/trunk/spec/java_compilers_spec.rb (original)
+++ incubator/buildr/trunk/spec/java_compilers_spec.rb Sat Feb 2 13:40:34 2008
@@ -7,6 +7,27 @@
define('foo').compile.compiler.should eql(:javac)
end
+ it 'should identify from source directories using custom layout' do
+ write 'src/com/example/Code.java', 'package com.example; class Code {}'
+ write 'testing/com/example/Test.java', 'package com.example; class Test {}'
+ custom = Layout.new
+ custom[:source, :main, :java] = 'src'
+ custom[:source, :test, :java] = 'testing'
+ define 'foo', :layout=>custom do
+ compile.compiler.should eql(:javac)
+ test.compile.compiler.should eql(:javac)
+ end
+ end
+
+ it 'should identify from compile source directories' do
+ write 'src/com/example/Code.java', 'package com.example; class Code {}'
+ write 'testing/com/example/Test.java', 'package com.example; class Test {}'
+ define 'foo' do
+ lambda { compile.from 'src' }.should change { compile.compiler }.to(:javac)
+ lambda { test.compile.from 'testing' }.should change { test.compile.compiler }.to(:javac)
+ end
+ end
+
it 'should report the language as :java' do
define('foo').compile.using(:javac).language.should eql(:java)
end
Modified: incubator/buildr/trunk/spec/java_packaging_spec.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/spec/java_packaging_spec.rb?rev=617901&r1=617900&r2=617901&view=diff
==============================================================================
--- incubator/buildr/trunk/spec/java_packaging_spec.rb (original)
+++ incubator/buildr/trunk/spec/java_packaging_spec.rb Sat Feb 2 13:40:34 2008
@@ -935,7 +935,6 @@
end
end
-
describe 'package_with_sources' do
it_should_behave_like 'package_with_'
before { @packaging = :sources }