Skip to content

Commit dbd3065

Browse files
committed
psych as default gem
needed to adjust a junit test in core/ since it assumed to have psych installed in lib/ruby/stdlib which is not the case at this point of the build cycle
1 parent 0f29341 commit dbd3065

File tree

9 files changed

+115
-19
lines changed

9 files changed

+115
-19
lines changed

core/src/test/java/org/jruby/embed/ScriptingContainerTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public class ScriptingContainerTest {
9090
static OutputStream outStream = null;
9191
PrintStream pstream = null;
9292
FileWriter writer = null;
93-
String basedir = new File(System.getProperty("user.dir")).getParent();
93+
String basedir = System.getProperty("jruby.home");
9494

9595
public ScriptingContainerTest() {
9696
}
@@ -1048,7 +1048,6 @@ public void testCallMethod_4args_3() {
10481048
Class<Object> returnType = null;
10491049
EmbedEvalUnit unit = null;
10501050
ScriptingContainer instance = new ScriptingContainer(LocalContextScope.THREADSAFE, LocalVariableBehavior.PERSISTENT);
1051-
instance.setHomeDirectory(basedir);
10521051
instance.setError(pstream);
10531052
instance.setOutput(pstream);
10541053
instance.setWriter(writer);
@@ -1074,7 +1073,7 @@ public void testCallMethod_4args_3() {
10741073
Object receiver = unit.run();
10751074
instance.callMethod(instance.getProvider().getRuntime().getTopSelf(), "dump", null, unit);
10761075
Object expResult =
1077-
"songs: Hey Soul Sister, Who Says, Apologize\npodcasts: Java Posse, Stack Overflow\n";
1076+
"songs: Hey Soul Sister Who Says Apologizepodcasts: Java Posse Stack Overflow\n";
10781077
assertEquals(expResult, sw.toString());
10791078

10801079
instance.getVarMap().clear();
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# yaml_dump.rb [embed]
22

3-
require 'yaml'
3+
# no use of yaml since psych is not installed at this point of the tests
44

55
def dump
6-
content = YAML::load @text
7-
content.each { |k, v| puts "#{k}: #{v.join(", ")}" }
8-
end
6+
puts @text.gsub( /\n/m, '' ).gsub( /-/, '')
7+
end

lib/pom.rb

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ def version
2626
ImportedGem.new( 'rake', 'rake.version', true ),
2727
ImportedGem.new( 'rdoc', 'rdoc.version', true ),
2828
ImportedGem.new( 'json', 'json.version', true ),
29-
ImportedGem.new( 'jar-dependencies', '0.1.2', true ),
29+
ImportedGem.new( 'jar-dependencies', '0.1.8', true ),
3030
ImportedGem.new( 'minitest', 'minitest.version', true ),
3131
ImportedGem.new( 'test-unit', 'test-unit.version', true ),
32-
ImportedGem.new( 'power_assert', 'power_assert.version', true )
32+
ImportedGem.new( 'power_assert', 'power_assert.version', true ),
33+
ImportedGem.new( 'psych', '2.0.9-SNAPSHOT', true )
3334
]
3435

3536
project 'JRuby Lib Setup' do
@@ -68,7 +69,7 @@ def to_pathname
6869
end
6970

7071
# just depends on jruby-core so we are sure the jruby.jar is in place
71-
jar "org.jruby:jruby-core:#{version}"
72+
jar "org.jruby:jruby-core:#{version}", :scope => 'provided'
7273

7374
repository( :url => 'http://rubygems-proxy.torquebox.org/releases',
7475
:id => 'rubygems-releases' )
@@ -81,14 +82,20 @@ def to_pathname
8182

8283
# tell maven to download the respective gem artifacts
8384
default_gems.each do |g|
84-
gem g.name, g.version
85+
dependency 'rubygems', g.name, g.version, :type => 'gem' do
86+
exclusion 'rubygems:jar-dependencies'
87+
end
8588
end
8689

8790
# this is not an artifact for maven central
8891
plugin :deploy, :skip => true
8992

9093
gem 'ruby-maven', '3.1.1.0.8', :scope => :provided
9194

95+
plugin :dependency, :useRepositoryLayout => true, :outputDirectory => 'ruby/stdlib', :excludeGroupIds => 'rubygems', :includeScope => :runtime do
96+
execute_goal 'copy-dependencies', :phase => 'package'
97+
end
98+
9299
execute :install_gems, :'package' do |ctx|
93100
require 'fileutils'
94101

@@ -127,6 +134,7 @@ def to_pathname
127134
require 'rubygems/package'
128135

129136
puts 'install gems unless already installed'
137+
ENV_JAVA['jars.skip'] = 'true'
130138
ctx.project.artifacts.select do |a|
131139
a.group_id == 'rubygems' || a.group_id == 'org.jruby.gems'
132140
end.each do |a|

lib/pom.xml

Lines changed: 93 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,66 +21,139 @@
2121
<groupId>org.jruby</groupId>
2222
<artifactId>jruby-core</artifactId>
2323
<version>9.0.0.0-SNAPSHOT</version>
24+
<scope>provided</scope>
2425
</dependency>
2526
<dependency>
2627
<groupId>rubygems</groupId>
2728
<artifactId>jruby-openssl</artifactId>
2829
<version>0.9.6</version>
2930
<type>gem</type>
31+
<exclusions>
32+
<exclusion>
33+
<artifactId>jar-dependencies</artifactId>
34+
<groupId>rubygems</groupId>
35+
</exclusion>
36+
</exclusions>
3037
</dependency>
3138
<dependency>
3239
<groupId>rubygems</groupId>
3340
<artifactId>jruby-readline</artifactId>
3441
<version>1.0.dev-SNAPSHOT</version>
3542
<type>gem</type>
43+
<exclusions>
44+
<exclusion>
45+
<artifactId>jar-dependencies</artifactId>
46+
<groupId>rubygems</groupId>
47+
</exclusion>
48+
</exclusions>
3649
</dependency>
3750
<dependency>
3851
<groupId>rubygems</groupId>
3952
<artifactId>jruby-ripper</artifactId>
4053
<version>2.1.0.dev-SNAPSHOT</version>
4154
<type>gem</type>
55+
<exclusions>
56+
<exclusion>
57+
<artifactId>jar-dependencies</artifactId>
58+
<groupId>rubygems</groupId>
59+
</exclusion>
60+
</exclusions>
4261
</dependency>
4362
<dependency>
4463
<groupId>rubygems</groupId>
4564
<artifactId>rake</artifactId>
4665
<version>${rake.version}</version>
4766
<type>gem</type>
67+
<exclusions>
68+
<exclusion>
69+
<artifactId>jar-dependencies</artifactId>
70+
<groupId>rubygems</groupId>
71+
</exclusion>
72+
</exclusions>
4873
</dependency>
4974
<dependency>
5075
<groupId>rubygems</groupId>
5176
<artifactId>rdoc</artifactId>
5277
<version>${rdoc.version}</version>
5378
<type>gem</type>
79+
<exclusions>
80+
<exclusion>
81+
<artifactId>jar-dependencies</artifactId>
82+
<groupId>rubygems</groupId>
83+
</exclusion>
84+
</exclusions>
5485
</dependency>
5586
<dependency>
5687
<groupId>rubygems</groupId>
5788
<artifactId>json</artifactId>
5889
<version>${json.version}</version>
5990
<type>gem</type>
91+
<exclusions>
92+
<exclusion>
93+
<artifactId>jar-dependencies</artifactId>
94+
<groupId>rubygems</groupId>
95+
</exclusion>
96+
</exclusions>
6097
</dependency>
6198
<dependency>
6299
<groupId>rubygems</groupId>
63100
<artifactId>jar-dependencies</artifactId>
64-
<version>0.1.2</version>
101+
<version>0.1.8</version>
65102
<type>gem</type>
103+
<exclusions>
104+
<exclusion>
105+
<artifactId>jar-dependencies</artifactId>
106+
<groupId>rubygems</groupId>
107+
</exclusion>
108+
</exclusions>
66109
</dependency>
67110
<dependency>
68111
<groupId>rubygems</groupId>
69112
<artifactId>minitest</artifactId>
70113
<version>${minitest.version}</version>
71114
<type>gem</type>
115+
<exclusions>
116+
<exclusion>
117+
<artifactId>jar-dependencies</artifactId>
118+
<groupId>rubygems</groupId>
119+
</exclusion>
120+
</exclusions>
72121
</dependency>
73122
<dependency>
74123
<groupId>rubygems</groupId>
75124
<artifactId>test-unit</artifactId>
76125
<version>${test-unit.version}</version>
77126
<type>gem</type>
127+
<exclusions>
128+
<exclusion>
129+
<artifactId>jar-dependencies</artifactId>
130+
<groupId>rubygems</groupId>
131+
</exclusion>
132+
</exclusions>
78133
</dependency>
79134
<dependency>
80135
<groupId>rubygems</groupId>
81136
<artifactId>power_assert</artifactId>
82137
<version>${power_assert.version}</version>
83138
<type>gem</type>
139+
<exclusions>
140+
<exclusion>
141+
<artifactId>jar-dependencies</artifactId>
142+
<groupId>rubygems</groupId>
143+
</exclusion>
144+
</exclusions>
145+
</dependency>
146+
<dependency>
147+
<groupId>rubygems</groupId>
148+
<artifactId>psych</artifactId>
149+
<version>2.0.9-SNAPSHOT</version>
150+
<type>gem</type>
151+
<exclusions>
152+
<exclusion>
153+
<artifactId>jar-dependencies</artifactId>
154+
<groupId>rubygems</groupId>
155+
</exclusion>
156+
</exclusions>
84157
</dependency>
85158
<dependency>
86159
<groupId>rubygems</groupId>
@@ -123,10 +196,27 @@
123196
<skip>true</skip>
124197
</configuration>
125198
</plugin>
199+
<plugin>
200+
<artifactId>maven-dependency-plugin</artifactId>
201+
<executions>
202+
<execution>
203+
<phase>package</phase>
204+
<goals>
205+
<goal>copy-dependencies</goal>
206+
</goals>
207+
</execution>
208+
</executions>
209+
<configuration>
210+
<useRepositoryLayout>true</useRepositoryLayout>
211+
<outputDirectory>ruby/stdlib</outputDirectory>
212+
<excludeGroupIds>rubygems</excludeGroupIds>
213+
<includeScope>runtime</includeScope>
214+
</configuration>
215+
</plugin>
126216
<plugin>
127217
<groupId>io.tesla.polyglot</groupId>
128218
<artifactId>tesla-polyglot-maven-plugin</artifactId>
129-
<version>${tesla.version}</version>
219+
<version>0.1.1</version>
130220
<executions>
131221
<execution>
132222
<id>install_gems</id>
@@ -144,7 +234,7 @@
144234
<dependency>
145235
<groupId>io.tesla.polyglot</groupId>
146236
<artifactId>tesla-polyglot-ruby</artifactId>
147-
<version>${tesla.version}</version>
237+
<version>0.1.1</version>
148238
</dependency>
149239
</dependencies>
150240
</plugin>

maven/jruby-complete/src/it/integrity/verify.bsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if ( !log.contains( expected ) )
2828
{
2929
throw new RuntimeException( "log file does not contain '" + expected + "'" );
3030
}
31-
expected = "gems count 8";
31+
expected = "gems count 9";
3232
if ( !log.contains( expected ) )
3333
{
3434
throw new RuntimeException( "log file does not contain '" + expected + "'" );

maven/jruby-dist/src/it/integrity/verify.bsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if ( !log.contains( expected ) )
2828
{
2929
throw new RuntimeException( "log file does not contain '" + expected + "'" );
3030
}
31-
expected = "gems count 8";
31+
expected = "gems count 9";
3232
if ( !log.contains( expected ) )
3333
{
3434
throw new RuntimeException( "log file does not contain '" + expected + "'" );

maven/jruby-jars/src/it/integrity/verify.bsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if ( !log.contains( expected ) )
2828
{
2929
throw new RuntimeException( "log file does not contain '" + expected + "'" );
3030
}
31-
expected = "gems count 8";
31+
expected = "gems count 9";
3232
if ( !log.contains( expected ) )
3333
{
3434
throw new RuntimeException( "log file does not contain '" + expected + "'" );

maven/jruby-noasm/src/it/integrity/verify.bsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if ( !log.contains( expected ) )
2828
{
2929
throw new RuntimeException( "log file does not contain '" + expected + "'" );
3030
}
31-
expected = "gems count 8";
31+
expected = "gems count 9";
3232
if ( !log.contains( expected ) )
3333
{
3434
throw new RuntimeException( "log file does not contain '" + expected + "'" );

maven/jruby/src/it/integrity/verify.bsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if ( !log.contains( expected ) )
2828
{
2929
throw new RuntimeException( "log file does not contain '" + expected + "'" );
3030
}
31-
expected = "gems count 8";
31+
expected = "gems count 9";
3232
if ( !log.contains( expected ) )
3333
{
3434
throw new RuntimeException( "log file does not contain '" + expected + "'" );

0 commit comments

Comments
 (0)