realityforge-buildr 1.5.17 → 1.5.18
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.
- checksums.yaml +4 -4
- data/addon/buildr/git_auto_version.rb +1 -2
- data/addon/buildr/gwt.rb +0 -4
- data/addon/buildr/release_tool.rb +10 -0
- data/lib/buildr/ide/idea.rb +8 -46
- data/lib/buildr/java/annotation_processor.rb +3 -0
- data/lib/buildr/java/commands.rb +6 -1
- data/lib/buildr/java/compiler.rb +5 -1
- data/lib/buildr/java/tests.rb +2 -2
- data/lib/buildr/version.rb +1 -1
- data/rakelib/release.rake +2 -3
- data/spec/ide/idea_spec.rb +0 -68
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1932d8782ef4f08cac42f5941f4f98922ea4a5323ead460b1cfe429447a920b6
|
4
|
+
data.tar.gz: cfac26c31803f3579cef1876d48969c0c0166107636d107b851b34b2142d436b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc78f9279e57e8fbbad90e9bc7e0d60cc755f02d573a8a13f87986535549ece7c76597b6be505b54c6f8491ba6677dc267d949aebcf5304c1b5077a3de119404
|
7
|
+
data.tar.gz: 222f81cd3439630178a37adf725b1879946b3aa9eab171a1dce2dd996439aee8046992e9e95de2520bfb002aea535b70f9f8f3fb047044efcc0b9761ec9a60d8
|
@@ -22,8 +22,7 @@ module Buildr
|
|
22
22
|
unless project.version
|
23
23
|
version_suffix = ENV['BUILD_NUMBER'] ? "-#{ENV['BUILD_NUMBER']}" : ''
|
24
24
|
version_prefix = ENV['VERSION_PREFIX'] ? "#{ENV['VERSION_PREFIX']}-" : ''
|
25
|
-
git_version = `git describe --
|
26
|
-
git_version = git_version.gsub(/^v([0-9])/, '\1')
|
25
|
+
git_version = `git describe --always`.strip
|
27
26
|
project.version = version_prefix + git_version + version_suffix
|
28
27
|
end
|
29
28
|
end
|
data/addon/buildr/gwt.rb
CHANGED
@@ -148,6 +148,15 @@ module Buildr
|
|
148
148
|
header += "\n\n#{sub_header_text}" unless sub_header_text.empty?
|
149
149
|
header += "\n"
|
150
150
|
|
151
|
+
release_notes_file = options[:release_notes_summary_file]
|
152
|
+
if release_notes_file && File.exist?(release_notes_file)
|
153
|
+
summary_content = IO.read(release_notes_file).strip
|
154
|
+
unless summary_content.empty?
|
155
|
+
header += summary_content + "\n"
|
156
|
+
IO.write(release_notes_file, "\n")
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
151
160
|
header += <<CONTENT
|
152
161
|
|
153
162
|
Changes in this release:
|
@@ -156,6 +165,7 @@ CONTENT
|
|
156
165
|
IO.write('CHANGELOG.md', changelog.gsub("### Unreleased\n", header))
|
157
166
|
|
158
167
|
sh 'git reset 2>&1 1> /dev/null'
|
168
|
+
sh "git add #{release_notes_file}" if File.exist?(release_notes_file)
|
159
169
|
sh 'git add CHANGELOG.md'
|
160
170
|
sh 'git commit -m "Update CHANGELOG.md in preparation for release"'
|
161
171
|
end
|
data/lib/buildr/ide/idea.rb
CHANGED
@@ -431,40 +431,6 @@ module Buildr #:nodoc:
|
|
431
431
|
end
|
432
432
|
end
|
433
433
|
|
434
|
-
def add_ejb_facet(options = {})
|
435
|
-
name = options[:name] || 'EJB'
|
436
|
-
|
437
|
-
default_ejb_roots = [buildr_project.iml.main_source_directories, buildr_project.compile.sources, buildr_project.resources.sources].flatten.compact
|
438
|
-
ejb_roots = options[:ejb_roots] || default_ejb_roots
|
439
|
-
|
440
|
-
default_deployment_descriptors = []
|
441
|
-
%w(ejb-jar.xml glassfish-ejb-jar.xml ibm-ejb-jar-bnd.xml ibm-ejb-jar-ext-pme.xml ibm-ejb-jar-ext.xml jboss.xml jbosscmp-jdbc.xml openejb-jar.xml sun-cmp-mapping.xml sun-ejb-jar.xml weblogic-cmp-rdbms-jar.xml weblogic-ejb-jar.xml).
|
442
|
-
each do |descriptor|
|
443
|
-
ejb_roots.each do |path|
|
444
|
-
d = "#{path}/WEB-INF/#{descriptor}"
|
445
|
-
default_deployment_descriptors << d if File.exist?(d)
|
446
|
-
d = "#{path}/META-INF/#{descriptor}"
|
447
|
-
default_deployment_descriptors << d if File.exist?(d)
|
448
|
-
end
|
449
|
-
end
|
450
|
-
deployment_descriptors = options[:deployment_descriptors] || default_deployment_descriptors
|
451
|
-
|
452
|
-
add_facet(name, 'ejb') do |facet|
|
453
|
-
facet.configuration do |c|
|
454
|
-
c.descriptors do |d|
|
455
|
-
deployment_descriptors.each do |deployment_descriptor|
|
456
|
-
d.deploymentDescriptor :name => File.basename(deployment_descriptor), :url => file_path(deployment_descriptor)
|
457
|
-
end
|
458
|
-
end
|
459
|
-
c.ejbRoots do |e|
|
460
|
-
ejb_roots.each do |ejb_root|
|
461
|
-
e.root :url => file_path(ejb_root)
|
462
|
-
end
|
463
|
-
end
|
464
|
-
end
|
465
|
-
end
|
466
|
-
end
|
467
|
-
|
468
434
|
protected
|
469
435
|
|
470
436
|
def main_dependency_details
|
@@ -850,14 +816,16 @@ module Buildr #:nodoc:
|
|
850
816
|
value.list :size => '2' do |list|
|
851
817
|
list.item :index => '0', :class => 'java.lang.String', :itemvalue => 'org.jetbrains.annotations.Nullable'
|
852
818
|
list.item :index => '1', :class => 'java.lang.String', :itemvalue => 'javax.annotation.Nullable'
|
819
|
+
list.item :index => '2', :class => 'java.lang.String', :itemvalue => 'jsinterop.annotations.JsNullable'
|
853
820
|
end
|
854
821
|
end
|
855
822
|
end
|
856
823
|
component.option :name => 'myNotNulls' do |option|
|
857
824
|
option.value do |value|
|
858
|
-
value.list :size => '
|
825
|
+
value.list :size => '3' do |list|
|
859
826
|
list.item :index => '0', :class => 'java.lang.String', :itemvalue => 'org.jetbrains.annotations.NotNull'
|
860
827
|
list.item :index => '1', :class => 'java.lang.String', :itemvalue => 'javax.annotation.Nonnull'
|
828
|
+
list.item :index => '2', :class => 'java.lang.String', :itemvalue => 'jsinterop.annotations.JsNonNull'
|
861
829
|
end
|
862
830
|
end
|
863
831
|
end
|
@@ -1419,7 +1387,6 @@ module Buildr #:nodoc:
|
|
1419
1387
|
def artifact_content(xml, project, projects, options)
|
1420
1388
|
emit_module_output(xml, projects)
|
1421
1389
|
emit_jpa_descriptors(xml, project, options)
|
1422
|
-
emit_ejb_descriptors(xml, project, options)
|
1423
1390
|
end
|
1424
1391
|
|
1425
1392
|
def extension
|
@@ -1563,12 +1530,17 @@ module Buildr #:nodoc:
|
|
1563
1530
|
next unless prj.iml?
|
1564
1531
|
main_processor = !!prj.compile.options[:processor] || (prj.compile.options[:processor].nil? && !(prj.compile.options[:processor_path] || []).empty?)
|
1565
1532
|
test_processor = !!prj.test.compile.options[:processor] || (prj.test.compile.options[:processor].nil? && !(prj.test.compile.options[:processor_path] || []).empty?)
|
1533
|
+
processor_options = (prj.compile.options[:processor_options] || {}).merge(prj.test.compile.options[:processor_options] || {})
|
1566
1534
|
if main_processor || test_processor
|
1567
1535
|
xml.profile(:name => "#{prj.name}", :enabled => true) do
|
1568
1536
|
xml.sourceOutputDir :name => 'generated/processors/main/java' if main_processor
|
1569
1537
|
xml.sourceTestOutputDir :name => 'generated/processors/test/java' if test_processor
|
1570
1538
|
xml.outputRelativeToContentRoot :value => true
|
1571
1539
|
xml.module :name => prj.iml.name
|
1540
|
+
processor_options.each do |k, v|
|
1541
|
+
xml.option :name => k, :value => v
|
1542
|
+
end
|
1543
|
+
|
1572
1544
|
processor_path = (prj.compile.options[:processor_path] || []) + (prj.test.compile.options[:processor_path] || [])
|
1573
1545
|
if processor_path.empty?
|
1574
1546
|
xml.processorPath :useClasspath => true
|
@@ -1653,16 +1625,6 @@ module Buildr #:nodoc:
|
|
1653
1625
|
xml.tag!('output-path', resolve_path(output_dir))
|
1654
1626
|
end
|
1655
1627
|
|
1656
|
-
def emit_ejb_descriptors(xml, project, options)
|
1657
|
-
if options[:enable_ejb] || (options[:ejb_module_names] && options[:ejb_module_names].size > 0)
|
1658
|
-
module_names = options[:ejb_module_names] || [project.iml.name]
|
1659
|
-
module_names.each do |module_name|
|
1660
|
-
facet_name = options[:ejb_facet_name] || 'EJB'
|
1661
|
-
xml.element :id => 'javaee-facet-resources', :facet => "#{module_name}/ejb/#{facet_name}"
|
1662
|
-
end
|
1663
|
-
end
|
1664
|
-
end
|
1665
|
-
|
1666
1628
|
def emit_jpa_descriptors(xml, project, options)
|
1667
1629
|
if options[:enable_jpa] || (options[:jpa_module_names] && options[:jpa_module_names].size > 0)
|
1668
1630
|
module_names = options[:jpa_module_names] || [project.iml.name]
|
@@ -23,6 +23,9 @@ module Buildr
|
|
23
23
|
end
|
24
24
|
|
25
25
|
after_define do |project|
|
26
|
+
Buildr.artifacts((project.compile.options[:processor_path] || []) + (project.test.compile.options[:processor_path] || [])).flatten.map(&:to_s).map do |t|
|
27
|
+
Rake::Task['rake:artifacts'].enhance([task(t)])
|
28
|
+
end
|
26
29
|
if !!project.compile.options[:processor] || (project.compile.options[:processor].nil? && !(project.compile.options[:processor_path] || []).empty?)
|
27
30
|
path = project._(:target, :generated, 'processors/main/java')
|
28
31
|
f = project.file(path) do |t|
|
data/lib/buildr/java/commands.rb
CHANGED
@@ -115,13 +115,15 @@ module Java
|
|
115
115
|
# * :classpath -- One or more file names, tasks or artifact specifications. These are all expanded into artifacts, and all tasks are invoked.
|
116
116
|
# * :sourcepath -- Additional source paths to use.
|
117
117
|
# * :processor_path -- Annotation processor path. These are all expanded into artifacts, and all tasks are invoked.
|
118
|
+
# * :processor_options -- Annotation processor options.
|
118
119
|
# * :javac_args -- Any additional arguments to pass (e.g. -extdirs, -encoding)
|
119
120
|
# * :name -- Shows this name, otherwise shows the working directory.
|
120
121
|
def javac(*args, &block)
|
121
122
|
options = Hash === args.last ? args.pop : {}
|
122
|
-
rake_check_options options, :classpath, :sourcepath, :output, :javac_args, :name, :processor, :processor_path
|
123
|
+
rake_check_options options, :classpath, :sourcepath, :output, :javac_args, :name, :processor, :processor_path, :processor_options
|
123
124
|
|
124
125
|
processor = !!options[:processor]
|
126
|
+
processor_options = options[:processor_options] || {}
|
125
127
|
|
126
128
|
files = args.flatten.each { |f| f.invoke if f.respond_to?(:invoke) }.map(&:to_s).
|
127
129
|
collect { |arg| File.directory?(arg) ? FileList["#{File.expand_path(arg)}/**/*.java"] : File.expand_path(arg) }.flatten
|
@@ -135,6 +137,9 @@ module Java
|
|
135
137
|
if processor
|
136
138
|
processor_path = classpath_from(options[:processor_path])
|
137
139
|
cmd_args << '-processorpath' << processor_path.join(File::PATH_SEPARATOR) unless processor_path.empty?
|
140
|
+
processor_options.each do |k, v|
|
141
|
+
cmd_args << "-A#{k}=#{v}"
|
142
|
+
end
|
138
143
|
else
|
139
144
|
cmd_args << '-proc:none'
|
140
145
|
end
|
data/lib/buildr/java/compiler.rb
CHANGED
@@ -33,7 +33,7 @@ module Buildr #:nodoc:
|
|
33
33
|
# (e.g. ['-implicit:none', '-encoding', 'iso-8859-1'])
|
34
34
|
class Javac < Base
|
35
35
|
|
36
|
-
OPTIONS = [:warnings, :debug, :deprecation, :source, :target, :lint, :other, :processor_path, :processor]
|
36
|
+
OPTIONS = [:warnings, :debug, :deprecation, :source, :target, :lint, :other, :processor_path, :processor_options, :processor]
|
37
37
|
|
38
38
|
specify :language => :java, :target => 'classes', :target_ext => 'class', :packaging => :jar
|
39
39
|
|
@@ -45,6 +45,7 @@ module Buildr #:nodoc:
|
|
45
45
|
options[:lint] ||= false
|
46
46
|
options[:processor] ||= nil
|
47
47
|
options[:processor_path] ||= []
|
48
|
+
options[:processor_options] ||= {}
|
48
49
|
end
|
49
50
|
|
50
51
|
def compile(sources, target, dependencies) #:nodoc:
|
@@ -76,6 +77,9 @@ module Buildr #:nodoc:
|
|
76
77
|
args << '-deprecation' if options[:deprecation]
|
77
78
|
args << '-source' << options[:source].to_s if options[:source]
|
78
79
|
args << '-target' << options[:target].to_s if options[:target]
|
80
|
+
options[:processor_options].each do |k, v|
|
81
|
+
args << "-A#{k}=#{v}"
|
82
|
+
end
|
79
83
|
case options[:lint]
|
80
84
|
when Array then args << "-Xlint:#{options[:lint].join(',')}"
|
81
85
|
when String then args << "-Xlint:#{options[:lint]}"
|
data/lib/buildr/java/tests.rb
CHANGED
@@ -95,10 +95,10 @@ module Buildr #:nodoc:
|
|
95
95
|
tmp.close unless tmp.nil?
|
96
96
|
end
|
97
97
|
# testng-failed.xml contains the list of failed tests *only*
|
98
|
-
failed_tests = File.join(task.report_to.to_s, '
|
98
|
+
failed_tests = File.join(task.report_to.to_s, task.project.id.to_s, 'Command line test.xml')
|
99
99
|
if File.exist?(failed_tests)
|
100
100
|
report = File.read(failed_tests)
|
101
|
-
failed = report.scan(/<
|
101
|
+
failed = report.scan(/<testcase [^>]+ classname="([^"]+)">/im).flatten
|
102
102
|
# return the list of passed tests
|
103
103
|
tests - failed
|
104
104
|
else
|
data/lib/buildr/version.rb
CHANGED
data/rakelib/release.rake
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
WORKSPACE_DIR = File.expand_path(File.dirname(__FILE__) + '/..')
|
2
|
-
|
3
1
|
ENV['PREVIOUS_PRODUCT_VERSION'] = nil if ENV['PREVIOUS_PRODUCT_VERSION'].to_s == ''
|
4
2
|
ENV['PRODUCT_VERSION'] = nil if ENV['PRODUCT_VERSION'].to_s == ''
|
5
3
|
|
@@ -32,7 +30,8 @@ end
|
|
32
30
|
desc 'Perform a release'
|
33
31
|
task 'perform_release' do
|
34
32
|
|
35
|
-
|
33
|
+
base_directory = File.dirname(Buildr.application.buildfile.to_s)
|
34
|
+
in_dir(base_directory) do
|
36
35
|
stage('ExtractVersion', 'Extract the version from the version constant', :always_run => true) do
|
37
36
|
ENV['PRODUCT_VERSION'] ||= IO.read('lib/buildr/version.rb')[/VERSION = '(\d+\.\d+\.\d+)(\.dev)?'\.freeze/, 1]
|
38
37
|
raise "Unable to extract version from lib/buildr/version.rb" unless ENV['PRODUCT_VERSION']
|
data/spec/ide/idea_spec.rb
CHANGED
@@ -625,74 +625,6 @@ describe Buildr::IntellijIdea do
|
|
625
625
|
end
|
626
626
|
end
|
627
627
|
|
628
|
-
describe "using add_ejb_facet" do
|
629
|
-
before do
|
630
|
-
write "src/main/java/com/bin/foo.java"
|
631
|
-
write "src/main/resources/WEB-INF/ejb-jar.xml"
|
632
|
-
|
633
|
-
@foo = define "foo" do
|
634
|
-
iml.add_ejb_facet
|
635
|
-
end
|
636
|
-
invoke_generate_task
|
637
|
-
end
|
638
|
-
|
639
|
-
it "generates an ejb facet with appropriate deployment descriptors" do
|
640
|
-
doc = xml_document(@foo._("foo.iml"))
|
641
|
-
ejb_facet_xpath = ensure_facet_xpath(doc, 'ejb', 'EJB')
|
642
|
-
deployment_descriptor_xpath = "#{ejb_facet_xpath}/configuration/descriptors/deploymentDescriptor"
|
643
|
-
doc.should have_xpath("#{deployment_descriptor_xpath}[@name='ejb-jar.xml', url='file://$MODULE_DIR$/src/main/resources/WEB-INF/ejb-jar.xml']")
|
644
|
-
end
|
645
|
-
|
646
|
-
it "generates an ejb facet with derived ejbRoots" do
|
647
|
-
doc = xml_document(@foo._("foo.iml"))
|
648
|
-
ejb_facet_xpath = ensure_facet_xpath(doc, 'ejb', 'EJB')
|
649
|
-
doc.should have_xpath("#{ejb_facet_xpath}/configuration/ejbRoots/root[@url='file://$MODULE_DIR$/src/main/java']")
|
650
|
-
doc.should have_xpath("#{ejb_facet_xpath}/configuration/ejbRoots/root[@url='file://$MODULE_DIR$/src/main/resources']")
|
651
|
-
end
|
652
|
-
end
|
653
|
-
|
654
|
-
describe "using add_ejb_facet specifying parameters" do
|
655
|
-
before do
|
656
|
-
@foo = define "foo" do
|
657
|
-
iml.add_ejb_facet(:ejb_roots => %w[generated/main/java generated/main/resources],
|
658
|
-
:deployment_descriptors => ["generated/main/resources/WEB-INF/ejb-jar.xml"])
|
659
|
-
end
|
660
|
-
invoke_generate_task
|
661
|
-
end
|
662
|
-
|
663
|
-
it "generates an ejb facet with appropriate deployment descriptors" do
|
664
|
-
doc = xml_document(@foo._("foo.iml"))
|
665
|
-
ejb_facet_xpath = ensure_facet_xpath(doc, 'ejb', 'EJB')
|
666
|
-
deployment_descriptor_xpath = "#{ejb_facet_xpath}/configuration/descriptors/deploymentDescriptor"
|
667
|
-
doc.should have_xpath("#{deployment_descriptor_xpath}[@name='ejb-jar.xml', url='file://$MODULE_DIR$/generated/main/resources/WEB-INF/ejb-jar.xml']")
|
668
|
-
end
|
669
|
-
|
670
|
-
it "generates an ejb facet with derived ejbRoots" do
|
671
|
-
doc = xml_document(@foo._("foo.iml"))
|
672
|
-
ejb_facet_xpath = ensure_facet_xpath(doc, 'ejb', 'EJB')
|
673
|
-
doc.should have_xpath("#{ejb_facet_xpath}/configuration/ejbRoots/root[@url='file://$MODULE_DIR$/generated/main/java']")
|
674
|
-
doc.should have_xpath("#{ejb_facet_xpath}/configuration/ejbRoots/root[@url='file://$MODULE_DIR$/generated/main/resources']")
|
675
|
-
end
|
676
|
-
end
|
677
|
-
|
678
|
-
describe "using add_ejb_facet derived from main_source_directories" do
|
679
|
-
before do
|
680
|
-
write "src/main/resources2/WEB-INF/ejb-jar.xml"
|
681
|
-
@foo = define "foo" do
|
682
|
-
iml.main_source_directories << "src/main/resources2"
|
683
|
-
iml.add_ejb_facet
|
684
|
-
end
|
685
|
-
invoke_generate_task
|
686
|
-
end
|
687
|
-
|
688
|
-
it "generates an ejb facet with appropriate deployment descriptors" do
|
689
|
-
doc = xml_document(@foo._("foo.iml"))
|
690
|
-
ejb_facet_xpath = ensure_facet_xpath(doc, 'ejb', 'EJB')
|
691
|
-
deployment_descriptor_xpath = "#{ejb_facet_xpath}/configuration/descriptors/deploymentDescriptor"
|
692
|
-
doc.should have_xpath("#{deployment_descriptor_xpath}[@name='ejb-jar.xml', url='file://$MODULE_DIR$/src/main/resources2/WEB-INF/ejb-jar.xml']")
|
693
|
-
end
|
694
|
-
end
|
695
|
-
|
696
628
|
describe "with add_data_source" do
|
697
629
|
before do
|
698
630
|
artifact("org.postgresql:postgresql:jar:9.not-a-version") { |task| write task.name }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: realityforge-buildr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.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:
|
11
|
+
date: 2022-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|