buildr 1.3.0-java → 1.3.1-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG CHANGED
@@ -1,3 +1,19 @@
1
+ 1.3.1 (2008-05-19)
2
+ * Added: Downloading files from SFTP server, uploading to HTTP.
3
+ * Added: jibx_bind method to use JiBX for Java<=>XML binding (by David
4
+ Peterson).
5
+ * Changed: Upgraded to Net::SSH 2.0 and Net::SFTP 2.0.
6
+ * Fixed: BUILDR-67 HTTP GET now works with query parameters (Tommy Knowlton).
7
+ * Fixed: BUILDR-68 Now accepting JAVA_HOME setting on OS X (Nathan Hamblen).
8
+ * Fixed: JUnit now accepts java_args and passes these arguments to the JVM
9
+ (only applicable when forking).
10
+ * Fixed: BUILDR-70 JUnit not passing environment variables from the
11
+ :environment option.
12
+ * Fixed: BUILDR-75 Filter now runs if there's a target directory, even if
13
+ there are no source files to copy over, since everyone else just checks
14
+ resources.target for existence before depending on it.
15
+ * Fixed: BUILDR-63 Possible fix.
16
+
1
17
  1.3.0 (2008-04-25)
2
18
  * Added: Testing with EasyB (Nicolas Modrzyk).
3
19
  * Added: Testing with JBehave (John Layton).
data/NOTICE CHANGED
@@ -26,6 +26,3 @@ Bitstream Vera is a trademark of Bitstream, Inc.
26
26
 
27
27
  * ColorCons - http://www.mouserunner.com/
28
28
  Copyright (c) 2006 Ken Saunders
29
-
30
- * Ultraviolet stylesheets - http://ultraviolet.rubyforge.org
31
- Copyright (c) 2007 FIX
data/README CHANGED
@@ -127,47 +127,6 @@ which changes might have broken your build. To run all the test cases:
127
127
  :include:LICENSE
128
128
 
129
129
 
130
- == Third-party dependencies
131
-
132
- Even though those dependencies aren't shipped with Buildr, Buildr needs
133
- the third-party libraries listed below to run. According licenses are
134
- bundled under the etc/legal directory (when available).
135
-
136
- * Rake - http://rubyforge.org/projects/rake
137
- Licensed under MIT/X Consortium
138
- Copyright 2003, 2004 by Jim Weirich.
139
-
140
- * Builder - http://rubyforge.org/projects/builder
141
- Licensed under MIT/X Consortium
142
- Copyright 2004 by Jim Weirich (jim@weirichhouse.org).
143
-
144
- * net-ssh - http://rubyforge.org/projects/net-ssh
145
- Licensed under BSD
146
- Copyright 2004, Jamis Buck (jamis@37signals.com)
147
-
148
- * rubyzip - http://rubyforge.org/projects/rubyzip
149
- Licensed under the Ruby License
150
- Authors: Thomas Sondergaard (thomas at sondergaard.cc),
151
- Technorama Ltd. (oss-ruby-zip at technorama.net),
152
- extra-field support contributed by Tatsuki Sugiura (sugi at nemui.org)
153
-
154
- * highline - http://rubyforge.org/projects/highline
155
- Licensed under the Ruby License
156
- Copyright 2005 Gray Productions.
157
- Copyright 2007 Jeremy Hinegardner.
158
-
159
- * antwrap - http://rubyforge.org/projects/antwrap
160
- Licensed under LGPL
161
- Copyright Caleb Powell 2007
162
-
163
- * rspec - http://rubyforge.org/projects/rspec
164
- Licensed under MIT/X Consortium
165
- Copyright 2005-2007 The RSpec Development Team
166
-
167
- * xml-simple - http://rubyforge.org/projects/xml-simple
168
- Licensed under the Ruby License
169
- Copyright (c) 2003 Maik Schmidt
170
-
171
- * ruwiki (archive-tar-minitar) - http://rubyforge.org/projects/ruwiki/
172
- Licensed under the Ruby License
173
- Copyright 2004 Mauricio Julio Fernández Pradier and Austin Ziegler
130
+ == Notice
131
+
132
+ :include:NOTICE
data/Rakefile CHANGED
@@ -24,9 +24,11 @@ def spec(platform = nil)
24
24
  spec = Gem::Specification.load(File.join(File.dirname(__FILE__), 'buildr.gemspec'))
25
25
  spec.platform = platform
26
26
  if platform =~ /java/
27
- spec.add_dependency 'ci_reporter', '~> 1.5'
27
+ spec.add_dependency 'jruby-openssl', '0.2'
28
+ spec.add_dependency 'ci_reporter', '1.5.1' # must come after builder dependency
28
29
  else
29
- spec.add_dependency 'rjb', '~>1.1'
30
+ # Place first on the dependency list, otherwise AntWrap picks the latest RJB.
31
+ spec.dependencies.unshift Gem::Dependency.new('rjb', ['>=1.1.0', '<= 1.1.2'])
30
32
  end
31
33
  spec
32
34
  end
@@ -0,0 +1,86 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one or more
2
+ # contributor license agreements. See the NOTICE file distributed with this
3
+ # work for additional information regarding copyright ownership. The ASF
4
+ # licenses this file to you under the Apache License, Version 2.0 (the
5
+ # "License"); you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13
+ # License for the specific language governing permissions and limitations under
14
+ # the License.
15
+
16
+
17
+ require 'java/java'
18
+
19
+
20
+ module Buildr
21
+
22
+ # Provides JiBX bytecode enhancement. Require explicitly using <code>require 'buildr/jibx'</code>.
23
+ module JiBX
24
+
25
+ JIBX_VERSION = '1.1.5'
26
+ BCEL_VERSION = '5.2'
27
+ STAX_VERSION = '1.0-2'
28
+ XPP3_VERSION = '1.1.4c'
29
+
30
+ REQUIRES = [ "org.jibx:jibx-bind:jar:#{JIBX_VERSION}",
31
+ "org.jibx:jibx-run:jar:#{JIBX_VERSION}",
32
+ "org.apache.bcel:bcel:jar:#{BCEL_VERSION}",
33
+ "javax.xml.stream:stax-api:jar:#{STAX_VERSION}",
34
+ "xpp3:xpp3:jar:#{XPP3_VERSION}" ]
35
+
36
+ Java.classpath << REQUIRES
37
+
38
+ class << self
39
+
40
+ def bind(options)
41
+ rake_check_options options, :classpath, :output, :binding, :target, :verbose, :load
42
+ artifacts = Buildr.artifacts(options[:classpath]).each { |a| a.invoke }.map(&:to_s) + [options[:output].to_s]
43
+ binding = file(options[:binding]).tap { |task| task.invoke }.to_s
44
+
45
+ Buildr.ant 'jibx' do |ant|
46
+ ant.taskdef :name=>'bind', :classname=>'org.jibx.binding.ant.CompileTask',
47
+ :classpath => requires.join(File::PATH_SEPARATOR)
48
+ ant.bind :verbose => options[:verbose].to_s, :load => options[:load].to_s, :binding=>options[:binding].to_s do
49
+ ant.classpath :path => artifacts.join(File::PATH_SEPARATOR)
50
+ end
51
+ end
52
+ end
53
+
54
+ private
55
+
56
+ def requires()
57
+ @requires ||= Buildr.artifacts(REQUIRES).each { |artifact| artifact.invoke }.map(&:to_s)
58
+ end
59
+
60
+ end
61
+
62
+ def jibx_bind(options = nil)
63
+
64
+ # FIXME - add support for :bindingfileset and :classpathset
65
+ # Note: either :binding or :bindingfileset should be set, and either
66
+ # :classpath or :classpathset should be set, and options passed to
67
+ # ant.bind should be adjusted accordingly. At present, only :binding
68
+ # and :classpath are supported (which should be fine for most!)
69
+ jibx_options = { :output => compile.target,
70
+ :classpath => compile.classpath,
71
+ :binding => path_to(:source, :main, :resources, 'META-INF/binding.xml'),
72
+ :target => compile.target,
73
+ :load => false,
74
+ :verbose => false
75
+ }
76
+
77
+ JiBX.bind jibx_options.merge(options || {})
78
+ end
79
+
80
+ end
81
+
82
+ class Project
83
+ include JiBX
84
+ end
85
+ end
86
+
@@ -16,7 +16,7 @@
16
16
 
17
17
  Gem::Specification.new do |spec|
18
18
  spec.name = 'buildr'
19
- spec.version = '1.3.0'
19
+ spec.version = '1.3.1'
20
20
  spec.author = 'Apache Buildr'
21
21
  spec.email = "#{spec.name}-user@incubator.apache.org"
22
22
  spec.homepage = "http://incubator.apache.org/#{spec.name}/"
@@ -36,15 +36,15 @@ Gem::Specification.new do |spec|
36
36
  spec.rubyforge_project = 'buildr'
37
37
 
38
38
  # Tested against these dependencies.
39
- spec.add_dependency 'rake', '~> 0.8'
40
- spec.add_dependency 'builder', '~> 2.1'
41
- spec.add_dependency 'net-ssh', '~> 1.1'
42
- spec.add_dependency 'net-sftp', '~> 1.1'
43
- spec.add_dependency 'rubyzip', '~> 0.9'
44
- spec.add_dependency 'highline', '~> 1.4'
45
- spec.add_dependency 'Antwrap', '~> 0.7'
46
- spec.add_dependency 'rspec', '~> 1.1'
47
- spec.add_dependency 'xml-simple', '~> 1.0'
48
- spec.add_dependency 'archive-tar-minitar', '~> 0.5'
49
- spec.add_dependency 'rubyforge', '~> 0.4'
39
+ spec.add_dependency 'rake', '0.8.1'
40
+ spec.add_dependency 'builder', '2.1.2'
41
+ spec.add_dependency 'net-ssh', '2.0.1'
42
+ spec.add_dependency 'net-sftp', '2.0.0'
43
+ spec.add_dependency 'rubyzip', '0.9.1'
44
+ spec.add_dependency 'highline', '1.4.0'
45
+ spec.add_dependency 'Antwrap', '0.7.0'
46
+ spec.add_dependency 'rspec', '1.1.3'
47
+ spec.add_dependency 'xml-simple', '1.0.11'
48
+ spec.add_dependency 'archive-tar-minitar', '0.5.2'
49
+ spec.add_dependency 'rubyforge', '0.4.5'
50
50
  end
@@ -94,7 +94,7 @@ th, td {
94
94
  background-color: #FFFFFF;
95
95
  }
96
96
 
97
- th {
97
+ th, thead td {
98
98
  border-bottom: none;
99
99
  background-color: #E5E5E5;
100
100
  text-align: left;
@@ -115,8 +115,8 @@ $ rake spec
115
115
 
116
116
  We always @rake spec@ before making a release.
117
117
 
118
- You can also check out the "RSpec report":report.html and "test coverage
119
- report":coverage/index.html for the current version of Buildr. And if you want to help us on the journey to 100% test coverage, we'll be ever so grateful!
118
+ You can also check out the "RSpec report":report.html which provides the
119
+ official specification against which we test each release.
120
120
 
121
121
 
122
122
  h2. Documentation
@@ -13,6 +13,16 @@ installation scripts.
13
13
 
14
14
  h2. Binaries and Source Code
15
15
 
16
+ h3. buildr 1.3.0-incubating (2008-05-01)
17
+
18
+ |_. Package |_. MD5 Checksum |_. PGP |
19
+ | "buildr-1.3.0-incubating.gem":http://www.apache.org/dist/incubator/buildr/1.3.0-incubating/buildr-1.3.0-incubating.gem | "37758d0a8dabc570799b0a58d23d19f0":http://www.apache.org/dist/incubator/buildr/1.3.0-incubating/buildr-1.3.0-incubating.gem.md5 | "Sig":http://www.apache.org/dist/incubator/buildr/1.3.0-incubating/buildr-1.3.0-incubating.gem.asc |
20
+ | "buildr-1.3.0-java-incubating.gem":http://www.apache.org/dist/incubator/buildr/1.3.0-incubating/buildr-1.3.0-java-incubating.gem | "6a3a86740077f739c111514e0e2b9e06":http://www.apache.org/dist/incubator/buildr/1.3.0-incubating/buildr-1.3.0-java-incubating.gem.md5 | "Sig":http://www.apache.org/dist/incubator/buildr/1.3.0-incubating/buildr-1.3.0-java-incubating.gem.asc |
21
+ | "buildr-1.3.0-incubating.tgz":http://www.apache.org/dist/incubator/buildr/1.3.0-incubating/buildr-1.3.0-incubating.tgz | "acd84ad8c5031962e65b0036f3bc2e76":http://www.apache.org/dist/incubator/buildr/1.3.0-incubating/buildr-1.3.0-incubating.tgz.md5 | "Sig":http://www.apache.org/dist/incubator/buildr/1.3.0-incubating/buildr-1.3.0-incubating.tgz.asc |
22
+ | "buildr-1.3.0-incubating.zip":http://www.apache.org/dist/incubator/buildr/1.3.0-incubating/buildr-1.3.0-incubating.zip | "d85945f05efd0e512e6d769e3dd1cc98":http://www.apache.org/dist/incubator/buildr/1.3.0-incubating/buildr-1.3.0-incubating.zip.md5 | "Sig":http://www.apache.org/dist/incubator/buildr/1.3.0-incubating/buildr-1.3.0-incubating.zip.asc |
23
+
24
+ p>. ("Release signing keys":http://www.apache.org/dist/incubator/buildr/1.3.0-incubating/KEYS)
25
+
16
26
 
17
27
  p(note). When downloading from files please check the
18
28
  "md5sum":http://www.apache.org/dev/release-signing#md5 and verify the
@@ -145,21 +145,21 @@ For Linux and OS/X:
145
145
 
146
146
  {{{!sh
147
147
  $ export PATH=$PATH:[path to JRuby]/bin:$JAVA_HOME/bin
148
- $ gem install buildr
148
+ $ jruby -S gem install buildr
149
149
  }}}
150
150
 
151
151
  For Windows:
152
152
 
153
153
  {{{!sh
154
154
  > set PATH=%PATH%;[path to JRuby]/bin;%JAVA_HOME%/bin
155
- > gem install buildr
155
+ > jruby -S gem install buildr
156
156
  }}}
157
157
 
158
158
  To upgrade to a new version or install a specific version:
159
159
 
160
160
  {{{!sh
161
- $ sudo gem update buildr
162
- $ sudo gem install buildr -v 1.3.0
161
+ $ jruby -S gem update buildr
162
+ $ jruby -S gem install buildr -v 1.3.0
163
163
  }}}
164
164
 
165
165
  You can also use this script "to install Buildr on
@@ -30,7 +30,7 @@ write code using variables, functions and objects.
30
30
 
31
31
  h2. News
32
32
 
33
- Check out "all that's new in Buildr 1.3":whats_new.html.
33
+ Check out "all that's new in Buildr 1.3.1":whats_new.html.
34
34
 
35
35
  * Buildr 1.3 now runs on JRuby 1.1
36
36
  * Support for building Scala projects
@@ -1,5 +1,28 @@
1
1
  h1. What's New
2
2
 
3
+ h2. Buildr 1.3.1
4
+
5
+ * Fixed to specific Gem dependencies, so should install cleanly on Windows.
6
+ * Buildr now supports publishing files to HTTP server for remote repositories
7
+ that support HTTP uploads (PUT).
8
+ * Buildr now supports reading files from SFTP server and upgrades to
9
+ Net::SSH 2.0 and Net::SFTP 2.0.
10
+ * HTTP downloads now accept URLs with query parameters (Tommy Knowlton).
11
+ * On OS X if you are not using the default JDK, you can set the JAVA_HOME
12
+ environment variable to point to any other JDK (Nathan Hamblen).
13
+ * JUnit properly passes options[:environment] as environment variables to the
14
+ test case. In addition options[:java_args] are now passed as arguments to
15
+ the JVM, for example to set heap size, only applicable when forking (the
16
+ default mode when running JUnit).
17
+ * Fixed BUILDR-75: Filter now runs if there's a target directory, even if
18
+ there are no source files to copy over, and creates an empty target
19
+ directory. The previous behavior caused some problems with code that checked
20
+ if resource.target was nil, but didn't check if there are any
21
+ resource.sources to process.
22
+ * Added the jibx_bind method to use JiBX for Java<=>XML binding (by David
23
+ Peterson).
24
+
25
+
3
26
  h2. Buildr 1.3
4
27
 
5
28
  h3. Multiple Languages
@@ -349,13 +372,10 @@ h3. Other
349
372
 
350
373
  * Buildr 1.3 upgrades to Rake 0.8, RSpec 1.1, RJB 1.1 and OpenJPA
351
374
  1.0.1. Buildr no longer includes or uses Facets.
352
-
353
375
  * JUnit tests now operate on all compiled test classes that extend
354
376
  @junit.framework.TestCase@ or use the @Test@ annotation; TestNG test cases are
355
377
  filtered by annotation. Test cases no longer have to use a specific file name.
356
-
357
378
  * Remote repositories now support HTTP Basic Authentication.
358
-
359
379
  * The prepare task has been removed, if you need to, simply add a prerequisite
360
380
  to the compile task.
361
381
 
@@ -364,26 +384,19 @@ h3. Documentation
364
384
 
365
385
  * The "What's new?":whats_new.html page (this one, actually), summarizes all
366
386
  the important new features and changes in each release.
367
-
368
387
  * The "Recipes":recipes.html page (also available in the PDF) lists recipes for
369
388
  using Buildr, collected from the mailing list. Feel free to contribute tips,
370
389
  tricks and techniques.
371
-
372
390
  * The "Troubleshooting":troubleshooting.html page (also available in the PDF)
373
391
  collects troubleshooting ideas from the mailing list.
374
-
375
392
  * The "Getting Started":getting_started.html has been rewritten to cover all
376
393
  you need to know about downloading and installing Buildr on Linux, OS/X,
377
394
  Windows and with JRuby (1.1 or later).
378
-
379
395
  * A new "Contributing":contributing.html page has more details on how to file
380
396
  bugs, policy for submitting patches, running Buildr test cases, and helping
381
397
  with the documentation.
382
-
383
398
  * A new page for "Settings and Profiles":settings_profiles.html.
384
-
385
399
  * The "Extending Buildr":extending.html page that deals with writing your own
386
400
  tasks, creating extensions and specifying alternative layouts.
387
-
388
- * The site also includes "RSpec report":specs.html and "Test coverage
389
- report":coverage/index.html.
401
+ * The site also includes "RSpec report":specs.html which provides the official
402
+ specification against which we test each release.
@@ -1,4 +1,4 @@
1
- #!/bin/sh
1
+ #!/usr/bin/env ruby
2
2
  # Licensed to the Apache Software Foundation (ASF) under one or more
3
3
  # contributor license agreements. See the NOTICE file distributed with this
4
4
  # work for additional information regarding copyright ownership. The ASF
@@ -393,10 +393,11 @@ def perform(options)
393
393
  # Create github origin aliases
394
394
  `git config alias.get "!git apache-fetch && git fetch origin"`
395
395
  `git config alias.mrg "!git apache-merge && git merge origin"`
396
+ `git config alias.rbs "!git rebase --onto #{svn_branch} origin/master master"`
396
397
  `git config alias.put "!git apache-push && git push origin"`
397
398
 
398
399
  # This is Victor's cronjob
399
- `git config alias.synchronize "!git get && git mrg && git put"`
400
+ `git config alias.synchronize "!git get && git rbs && git put"`
400
401
 
401
402
  # Final notices.
402
403
  puts <<-NOTICE + notice
@@ -14,7 +14,7 @@
14
14
  # the License.
15
15
 
16
16
  - Main:
17
- - Welcome: /
17
+ - Welcome: index.html
18
18
  - Download and Installation: download.html
19
19
  - Printable PDF: buildr.pdf
20
20
  - New: whats_new.html
@@ -18,14 +18,13 @@ $KCODE = 'utf8'
18
18
  # in order to work around a bug in jruby (1.0.1 and trunk as of oct11, 2007)
19
19
  # needle and net/ssh need to be loaded before -anything- else. please see
20
20
  # http://jira.codehaus.org/browse/JRUBY-1188 for more info.
21
- require 'needle'
22
21
  require 'net/ssh'
23
22
 
24
23
  require 'highline/import'
25
24
  require 'builder' # A different kind of buildr, one we use to create XML.
26
25
 
27
26
  module Buildr
28
- VERSION = '1.3.0'.freeze # unless const_defined?(:VERSION)
27
+ VERSION = '1.3.1'.freeze # unless const_defined?(:VERSION)
29
28
  end
30
29
 
31
30
  require 'buildr/core'
@@ -173,9 +173,10 @@ module Buildr
173
173
  standard_exception_handling do
174
174
  find_buildfile
175
175
  load_gems
176
+ load_artifacts
177
+ load_tasks
176
178
  load_buildfile
177
179
  top_level
178
- load_tasks
179
180
  end
180
181
  end
181
182
  if verbose
@@ -187,6 +188,16 @@ module Buildr
187
188
  end
188
189
  end
189
190
 
191
+ # Load artifact specs from the build.yaml file, making them available
192
+ # by name ( ruby symbols ).
193
+ def load_artifacts #:nodoc:
194
+ hash = settings.build['artifacts']
195
+ return unless hash
196
+ raise "Expected 'artifacts' element to be a hash" unless Hash === hash
197
+ # Currently we only use one artifact namespace to rule them all. (the root NS)
198
+ Buildr::ArtifactNamespace.load(:root => hash)
199
+ end
200
+
190
201
  # Load/install all Gems specified in build.yaml file.
191
202
  def load_gems #:nodoc:
192
203
  missing_deps, installed = listed_gems.partition { |gem| gem.is_a?(Gem::Dependency) }
@@ -18,7 +18,6 @@ require 'rake'
18
18
  require 'tempfile'
19
19
  require 'open-uri'
20
20
  $LOADED_FEATURES << 'rubygems/open-uri.rb' # avoid loading rubygems' open-uri
21
- require 'uri/open-sftp'
22
21
  require 'buildr/core/util'
23
22
  require 'buildr/core/transports'
24
23