Skip to content

Commit

Permalink
Move bundled (preinstalled) gems out of defaults.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed May 15, 2018
1 parent 4662b4a commit 5b186cd
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 40 deletions.
24 changes: 17 additions & 7 deletions lib/pom.rb
Expand Up @@ -27,24 +27,27 @@ def initialize( name, version, default_spec = true )
default_gems = [
ImportedGem.new('cmath', '1.0.0'),
ImportedGem.new('csv', '1.0.0'),
ImportedGem.new('did_you_mean', '1.2.0'),
ImportedGem.new('fileutils', '1.1.0'),
ImportedGem.new('ipaddr', '1.2.0'),
ImportedGem.new('jar-dependencies', '${jar-dependencies.version}'),
ImportedGem.new('jruby-readline', '1.2.2'),
ImportedGem.new('jruby-openssl', '0.9.21'),
ImportedGem.new('json', '${json.version}'),
ImportedGem.new('minitest', '${minitest.version}'),
ImportedGem.new('net-telnet', '0.1.1'),
ImportedGem.new('power_assert', '${power_assert.version}'),
ImportedGem.new('psych', '3.0.2'),
ImportedGem.new('rake', '${rake.version}'),
ImportedGem.new('rake-ant', '1.0.4'),
ImportedGem.new('rdoc', '${rdoc.version}'),
ImportedGem.new('scanf', '1.0.0'),
ImportedGem.new('test-unit', '${test-unit.version}'),
ImportedGem.new('webrick', '1.4.2'),
ImportedGem.new('xmlrpc', '0.3.0'),
]

bundled_gems = [
['did_you_mean', '1.2.0'],
['minitest', '${minitest.version}'],
['net-telnet', '0.1.1'],
['power_assert', '${power_assert.version}'],
['rake', '${rake.version}'],
['test-unit', '${test-unit.version}'],
['xmlrpc', '0.3.0'],
]

project 'JRuby Lib Setup' do
Expand Down Expand Up @@ -92,6 +95,13 @@ def initialize( name, version, default_spec = true )
end
end

bundled_gems.each do |name, version|
# use provided scope so it is not a real dependency for runtime
dependency 'rubygems', name, version, :type => 'gem', :scope => :provided do
exclusion 'rubygems:jar-dependencies'
end
end

default_gemnames = default_gems.collect { |g| g.name }

plugin :dependency,
Expand Down
66 changes: 33 additions & 33 deletions lib/pom.xml
Expand Up @@ -57,19 +57,6 @@ DO NOT MODIFIY - GENERATED CODE
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>rubygems</groupId>
<artifactId>did_you_mean</artifactId>
<version>1.2.0</version>
<type>gem</type>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>jar-dependencies</artifactId>
<groupId>rubygems</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>rubygems</groupId>
<artifactId>fileutils</artifactId>
Expand Down Expand Up @@ -150,8 +137,8 @@ DO NOT MODIFIY - GENERATED CODE
</dependency>
<dependency>
<groupId>rubygems</groupId>
<artifactId>minitest</artifactId>
<version>${minitest.version}</version>
<artifactId>psych</artifactId>
<version>3.0.2</version>
<type>gem</type>
<scope>provided</scope>
<exclusions>
Expand All @@ -163,8 +150,8 @@ DO NOT MODIFIY - GENERATED CODE
</dependency>
<dependency>
<groupId>rubygems</groupId>
<artifactId>net-telnet</artifactId>
<version>0.1.1</version>
<artifactId>rake-ant</artifactId>
<version>1.0.4</version>
<type>gem</type>
<scope>provided</scope>
<exclusions>
Expand All @@ -176,8 +163,8 @@ DO NOT MODIFIY - GENERATED CODE
</dependency>
<dependency>
<groupId>rubygems</groupId>
<artifactId>power_assert</artifactId>
<version>${power_assert.version}</version>
<artifactId>rdoc</artifactId>
<version>${rdoc.version}</version>
<type>gem</type>
<scope>provided</scope>
<exclusions>
Expand All @@ -189,8 +176,8 @@ DO NOT MODIFIY - GENERATED CODE
</dependency>
<dependency>
<groupId>rubygems</groupId>
<artifactId>psych</artifactId>
<version>3.0.2</version>
<artifactId>scanf</artifactId>
<version>1.0.0</version>
<type>gem</type>
<scope>provided</scope>
<exclusions>
Expand All @@ -202,8 +189,8 @@ DO NOT MODIFIY - GENERATED CODE
</dependency>
<dependency>
<groupId>rubygems</groupId>
<artifactId>rake</artifactId>
<version>${rake.version}</version>
<artifactId>webrick</artifactId>
<version>1.4.2</version>
<type>gem</type>
<scope>provided</scope>
<exclusions>
Expand All @@ -215,8 +202,8 @@ DO NOT MODIFIY - GENERATED CODE
</dependency>
<dependency>
<groupId>rubygems</groupId>
<artifactId>rake-ant</artifactId>
<version>1.0.4</version>
<artifactId>did_you_mean</artifactId>
<version>1.2.0</version>
<type>gem</type>
<scope>provided</scope>
<exclusions>
Expand All @@ -228,8 +215,8 @@ DO NOT MODIFIY - GENERATED CODE
</dependency>
<dependency>
<groupId>rubygems</groupId>
<artifactId>rdoc</artifactId>
<version>${rdoc.version}</version>
<artifactId>minitest</artifactId>
<version>${minitest.version}</version>
<type>gem</type>
<scope>provided</scope>
<exclusions>
Expand All @@ -241,8 +228,8 @@ DO NOT MODIFIY - GENERATED CODE
</dependency>
<dependency>
<groupId>rubygems</groupId>
<artifactId>scanf</artifactId>
<version>1.0.0</version>
<artifactId>net-telnet</artifactId>
<version>0.1.1</version>
<type>gem</type>
<scope>provided</scope>
<exclusions>
Expand All @@ -254,8 +241,8 @@ DO NOT MODIFIY - GENERATED CODE
</dependency>
<dependency>
<groupId>rubygems</groupId>
<artifactId>test-unit</artifactId>
<version>${test-unit.version}</version>
<artifactId>power_assert</artifactId>
<version>${power_assert.version}</version>
<type>gem</type>
<scope>provided</scope>
<exclusions>
Expand All @@ -267,8 +254,21 @@ DO NOT MODIFIY - GENERATED CODE
</dependency>
<dependency>
<groupId>rubygems</groupId>
<artifactId>webrick</artifactId>
<version>1.4.2</version>
<artifactId>rake</artifactId>
<version>${rake.version}</version>
<type>gem</type>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>jar-dependencies</artifactId>
<groupId>rubygems</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>rubygems</groupId>
<artifactId>test-unit</artifactId>
<version>${test-unit.version}</version>
<type>gem</type>
<scope>provided</scope>
<exclusions>
Expand Down

0 comments on commit 5b186cd

Please sign in to comment.