realityforge-buildr 1.5.14 → 1.5.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/addon/buildr/checkstyle.rb +1 -1
- data/lib/buildr/ide/idea.rb +34 -27
- data/lib/buildr/version.rb +1 -1
- 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: d8fa34dd92a2579440a4004d0b4a90d43e0cba4302d19e2f7d983db46984123d
|
4
|
+
data.tar.gz: 1b3adb97db7e6bd180232bd89a97d177c3701423a37eee8711e1e14c6b87b00e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97881c109b09796e52353d719ba96ea0efc7277f5ce8f6f80c30e12109ebd202e6b97aae56f1833f3d09d12ec870cd906ac90183174d3b881b3903d5c638c385
|
7
|
+
data.tar.gz: 4ff07b06229fe1cbcdbf0e47028e8ac8758c408f0929a7a5397edf05d6653fb54866e433b5970f0acc14fe611b42ec0e100aa25aac0db639fe3d8975aa4ded88
|
data/addon/buildr/checkstyle.rb
CHANGED
@@ -220,7 +220,7 @@ module Buildr
|
|
220
220
|
project.task('checkstyle:xml') do
|
221
221
|
puts 'Checkstyle: Analyzing source code...'
|
222
222
|
mkdir_p File.dirname(project.checkstyle.xml_output_file)
|
223
|
-
source_paths = project.checkstyle.complete_source_paths.select{|p| !p.start_with?(project._(:generated).to_s)}
|
223
|
+
source_paths = project.checkstyle.complete_source_paths.select{|p| !p.start_with?(project._(:target, :generated).to_s)}
|
224
224
|
source_paths = source_paths.collect{|p|::Buildr::Util.relative_path(File.expand_path(p.to_s), project.base_dir)}
|
225
225
|
Buildr::Checkstyle.checkstyle(project.checkstyle.configuration_file,
|
226
226
|
project.checkstyle.format,
|
data/lib/buildr/ide/idea.rb
CHANGED
@@ -117,7 +117,7 @@ module Buildr #:nodoc:
|
|
117
117
|
|
118
118
|
def create_component(name, attrs = {})
|
119
119
|
target = StringIO.new
|
120
|
-
Builder::XmlMarkup.new(:target => target, :indent => 2).component({:name => name}.merge(attrs)) do |xml|
|
120
|
+
Builder::XmlMarkup.new(:target => target, :indent => 2).component({ :name => name }.merge(attrs)) do |xml|
|
121
121
|
yield xml if block_given?
|
122
122
|
end
|
123
123
|
Buildr::IntellijIdea.new_document(target.string).root
|
@@ -219,7 +219,7 @@ module Buildr #:nodoc:
|
|
219
219
|
end
|
220
220
|
|
221
221
|
def annotation_paths
|
222
|
-
@annotation_paths ||= [buildr_project._(:source, :main, :annotations)].select {|p| File.exist?(p)}
|
222
|
+
@annotation_paths ||= [buildr_project._(:source, :main, :annotations)].select { |p| File.exist?(p) }
|
223
223
|
end
|
224
224
|
|
225
225
|
def main_source_directories
|
@@ -349,7 +349,7 @@ module Buildr #:nodoc:
|
|
349
349
|
name = options[:name] || 'Web'
|
350
350
|
default_webroots = {}
|
351
351
|
default_webroots[buildr_project._(:source, :main, :webapp)] = '/' if File.exist?(buildr_project._(:source, :main, :webapp))
|
352
|
-
buildr_project.assets.paths.each {|p| default_webroots[p] = '/' }
|
352
|
+
buildr_project.assets.paths.each { |p| default_webroots[p] = '/' }
|
353
353
|
webroots = options[:webroots] || default_webroots
|
354
354
|
default_deployment_descriptors = []
|
355
355
|
%w(web.xml sun-web.xml glassfish-web.xml jetty-web.xml geronimo-web.xml context.xml weblogic.xml jboss-deployment-structure.xml jboss-web.xml ibm-web-bnd.xml ibm-web-ext.xml ibm-web-ext-pme.xml).
|
@@ -375,7 +375,7 @@ module Buildr #:nodoc:
|
|
375
375
|
end
|
376
376
|
end
|
377
377
|
end
|
378
|
-
default_enable_jsf = webroots.keys.any?{|webroot| File.exist?("#{webroot}/WEB-INF/faces-config.xml")}
|
378
|
+
default_enable_jsf = webroots.keys.any? { |webroot| File.exist?("#{webroot}/WEB-INF/faces-config.xml") }
|
379
379
|
enable_jsf = options[:enable_jsf].nil? ? default_enable_jsf : options[:enable_jsf]
|
380
380
|
enable_jsf = false if buildr_project.root_project.ipr? && buildr_project.root_project.ipr.version >= '13'
|
381
381
|
f.facet(:type => 'jsf', :name => 'JSF') do |jsf|
|
@@ -404,8 +404,8 @@ module Buildr #:nodoc:
|
|
404
404
|
provider = options[:provider_enabled]
|
405
405
|
else
|
406
406
|
provider = nil
|
407
|
-
{'org.hibernate.ejb.HibernatePersistence' => 'Hibernate',
|
408
|
-
|
407
|
+
{ 'org.hibernate.ejb.HibernatePersistence' => 'Hibernate',
|
408
|
+
'org.eclipse.persistence.jpa.PersistenceProvider' => 'EclipseLink' }.
|
409
409
|
each_pair do |match, candidate_provider|
|
410
410
|
deployment_descriptors.each do |descriptor|
|
411
411
|
if File.exist?(descriptor) && /#{Regexp.escape(match)}/ =~ IO.read(descriptor)
|
@@ -608,7 +608,7 @@ module Buildr #:nodoc:
|
|
608
608
|
unless paths.empty?
|
609
609
|
xml.tag!('annotation-paths') do |xml|
|
610
610
|
paths.each do |path|
|
611
|
-
xml.root(:url=> file_path(path))
|
611
|
+
xml.root(:url => file_path(path))
|
612
612
|
end
|
613
613
|
end
|
614
614
|
end
|
@@ -618,14 +618,14 @@ module Buildr #:nodoc:
|
|
618
618
|
xml.content(:url => 'file://$MODULE_DIR$') do
|
619
619
|
# Source folders
|
620
620
|
[
|
621
|
-
{:dirs => (self.main_source_directories.dup - self.main_generated_source_directories)},
|
622
|
-
{:dirs => self.main_generated_source_directories, :generated => true},
|
623
|
-
{:type => 'resource', :dirs => (self.main_resource_directories.dup - self.main_generated_resource_directories)},
|
624
|
-
{:type => 'resource', :dirs => self.main_generated_resource_directories, :generated => true},
|
625
|
-
{:test => true, :dirs => (self.test_source_directories - self.test_generated_source_directories)},
|
626
|
-
{:test => true, :dirs => self.test_generated_source_directories, :generated => true},
|
627
|
-
{:test => true, :type => 'resource', :dirs => (self.test_resource_directories - self.test_generated_resource_directories)},
|
628
|
-
{:test => true, :type => 'resource', :dirs => self.test_generated_resource_directories, :generated => true},
|
621
|
+
{ :dirs => (self.main_source_directories.dup - self.main_generated_source_directories) },
|
622
|
+
{ :dirs => self.main_generated_source_directories, :generated => true },
|
623
|
+
{ :type => 'resource', :dirs => (self.main_resource_directories.dup - self.main_generated_resource_directories) },
|
624
|
+
{ :type => 'resource', :dirs => self.main_generated_resource_directories, :generated => true },
|
625
|
+
{ :test => true, :dirs => (self.test_source_directories - self.test_generated_source_directories) },
|
626
|
+
{ :test => true, :dirs => self.test_generated_source_directories, :generated => true },
|
627
|
+
{ :test => true, :type => 'resource', :dirs => (self.test_resource_directories - self.test_generated_resource_directories) },
|
628
|
+
{ :test => true, :type => 'resource', :dirs => self.test_generated_resource_directories, :generated => true },
|
629
629
|
].each do |content|
|
630
630
|
content[:dirs].map { |dir| dir.to_s }.compact.sort.uniq.each do |dir|
|
631
631
|
options = {}
|
@@ -658,14 +658,14 @@ module Buildr #:nodoc:
|
|
658
658
|
end
|
659
659
|
|
660
660
|
def generate_project_dependency(xml, other_project, export, test = false)
|
661
|
-
attribs = {:type => 'module', 'module-name' => other_project}
|
661
|
+
attribs = { :type => 'module', 'module-name' => other_project }
|
662
662
|
attribs[:exported] = '' if export
|
663
663
|
attribs[:scope] = 'TEST' if test
|
664
664
|
xml.orderEntry attribs
|
665
665
|
end
|
666
666
|
|
667
667
|
def generate_module_lib(xml, path, export, source_path, annotations_path, test = false)
|
668
|
-
attribs = {:type => 'module-library'}
|
668
|
+
attribs = { :type => 'module-library' }
|
669
669
|
attribs[:exported] = '' if export
|
670
670
|
attribs[:scope] = 'TEST' if test
|
671
671
|
xml.orderEntry attribs do
|
@@ -691,7 +691,7 @@ module Buildr #:nodoc:
|
|
691
691
|
net = []
|
692
692
|
all = self.excluded_directories.map { |dir| buildr_project._(dir.to_s) }.sort_by { |d| d.size }
|
693
693
|
all.each_with_index do |dir, i|
|
694
|
-
unless all[0
|
694
|
+
unless all[0...i].find { |other| dir =~ /^#{other}/ }
|
695
695
|
net << dir
|
696
696
|
end
|
697
697
|
end
|
@@ -725,6 +725,10 @@ module Buildr #:nodoc:
|
|
725
725
|
@jdk_version ||= buildr_project.compile.options.source || '1.7'
|
726
726
|
end
|
727
727
|
|
728
|
+
def compiler_configuration_options
|
729
|
+
@compiler_configuration_options ||= {}
|
730
|
+
end
|
731
|
+
|
728
732
|
def nonnull_assertions?
|
729
733
|
@nonnull_assertions.nil? ? true : !!@nonnull_assertions
|
730
734
|
end
|
@@ -781,7 +785,7 @@ module Buildr #:nodoc:
|
|
781
785
|
|
782
786
|
def add_postgres_data_source(name, options = {})
|
783
787
|
if options[:url].nil? && options[:database]
|
784
|
-
|
788
|
+
default_url = "jdbc:postgresql://#{(options[:host] || '127.0.0.1')}:#{(options[:port] || '5432')}/#{options[:database]}"
|
785
789
|
end
|
786
790
|
|
787
791
|
params = {
|
@@ -901,7 +905,7 @@ module Buildr #:nodoc:
|
|
901
905
|
}
|
902
906
|
classpath = options[:classpath] || []
|
903
907
|
xml.tag!('data-source', data_source_options) do |xml|
|
904
|
-
xml.tag!('synchronize', (options[:synchronize]||'true'))
|
908
|
+
xml.tag!('synchronize', (options[:synchronize] || 'true'))
|
905
909
|
xml.tag!('jdbc-driver', options[:driver]) if options[:driver]
|
906
910
|
xml.tag!('jdbc-url', options[:url]) if options[:url]
|
907
911
|
xml.tag!('user-name', options[:username]) if options[:username]
|
@@ -1002,7 +1006,7 @@ module Buildr #:nodoc:
|
|
1002
1006
|
end
|
1003
1007
|
end
|
1004
1008
|
|
1005
|
-
def add_exploded_ear_artifact(project, options ={})
|
1009
|
+
def add_exploded_ear_artifact(project, options = {})
|
1006
1010
|
artifact_name = to_artifact_name(project, options)
|
1007
1011
|
|
1008
1012
|
add_artifact(artifact_name, 'exploded-ear', build_on_make(options)) do |xml|
|
@@ -1478,7 +1482,7 @@ module Buildr #:nodoc:
|
|
1478
1482
|
buildr_project.projects.select { |subp| subp.iml? }.each do |subproject|
|
1479
1483
|
module_path = subproject.base_dir.gsub(/^#{buildr_project.base_dir}\//, '')
|
1480
1484
|
path = "#{module_path}/#{subproject.iml.name}.iml"
|
1481
|
-
attribs = {:fileurl => "file://$PROJECT_DIR$/#{path}", :filepath => "$PROJECT_DIR$/#{path}"}
|
1485
|
+
attribs = { :fileurl => "file://$PROJECT_DIR$/#{path}", :filepath => "$PROJECT_DIR$/#{path}" }
|
1482
1486
|
if subproject.iml.group == true
|
1483
1487
|
attribs[:group] = subproject.parent.name.gsub(':', '/')
|
1484
1488
|
elsif !subproject.iml.group.nil?
|
@@ -1528,7 +1532,7 @@ module Buildr #:nodoc:
|
|
1528
1532
|
end
|
1529
1533
|
|
1530
1534
|
def data_sources_component
|
1531
|
-
create_composite_component('DataSourceManagerImpl', {:format => 'xml', :hash => '3208837817'}, self.data_sources)
|
1535
|
+
create_composite_component('DataSourceManagerImpl', { :format => 'xml', :hash => '3208837817' }, self.data_sources)
|
1532
1536
|
end
|
1533
1537
|
|
1534
1538
|
def artifacts_component
|
@@ -1538,6 +1542,9 @@ module Buildr #:nodoc:
|
|
1538
1542
|
def compiler_configuration_component
|
1539
1543
|
lambda do
|
1540
1544
|
create_component('CompilerConfiguration') do |component|
|
1545
|
+
compiler_configuration_options.each_pair do |k, v|
|
1546
|
+
component.option :name => k, :value => v
|
1547
|
+
end
|
1541
1548
|
component.addNotNullAssertions :enabled => 'false' unless nonnull_assertions?
|
1542
1549
|
component.wildcardResourcePatterns do |xml|
|
1543
1550
|
wildcard_resource_patterns.each do |pattern|
|
@@ -1554,8 +1561,8 @@ module Buildr #:nodoc:
|
|
1554
1561
|
disabled = []
|
1555
1562
|
Buildr.projects.each do |prj|
|
1556
1563
|
next unless prj.iml?
|
1557
|
-
main_processor = !!prj.compile.options[:processor] || prj.compile.options[:processor].nil?
|
1558
|
-
test_processor = !!prj.test.compile.options[:processor] || prj.test.compile.options[:processor].nil?
|
1564
|
+
main_processor = !!prj.compile.options[:processor] || (prj.compile.options[:processor].nil? && !(prj.compile.options[:processor_path] || []).empty?)
|
1565
|
+
test_processor = !!prj.test.compile.options[:processor] || (prj.test.compile.options[:processor].nil? && !(prj.test.compile.options[:processor_path] || []).empty?)
|
1559
1566
|
if main_processor || test_processor
|
1560
1567
|
xml.profile(:name => "#{prj.name}", :enabled => true) do
|
1561
1568
|
xml.sourceOutputDir :name => 'generated/processors/main/java' if main_processor
|
@@ -1597,7 +1604,7 @@ module Buildr #:nodoc:
|
|
1597
1604
|
resolve_path_from_base(path, '$PROJECT_DIR$')
|
1598
1605
|
end
|
1599
1606
|
|
1600
|
-
|
1607
|
+
private
|
1601
1608
|
|
1602
1609
|
def default_code_sight_excludes
|
1603
1610
|
%w(
|
@@ -1717,7 +1724,7 @@ module Buildr #:nodoc:
|
|
1717
1724
|
].compact
|
1718
1725
|
|
1719
1726
|
files.each do |ideafile|
|
1720
|
-
module_dir =
|
1727
|
+
module_dir = File.dirname(ideafile.filename)
|
1721
1728
|
idea.enhance do |task|
|
1722
1729
|
mkdir_p module_dir
|
1723
1730
|
info "Writing #{ideafile.filename}"
|
data/lib/buildr/version.rb
CHANGED
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.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Apache Buildr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|