buildr 1.4.17 → 1.4.18

Sign up to get free protection for your applications and to get access to all the features.
data/addon/buildr/pmd.rb CHANGED
@@ -25,8 +25,10 @@ module Buildr
25
25
  # The specs for requirements
26
26
  def dependencies
27
27
  [
28
- 'net.sourceforge.pmd:pmd:jar:5.0.5',
28
+ 'net.sourceforge.pmd:pmd:jar:5.1.1',
29
29
  'jaxen:jaxen:jar:1.1.1',
30
+ 'commons-io:commons-io:jar:2.2',
31
+ 'com.beust:jcommander:jar:1.27',
30
32
  'asm:asm:jar:3.2'
31
33
  ]
32
34
  end
@@ -83,7 +85,7 @@ module Buildr
83
85
  attr_writer :rule_set_files
84
86
 
85
87
  def rule_set_files
86
- @rule_set_files ||= ['rulesets/java/basic.xml','rulesets/java/imports.xml','rulesets/java/unusedcode.xml']
88
+ @rule_set_files ||= ['rulesets/java/basic.xml', 'rulesets/java/imports.xml', 'rulesets/java/unusedcode.xml', 'rulesets/java/finalizers.xml', 'rulesets/java/braces.xml']
87
89
  end
88
90
 
89
91
  attr_writer :rule_set_paths
@@ -2,6 +2,24 @@
2
2
 
3
3
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4
4
 
5
+ <!--
6
+ Licensed to the Apache Software Foundation (ASF) under one or more
7
+ contributor license agreements. See the NOTICE file distributed with
8
+ this work for additional information regarding copyright ownership.
9
+ The ASF licenses this file to You under the Apache License, Version 2.0
10
+ (the "License"); you may not use this file except in compliance with
11
+ the License. You may obtain a copy of the License at
12
+
13
+ http://www.apache.org/licenses/LICENSE-2.0
14
+
15
+ Unless required by applicable law or agreed to in writing, software
16
+ distributed under the License is distributed on an "AS IS" BASIS,
17
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ See the License for the specific language governing permissions and
19
+ limitations under the License.
20
+ -->
21
+
22
+
5
23
  <xsl:template match="/">
6
24
  <html>
7
25
  <head>
data/buildr.gemspec CHANGED
@@ -62,7 +62,6 @@ for those one-off tasks, with a language that's a joy to use.
62
62
  spec.add_dependency "jruby-pageant", '1.1.1' if $platform.to_s == 'java'
63
63
  spec.add_dependency 'rubyzip', '0.9.9'
64
64
  spec.add_dependency 'json_pure', '1.8.0'
65
- spec.add_dependency 'rubyforge', '2.0.4'
66
65
  spec.add_dependency 'hoe', '3.7.1'
67
66
  spec.add_dependency 'rjb', '1.4.8' if ($platform.to_s == 'x86-mswin32' || $platform.to_s == 'ruby')
68
67
  spec.add_dependency 'atoulme-Antwrap', '~> 0.7.4'
@@ -48,7 +48,7 @@
48
48
  <ol class="toc">
49
49
  <li><a href='rdoc/Buildr.html'>API</a></li>
50
50
  <li><a href='http://docs.rubyrake.org'>Rake</a></li>
51
- <li><a href='http://antwrap.rubyforge.org'>Antwrap</a></li>
51
+ <li><a href='https://rubygems.org/gems/Antwrap'>Antwrap</a></li>
52
52
  <li><a href='http://cwiki.apache.org/confluence/display/BUILDR/Common+Problems+and+Solutions'>Troubleshooting</a></li>
53
53
  </ol>
54
54
  </li>
data/doc/download.textile CHANGED
@@ -13,23 +13,33 @@ h2(#dists). Official & Unofficial Distributions
13
13
 
14
14
  The official Apache distribution consists of the digitally signed binaries (gems) and source packages "available below":#dist. To install these binaries, you must first download them to disk and then install them using the @gem install@ command (or @rake install@ for a source distribution).
15
15
 
16
- In addition, contributors to this project maintain a separate distribution over on "RubyForge":http://rubyforge.org/projects/buildr. Using this distribution, you're able to install Buildr directly from the remote gem repository and to automatically upgrade when a new release comes out. The RubyForge distribution is *not* an official Apache distribution.
17
-
18
16
  The source code is included in both source and binary distribution, the Gem distribution expands the source code into your local Gem repository. That's in addition to getting the source code directly. Learn more about working with source code and "living on the edge":contributing.html#edge.
19
17
 
20
18
 
21
19
  h2(#dist). Binaries and Source Code
22
20
 
21
+ h3. buildr 1.4.17 (2014-05-25)
22
+
23
+ |_. Package |_. MD5 Checksum |_. PGP |
24
+ | "buildr-1.4.17-java.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.4.17/buildr-1.4.17-java.gem | "0203c7bc6bbf816b58c50143816b2941":http://www.apache.org/dist/buildr/1.4.17/buildr-1.4.17-java.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.17/buildr-1.4.17-java.gem.asc |
25
+ | "buildr-1.4.17-x86-mswin32.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.4.17/buildr-1.4.17-x86-mswin32.gem | "722889cf25682bf804be32ec318f72d7":http://www.apache.org/dist/buildr/1.4.17/buildr-1.4.17-x86-mswin32.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.17/buildr-1.4.17-x86-mswin32.gem.asc |
26
+ | "buildr-1.4.17.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.4.17/buildr-1.4.17.gem | "8cdcc70fd881adb4608cfc21d9ffe570":http://www.apache.org/dist/buildr/1.4.17/buildr-1.4.17.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.17/buildr-1.4.17.gem.asc |
27
+ | "buildr-1.4.17.tgz":http://www.apache.org/dyn/closer.cgi/buildr/1.4.17/buildr-1.4.17.tgz | "5dcfaf71703dfb010b735af561555d3a":http://www.apache.org/dist/buildr/1.4.17/buildr-1.4.17.tgz.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.17/buildr-1.4.17.tgz.asc |
28
+ | "buildr-1.4.17.zip":http://www.apache.org/dyn/closer.cgi/buildr/1.4.17/buildr-1.4.17.zip | "783d46ee8f198672815c408ea14851de":http://www.apache.org/dist/buildr/1.4.17/buildr-1.4.17.zip.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.17/buildr-1.4.17.zip.asc |
29
+
30
+ p>. ("Release signing keys":http://www.apache.org/dist/buildr/1.4.17/KEYS)
31
+
32
+
23
33
  h3. buildr 1.4.16 (2014-05-03)
24
34
 
25
35
  |_. Package |_. MD5 Checksum |_. PGP |
26
- | "buildr-1.4.16-java.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.4.16/buildr-1.4.16-java.gem | "da920dd00f4b09f01aa0e5c71a8a87e5":http://www.apache.org/dist/buildr/1.4.16/buildr-1.4.16-java.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.16/buildr-1.4.16-java.gem.asc |
27
- | "buildr-1.4.16-x86-mswin32.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.4.16/buildr-1.4.16-x86-mswin32.gem | "10180c59e1b11da4d6f499fd3f0d43bb":http://www.apache.org/dist/buildr/1.4.16/buildr-1.4.16-x86-mswin32.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.16/buildr-1.4.16-x86-mswin32.gem.asc |
28
- | "buildr-1.4.16.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.4.16/buildr-1.4.16.gem | "cfc81dacdd825928a5e1a8b55735895b":http://www.apache.org/dist/buildr/1.4.16/buildr-1.4.16.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.16/buildr-1.4.16.gem.asc |
29
- | "buildr-1.4.16.tgz":http://www.apache.org/dyn/closer.cgi/buildr/1.4.16/buildr-1.4.16.tgz | "b3234fff8924589fe2826acecc7bc03e":http://www.apache.org/dist/buildr/1.4.16/buildr-1.4.16.tgz.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.16/buildr-1.4.16.tgz.asc |
30
- | "buildr-1.4.16.zip":http://www.apache.org/dyn/closer.cgi/buildr/1.4.16/buildr-1.4.16.zip | "a20af0a5046e84813561ae50ce58703c":http://www.apache.org/dist/buildr/1.4.16/buildr-1.4.16.zip.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.16/buildr-1.4.16.zip.asc |
36
+ | "buildr-1.4.16-java.gem":http://archive.apache.org/dist/buildr/1.4.16/buildr-1.4.16-java.gem | "da920dd00f4b09f01aa0e5c71a8a87e5":http://archive.apache.org/dist/buildr/1.4.16/buildr-1.4.16-java.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.16/buildr-1.4.16-java.gem.asc |
37
+ | "buildr-1.4.16-x86-mswin32.gem":http://archive.apache.org/dist/buildr/1.4.16/buildr-1.4.16-x86-mswin32.gem | "10180c59e1b11da4d6f499fd3f0d43bb":http://archive.apache.org/dist/buildr/1.4.16/buildr-1.4.16-x86-mswin32.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.16/buildr-1.4.16-x86-mswin32.gem.asc |
38
+ | "buildr-1.4.16.gem":http://archive.apache.org/dist/buildr/1.4.16/buildr-1.4.16.gem | "cfc81dacdd825928a5e1a8b55735895b":http://archive.apache.org/dist/buildr/1.4.16/buildr-1.4.16.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.16/buildr-1.4.16.gem.asc |
39
+ | "buildr-1.4.16.tgz":http://archive.apache.org/dist/buildr/1.4.16/buildr-1.4.16.tgz | "b3234fff8924589fe2826acecc7bc03e":http://archive.apache.org/dist/buildr/1.4.16/buildr-1.4.16.tgz.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.16/buildr-1.4.16.tgz.asc |
40
+ | "buildr-1.4.16.zip":http://archive.apache.org/dist/buildr/1.4.16/buildr-1.4.16.zip | "a20af0a5046e84813561ae50ce58703c":http://archive.apache.org/dist/buildr/1.4.16/buildr-1.4.16.zip.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.16/buildr-1.4.16.zip.asc |
31
41
 
32
- p>. ("Release signing keys":http://www.apache.org/dist/buildr/1.4.16/KEYS)
42
+ p>. ("Release signing keys":http://archive.apache.org/dist/buildr/1.4.16/KEYS)
33
43
 
34
44
 
35
45
  h3. buildr 1.4.15 (2013-11-06)
@@ -105,11 +105,10 @@ module LinesOfCode
105
105
  project.recursive_task 'loc' do |task|
106
106
  lines = task.prerequisites.map { |path|
107
107
  Dir["#{path}/**/*"]
108
- }.flatten.uniq.inject(0) { |total, file|
109
- total = 0 if total.nil?
110
- if File.file? file then
111
- total + File.readlines(file).count
112
- end
108
+ }.uniq.select { |file|
109
+ File.file?(file)
110
+ }.inject(0) { |total, file|
111
+ total + File.readlines(file).count
113
112
  }
114
113
  puts "Project #{project.name} has #{lines} lines of code"
115
114
  end
data/doc/index.textile CHANGED
@@ -46,6 +46,26 @@ So let's get started. You can "read the documentation online":quick_start.html,
46
46
 
47
47
  h2(#news). What's New
48
48
 
49
+ Highlights from Buildr 1.4.18 (2014-06-24)
50
+ * Fixed: BUILDR-699 - Update the custom_pom addon to avoid failure when
51
+ used with zip packages.
52
+ * Fixed: BUILDR-694 - "buildr upload" fails: wrong number of arguments in
53
+ progress bar read() in Ruby 2.1.0. Submitted By Mark Reibert.
54
+ * Change: Remove support for uploads to RubyForge.org with gem dependencies
55
+ as the site no longer exists.
56
+ * Change: BUILDR-664 - Update Checkstyle addon so that extra_dependencies is
57
+ the project dependencies by default. Move the checkstyle dependencies
58
+ to the start of the classpath to avoid problems running checkstyle.
59
+ Submitted by Dieter Vrancken.
60
+ * Added: Extend Intellij IDEA support to allow creation of glassfish,
61
+ java and ruby scrip configurations.
62
+ * Change: Include additional rules in default pmd rule set:
63
+ * Change: Upgrade the version of PMD in use to 5.1.1 and add additional
64
+ default rule sets 'finalizers' and 'braces'.
65
+ * Change: Supply a default xsl file for generating the jdepend report.
66
+ * Fixed: Fix the naming of css_lint addon file so it is made available
67
+ as an addon.
68
+
49
69
  Highlights from Buildr 1.4.17 (2014-05-25)
50
70
 
51
71
  * Change: Supply a default xsl file for generating the checkstyle report.
@@ -289,6 +289,6 @@ For a quicker read (and much more humor), "Why’s (Poignant) Guide to Ruby":htt
289
289
 
290
290
  *Rake* Buildr is based on Rake, a Ruby build system that handles tasks and dependencies. Check out the "Rake documentation":http://docs.rubyrake.org/ for more information.
291
291
 
292
- *AntWrap* Buildr uses AntWrap, for configuring and running Ant tasks. You can learn more from the "Antwrap documentation":http://antwrap.rubyforge.org/.
292
+ *AntWrap* Buildr uses AntWrap, for configuring and running Ant tasks. You can learn more from the "Antwrap documentation":https://rubygems.org/gems/Antwrap.
293
293
 
294
294
  *YAML* Buildr uses YAML for its profiles. You can "learn more about YAML here":http://www.yaml.org, and use this handy "YAML quick reference":http://www.yaml.org/refcard.html.
@@ -205,9 +205,9 @@ The purpose of the buildfile is to define your projects, and the various tasks a
205
205
 
206
206
  There are several mechanisms for developing extensions and build features across projects which we cover in more details in the section "Extending Buildr":extending.html. Here we will talk about using extensions that are distributed in the form of RubyGems.
207
207
 
208
- "RubyGems":http://rubygems.rubyforge.org provides the @gem@ command line tool that you can use to search, install, upgrade, package and distribute gems. It installs all gems into a local repository that is shared across your builds and all other Ruby applications you may have running. You can install a gem from a local file, or download and install it from any number of remote repositories.
208
+ "RubyGems":http://rubygems.org provides the @gem@ command line tool that you can use to search, install, upgrade, package and distribute gems. It installs all gems into a local repository that is shared across your builds and all other Ruby applications you may have running. You can install a gem from a local file, or download and install it from any number of remote repositories.
209
209
 
210
- RubyGems is preconfigured to use the "RubyForge":http://rubyforge.org repository. You'll find a large number of open source Ruby libraries there, including Buildr itself and all its dependencies. RubyForge provides a free account that you can use to host your projects and distribute your gems (you can use RubyForge strictly for distribution, as we do with Buildr).
210
+ RubyGems is preconfigured to use the "RubyForge":http://rubygems.org repository. You'll find a large number of open source Ruby libraries there, including Buildr itself and all its dependencies.
211
211
 
212
212
  You can also set up your own private repository and use it instead or in addition to RubyForge. Use the @gem sources@ command to add repositories, and the @gem server@ command to run a remote repository. You can see all available options by running @gem help@.
213
213
 
@@ -336,8 +336,8 @@ module URI
336
336
  request.content_length = content.size
337
337
  content.rewind
338
338
  stream = Object.new
339
- class << stream ; self ;end.send :define_method, :read do |count|
340
- bytes = content.read(count)
339
+ class << stream ; self ;end.send :define_method, :read do |*args|
340
+ bytes = content.read(*args)
341
341
  progress << bytes if bytes
342
342
  bytes
343
343
  end
@@ -822,6 +822,70 @@ module Buildr #:nodoc:
822
822
  end
823
823
  end
824
824
 
825
+ def add_java_configuration(project, classname, options = {})
826
+ args = options[:args] || ''
827
+ dir = options[:dir] || "file://$PROJECT_DIR$/"
828
+ debug_port = options[:debug_port] || 2599
829
+ module_name = options[:module_name] || project.iml.id
830
+ jvm_args = options[:jvm_args] || ''
831
+ name = options[:name] || classname
832
+
833
+ add_to_composite_component(self.configurations) do |xml|
834
+ xml.configuration(:name => name, :type => 'Application', :factoryName => 'Application', :default => !!options[:default]) do |xml|
835
+ xml.extension(:name => 'coverage', :enabled => 'false', :merge => 'false', :sample_coverage => 'true', :runner => 'idea')
836
+ xml.option(:name => 'MAIN_CLASS_NAME', :value => classname)
837
+ xml.option(:name => 'VM_PARAMETERS', :value => jvm_args)
838
+ xml.option(:name => 'PROGRAM_PARAMETERS', :value => args)
839
+ xml.option(:name => 'WORKING_DIRECTORY', :value => dir)
840
+ xml.option(:name => 'ALTERNATIVE_JRE_PATH_ENABLED', :value => 'false')
841
+ xml.option(:name => 'ALTERNATIVE_JRE_PATH', :value => '')
842
+ xml.option(:name => 'ENABLE_SWING_INSPECTOR', :value => 'false')
843
+ xml.option(:name => 'ENV_VARIABLES')
844
+ xml.option(:name => 'PASS_PARENT_ENVS', :value => 'true')
845
+ xml.module(:name => module_name)
846
+ xml.envs
847
+ xml.RunnerSettings(:RunnerId => 'Debug') do |xml|
848
+ xml.option(:name => 'DEBUG_PORT', :value => debug_port.to_s)
849
+ xml.option(:name => 'TRANSPORT', :value => '0')
850
+ xml.option(:name => 'LOCAL', :value => 'true')
851
+ end
852
+ xml.RunnerSettings(:RunnerId => 'Run')
853
+ xml.ConfigurationWrapper(:RunnerId => 'Debug')
854
+ xml.ConfigurationWrapper(:RunnerId => 'Run')
855
+ xml.method
856
+ end
857
+ end
858
+ end
859
+
860
+ def add_ruby_script_configuration(project, script, options = {})
861
+ args = options[:args] || ''
862
+ path = ::Buildr::Util.relative_path(File.expand_path(script), project.base_dir)
863
+ name = options[:name] || File.basename(script)
864
+ dir = options[:dir] || "$MODULE_DIR$/#{path}"
865
+ sdk = options[:sdk] || 'rbenv: ' + (IO.read(File.dirname(__FILE__) + '/../.ruby-version').trim rescue "jruby-#{RUBY_VERSION}")
866
+
867
+ add_to_composite_component(self.configurations) do |xml|
868
+ xml.configuration(:name => name, :type => 'RubyRunConfigurationType', :factoryName => 'Ruby', :default => !!options[:default]) do |xml|
869
+
870
+ xml.module(:name => project.iml.id)
871
+ xml.RUBY_RUN_CONFIG(:NAME => 'RUBY_ARGS', :VALUE => '-e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift)')
872
+ xml.RUBY_RUN_CONFIG(:NAME => 'WORK DIR', :VALUE => dir)
873
+ xml.RUBY_RUN_CONFIG(:NAME => 'SHOULD_USE_SDK', :VALUE => 'true')
874
+ xml.RUBY_RUN_CONFIG(:NAME => 'ALTERN_SDK_NAME', :VALUE => sdk)
875
+ xml.RUBY_RUN_CONFIG(:NAME => 'myPassParentEnvs', :VALUE => 'true')
876
+
877
+ xml.envs
878
+ xml.EXTENSION(:ID => 'BundlerRunConfigurationExtension', :bundleExecEnabled => 'false')
879
+ xml.EXTENSION(:ID => 'JRubyRunConfigurationExtension')
880
+
881
+ xml.RUBY_RUN_CONFIG(:NAME => 'SCRIPT_PATH', :VALUE => script)
882
+ xml.RUBY_RUN_CONFIG(:NAME => 'SCRIPT_ARGS', :VALUE => args)
883
+ xml.RunnerSettings(:RunnerId => 'RubyDebugRunner')
884
+ xml.ConfigurationWrapper(:RunnerId => 'RubyDebugRunner')
885
+ end
886
+ end
887
+ end
888
+
825
889
  def add_gwt_configuration(launch_page, project, options = {})
826
890
  name = options[:name] || "Run #{launch_page}"
827
891
  shell_parameters = options[:shell_parameters] || ""
@@ -839,6 +903,73 @@ module Buildr #:nodoc:
839
903
  end
840
904
  end
841
905
 
906
+ def add_glassfish_configuration(project, options = {})
907
+ artifact_name = options[:name] || project.iml.id
908
+ server_name = options[:server_name] || 'Glassfish 4.0.0'
909
+ domain_name = options[:domain] || project.iml.id
910
+ domain_port = options[:port] || '9009'
911
+ packaged = options[:packaged] || {}
912
+ exploded = options[:exploded] || {}
913
+
914
+ add_to_composite_component(self.configurations) do |xml|
915
+ xml.configuration(:name => server_name, :type => 'GlassfishConfiguration', :factoryName => 'Local', :default => false, :APPLICATION_SERVER_NAME => server_name) do |xml|
916
+ xml.option(:name => 'OPEN_IN_BROWSER', :value => 'false')
917
+ xml.option(:name => 'UPDATING_POLICY', :value => 'restart-server')
918
+
919
+ xml.deployment do |deployment|
920
+ packaged.each do |name, deployable|
921
+ artifact = Buildr.artifact(deployable)
922
+ artifact.invoke
923
+ deployment.file(:path => resolve_path(artifact.to_s)) do |file|
924
+ file.settings do |settings|
925
+ settings.option(:name => 'contextRoot', :value => "/#{name}")
926
+ settings.option(:name => 'defaultContextRoot', :value => 'false')
927
+ end
928
+ end
929
+ end
930
+ exploded.each do |deployable_name|
931
+ deployment.artifact(:name => deployable_name) do |artifact|
932
+ artifact.settings
933
+ end
934
+ end
935
+ end
936
+
937
+ xml.tag! 'server-settings' do |server_settings|
938
+ server_settings.option(:name => 'VIRTUAL_SERVER')
939
+ server_settings.option(:name => 'DOMAIN', :value => domain_name.to_s)
940
+ server_settings.option(:name => 'PRESERVE', :value => 'false')
941
+ server_settings.option(:name => 'USERNAME', :value => 'admin')
942
+ server_settings.option(:name => 'PASSWORD', :value => '')
943
+ end
944
+
945
+ xml.predefined_log_file(:id => 'GlassFish', :enabled => 'true')
946
+
947
+ xml.extension(:name => 'coverage', :enabled => 'false', :merge => 'false', :sample_coverage => 'true', :runner => 'idea')
948
+
949
+ xml.RunnerSettings(:RunnerId => 'Cover')
950
+
951
+ add_glassfish_runner_settings(xml, 'Cover')
952
+ add_glassfish_configuration_wrapper(xml, 'Cover')
953
+
954
+ add_glassfish_runner_settings(xml, 'Debug', {
955
+ :DEBUG_PORT => domain_port.to_s,
956
+ :TRANSPORT => '0',
957
+ :LOCAL => 'true',
958
+ })
959
+ add_glassfish_configuration_wrapper(xml, 'Debug')
960
+
961
+ add_glassfish_runner_settings(xml, 'Run')
962
+ add_glassfish_configuration_wrapper(xml, 'Run')
963
+
964
+ xml.method do |method|
965
+ method.option(:name => 'BuildArtifacts', :enabled => 'true') do |option|
966
+ option.artifact(:name => artifact_name)
967
+ end
968
+ end
969
+ end
970
+ end
971
+ end
972
+
842
973
  def add_default_testng_configuration(options = {})
843
974
  jvm_args = options[:jvm_args] || '-ea'
844
975
  dir = options[:dir] || '$PROJECT_DIR$'
@@ -875,6 +1006,32 @@ module Buildr #:nodoc:
875
1006
 
876
1007
  protected
877
1008
 
1009
+ def add_glassfish_runner_settings(xml, name, options = {})
1010
+ xml.RunnerSettings(:RunnerId => name.to_s) do |runner_settings|
1011
+ options.each do |key, value|
1012
+ runner_settings.option(:name => key.to_s, :value => value.to_s)
1013
+ end
1014
+ end
1015
+ end
1016
+
1017
+ def add_glassfish_configuration_wrapper(xml, name)
1018
+ xml.ConfigurationWrapper(:VM_VAR => 'JAVA_OPTS', :RunnerId => name.to_s) do |configuration_wrapper|
1019
+ configuration_wrapper.option(:name => 'USE_ENV_VARIABLES', :value => 'true')
1020
+ configuration_wrapper.STARTUP do |startup|
1021
+ startup.option(:name => 'USE_DEFAULT', :value => 'true')
1022
+ startup.option(:name => 'SCRIPT', :value => '')
1023
+ startup.option(:name => 'VM_PARAMETERS', :value => '')
1024
+ startup.option(:name => 'PROGRAM_PARAMETERS', :value => '')
1025
+ end
1026
+ configuration_wrapper.SHUTDOWN do |shutdown|
1027
+ shutdown.option(:name => 'USE_DEFAULT', :value => 'true')
1028
+ shutdown.option(:name => 'SCRIPT', :value => '')
1029
+ shutdown.option(:name => 'VM_PARAMETERS', :value => '')
1030
+ shutdown.option(:name => 'PROGRAM_PARAMETERS', :value => '')
1031
+ end
1032
+ end
1033
+ end
1034
+
878
1035
  def artifact_content(xml, project, projects, options)
879
1036
  emit_module_output(xml, projects)
880
1037
  emit_jpa_descriptors(xml, project, options)
@@ -13,7 +13,6 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- autoload :RubyForge, 'rubyforge'
17
16
  Gem.autoload :Package, 'rubygems/package'
18
17
 
19
18
  module Buildr #:nodoc:
@@ -23,23 +22,14 @@ module Buildr #:nodoc:
23
22
  def initialize(*args)
24
23
  super
25
24
  @spec = Gem::Specification.new
26
- prepare do
27
- include(changelog) if changelog
28
- end
29
25
  end
30
26
 
31
- attr_accessor :changelog
32
-
33
27
  def spec
34
28
  yield @spec if block_given?
35
29
  @spec
36
30
  end
37
31
 
38
32
  def upload
39
- rubyforge = RubyForge.new
40
- rubyforge.login
41
- rubyforge.userconfig.merge!('release_changes'=>changelog.to_s, 'preformatted'=>true) if changelog
42
- rubyforge.add_release spec.rubyforge_project.downcase, spec.name.downcase, spec.version, package(:gem).to_s
43
33
  end
44
34
 
45
35
  private
@@ -62,10 +52,8 @@ module Buildr #:nodoc:
62
52
  end
63
53
  end
64
54
  end
65
-
66
55
  end
67
56
 
68
-
69
57
  module PackageAsGem #:nodoc:
70
58
 
71
59
  def package_as_gem(file_name) #:nodoc:
@@ -83,11 +71,9 @@ module Buildr #:nodoc:
83
71
  end
84
72
  end
85
73
  end
86
-
87
74
  end
88
75
 
89
76
  class Project
90
77
  include PackageAsGem
91
78
  end
92
-
93
79
  end
@@ -14,5 +14,5 @@
14
14
  # the License.
15
15
 
16
16
  module Buildr #:nodoc:
17
- VERSION = '1.4.17'.freeze
17
+ VERSION = '1.4.18'.freeze
18
18
  end
data/rakelib/checks.rake CHANGED
@@ -13,9 +13,8 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
-
17
16
  desc 'Check that source files contain the Apache license'
18
- task 'license' => FileList['{addond,lib,doc,rakelib}/**/*.{rb,rake,java}', 'buildr.gemspec', 'Rakefile'] do |task|
17
+ task 'license' => FileList['{addon,lib,doc,rakelib}/**/*.{xsl,rb,rake,java}', 'buildr.gemspec', 'Rakefile'] do |task|
19
18
  puts 'Checking that files contain the Apache license ... '
20
19
  required = task.prerequisites.select { |fn| File.file?(fn) }
21
20
  missing = required.reject { |fn|
@@ -26,3 +25,9 @@ task 'license' => FileList['{addond,lib,doc,rakelib}/**/*.{rb,rake,java}', 'buil
26
25
  fail "#{missing.join(', ')} missing Apache License, please add it before making a release!" unless missing.empty?
27
26
  puts '[x] Source files contain the Apache license'
28
27
  end
28
+
29
+ desc 'Check that files in addon directory do not have the .rake suffix.'
30
+ task 'addon_extensions:check' do
31
+ bad_files = FileList['addon/**/*.rake']
32
+ fail "#{bad_files.join(', ')} named with .rake extension but should be .rb, fix them before making a release!" unless bad_files.empty?
33
+ end
data/rakelib/release.rake CHANGED
@@ -47,24 +47,6 @@ task 'release' => %w{setup-local-site-svn} do
47
47
  puts "[X] Uploaded new site to #{spec.name}.apache.org"
48
48
  end.call
49
49
 
50
- # Upload binary and source packages to RubyForge.
51
- lambda do
52
- # update rubyforge projects, processors, etc. in local config
53
- sh 'rubyforge', 'config'
54
- files = FileList["_release/#{spec.version}/dist/*.{gem,tgz,zip}"]
55
- puts "Uploading #{spec.version} to RubyForge ... "
56
- rubyforge = RubyForge.new.configure
57
- rubyforge.login
58
- rubyforge.userconfig.merge!('release_changes'=>"_release/#{spec.version}/CHANGES", 'preformatted' => true)
59
- rubyforge.add_release spec.rubyforge_project.downcase, spec.name.downcase, spec.version.to_s, *files
60
-
61
- puts "Posting news to RubyForge ... "
62
- changes = File.read("_release/#{spec.version}/CHANGES")[/.*?\n(.*)/m, 1]
63
- rubyforge.post_news spec.rubyforge_project.downcase, "Buildr #{spec.version} released",
64
- "#{spec.description}\n\nNew in Buildr #{spec.version}:\n#{changes.gsub(/^/, ' ')}\n"
65
- puts "[X] Uploaded gems and source files to #{spec.name}.rubyforge.org"
66
- end.call
67
-
68
50
  # Push gems to Rubyforge.org
69
51
  lambda do
70
52
  files = FileList["_release/#{spec.version}/dist/*.{gem}"]
@@ -86,7 +68,7 @@ task 'release' => %w{setup-local-site-svn} do
86
68
  lambda do
87
69
  version = `git describe --tags --always`.strip
88
70
  unless version == spec.version
89
- sh 'git', 'tag', '-m', "'Release #{spec.version}'", spec.version do |ok, res|
71
+ sh 'git', 'tag', '-m', "'Release #{spec.version}'", spec.version.to_s do |ok, res|
90
72
  if ok
91
73
  puts "[X] Tagged this release as #{spec.version} ... "
92
74
  else
data/rakelib/stage.rake CHANGED
@@ -13,7 +13,6 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- require 'rubyforge'
17
16
  require 'digest/md5'
18
17
  require 'digest/sha1'
19
18
 
@@ -77,6 +76,7 @@ task 'prepare' do |task, args|
77
76
  end.call
78
77
 
79
78
  task('license').invoke
79
+ task('addon_extensions:check').invoke
80
80
 
81
81
  # Need Prince to generate PDF
82
82
  lambda do
@@ -85,14 +85,6 @@ task 'prepare' do |task, args|
85
85
  puts '[X] We have prince available'
86
86
  end.call
87
87
 
88
- # Need RubyForge to upload new release files.
89
- lambda do
90
- puts "[!] Make sure you have admin privileges to make a release on RubyForge"
91
- rubyforge = RubyForge.new.configure
92
- rubyforge.login
93
- rubyforge.scrape_project(spec.name)
94
- end.call
95
-
96
88
  raise "Can not run stage process under jruby" if RUBY_PLATFORM[/java/]
97
89
  raise "Can not run staging process under older rubies" unless RUBY_VERSION >= '1.9'
98
90
  end
@@ -13,6 +13,10 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
+ # The testing framework does not support loading and then unloading of addons
17
+ # thus we can not test this addon until we figure out a mechanism of supporting
18
+ # unloading addon as the test progresses
19
+ if false
16
20
 
17
21
  require File.expand_path('../spec_helpers', File.dirname(__FILE__))
18
22
  require File.expand_path(File.join(File.dirname(__FILE__), '..', 'xpath_matchers'))
@@ -147,3 +151,5 @@ describe Buildr::CustomPom do
147
151
  end
148
152
  end
149
153
  end
154
+
155
+ end
@@ -248,7 +248,7 @@ describe Repositories, 'remote' do
248
248
  it 'should lookup in array order' do
249
249
  repositories.remote = [ 'http://buildr.apache.org/repository/noexist', 'http://example.org' ]
250
250
  order = ['com', 'org']
251
- URI.should_receive(:download).any_number_of_times do |uri, target, options|
251
+ URI.stub(:download) do |uri, target, options|
252
252
  order.shift if order.first && uri.to_s[order.first]
253
253
  fail URI::NotFoundError unless order.empty?
254
254
  write target
@@ -1023,7 +1023,7 @@ describe Rake::Task, ' artifacts:sources' do
1023
1023
 
1024
1024
  it 'should download sources for all specified artifacts' do
1025
1025
  artifact 'group:id:jar:1.0'
1026
- URI.should_receive(:download).any_number_of_times.and_return { |uri, target| write target }
1026
+ URI.stub(:download).and_return { |uri, target| write target }
1027
1027
  lambda { task('artifacts:sources').invoke }.should change { File.exist?('home/.m2/repository/group/id/1.0/id-1.0-sources.jar') }.to(true)
1028
1028
  end
1029
1029
 
@@ -1037,7 +1037,7 @@ describe Rake::Task, ' artifacts:sources' do
1037
1037
 
1038
1038
  before do
1039
1039
  artifact 'group:id:jar:1.0'
1040
- URI.should_receive(:download).any_number_of_times.and_raise(URI::NotFoundError)
1040
+ URI.should_receive(:download).and_raise(URI::NotFoundError)
1041
1041
  end
1042
1042
 
1043
1043
  it 'should not fail' do
@@ -1062,7 +1062,7 @@ describe Rake::Task, ' artifacts:javadoc' do
1062
1062
 
1063
1063
  it 'should download javadoc for all specified artifacts' do
1064
1064
  artifact 'group:id:jar:1.0'
1065
- URI.should_receive(:download).any_number_of_times.and_return { |uri, target| write target }
1065
+ URI.should_receive(:download).and_return { |uri, target| write target }
1066
1066
  lambda { task('artifacts:javadoc').invoke }.should change { File.exist?('home/.m2/repository/group/id/1.0/id-1.0-javadoc.jar') }.to(true)
1067
1067
  end
1068
1068
 
@@ -1076,7 +1076,7 @@ describe Rake::Task, ' artifacts:javadoc' do
1076
1076
 
1077
1077
  before do
1078
1078
  artifact 'group:id:jar:1.0'
1079
- URI.should_receive(:download).any_number_of_times.and_raise(URI::NotFoundError)
1079
+ URI.should_receive(:download).and_raise(URI::NotFoundError)
1080
1080
  end
1081
1081
 
1082
1082
  it 'should not fail' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buildr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.17
4
+ version: 1.4.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Apache Buildr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-25 00:00:00.000000000 Z
11
+ date: 2014-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -94,20 +94,6 @@ dependencies:
94
94
  - - '='
95
95
  - !ruby/object:Gem::Version
96
96
  version: 1.8.0
97
- - !ruby/object:Gem::Dependency
98
- name: rubyforge
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - '='
102
- - !ruby/object:Gem::Version
103
- version: 2.0.4
104
- type: :runtime
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - '='
109
- - !ruby/object:Gem::Version
110
- version: 2.0.4
111
97
  - !ruby/object:Gem::Dependency
112
98
  name: hoe
113
99
  requirement: !ruby/object:Gem::Requirement
@@ -430,7 +416,7 @@ files:
430
416
  - addon/buildr/checkstyle.rb
431
417
  - addon/buildr/cobertura.rb
432
418
  - addon/buildr/css_lint-report.xsl
433
- - addon/buildr/css_lint.rake
419
+ - addon/buildr/css_lint.rb
434
420
  - addon/buildr/custom_pom.rb
435
421
  - addon/buildr/drb.rb
436
422
  - addon/buildr/emma.rb
@@ -443,6 +429,7 @@ files:
443
429
  - addon/buildr/javacc.rb
444
430
  - addon/buildr/javancss.rb
445
431
  - addon/buildr/jaxb_xjc.rb
432
+ - addon/buildr/jdepend-report.xsl
446
433
  - addon/buildr/jdepend.rb
447
434
  - addon/buildr/jetty.rb
448
435
  - addon/buildr/jibx.rb