Skip to content

Commit 8c39829

Browse files
mkristiankares
authored andcommitted
run junit test on build the openssl jar [skip ci]
1 parent 52fb043 commit 8c39829

File tree

2 files changed

+44
-36
lines changed

2 files changed

+44
-36
lines changed

Mavenfile

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
gemspec :jar => 'jopenssl', :include_jars => true
44

5-
version = File.read( File.join( basedir, '..', '..', 'VERSION' ) ).strip
6-
version.gsub!( /-SNAPSHOT$/, '' )
5+
# that all should be part of ruby-maven to pick the right extension
6+
properties 'jruby.plugins.version' => '1.0.2'
7+
build.extensions.clear
8+
extension 'de.saumya.mojo:gem-with-jar-extension', '${jruby.plugins.version}'
79

810
if model.version.to_s.match /[a-zA-Z]/
911
model.group_id = 'org.jruby.gems'
1012

13+
model.version = model.version + '-SNAPSHOT'
1114
plugin :deploy do
1215
execute_goals( :deploy,
1316
:skip => false,
@@ -26,8 +29,17 @@ jruby_plugin! :gem do
2629
execute_goals :id => 'default-push', :skip => true
2730
end
2831

32+
# you can use -Djruby.version=1.6.8 to pick a jruby version
33+
# TODO use 1.6.8 and let the gem-maven-plugin pick the right version
34+
properties 'jruby.version' => '1.7.12'
2935
# we need the jruby API here, the version should be less important here
30-
jar 'org.jruby:jruby-core:1.6.8', :scope => :provided
36+
jar 'org.jruby:jruby-core', '${jruby.version}', :scope => :provided
37+
# this artifact is needed to run the packaging at the end of the build
38+
jar 'org.jruby:jruby-stdlib', '${jruby.version}', :scope => :provided
39+
40+
scope :test do
41+
jar 'junit:junit:4.11'
42+
end
3143

3244
properties( 'gem.home' => '../target/rubygems',
3345
'gem.path' => '${gem.home}',

pom.xml

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,25 @@
1313
<name>JRuby OpenSSL</name>
1414
<description>JRuby-OpenSSL is an add-on gem for JRuby that emulates the Ruby OpenSSL native library.</description>
1515
<url>https://github.com/jruby/jruby</url>
16+
<developers>
17+
<developer>
18+
<name>Ola Bini</name>
19+
<email>[email protected]</email>
20+
</developer>
21+
<developer>
22+
<name>JRuby contributors</name>
23+
</developer>
24+
</developers>
25+
<scm>
26+
<connection>https://github.com/jruby/jruby.git</connection>
27+
<url>https://github.com/jruby/jruby</url>
28+
</scm>
1629
<properties>
30+
<jruby.version>1.7.12</jruby.version>
1731
<tesla.dump.readonly>true</tesla.dump.readonly>
1832
<gem.path>${gem.home}</gem.path>
1933
<gem.home>../target/rubygems</gem.home>
20-
<jruby.plugins.version>1.0.0-rc4</jruby.plugins.version>
34+
<jruby.plugins.version>1.0.2</jruby.plugins.version>
2135
<tesla.dump.pom>pom.xml</tesla.dump.pom>
2236
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
2337
</properties>
@@ -35,9 +49,21 @@
3549
<dependency>
3650
<groupId>org.jruby</groupId>
3751
<artifactId>jruby-core</artifactId>
38-
<version>1.6.8</version>
52+
<version>${jruby.version}</version>
3953
<scope>provided</scope>
4054
</dependency>
55+
<dependency>
56+
<groupId>org.jruby</groupId>
57+
<artifactId>jruby-stdlib</artifactId>
58+
<version>${jruby.version}</version>
59+
<scope>provided</scope>
60+
</dependency>
61+
<dependency>
62+
<groupId>junit</groupId>
63+
<artifactId>junit</artifactId>
64+
<version>4.11</version>
65+
<scope>test</scope>
66+
</dependency>
4167
</dependencies>
4268
<repositories>
4369
<repository>
@@ -49,42 +75,12 @@
4975
<extensions>
5076
<extension>
5177
<groupId>de.saumya.mojo</groupId>
52-
<artifactId>gem-extension</artifactId>
78+
<artifactId>gem-with-jar-extension</artifactId>
5379
<version>${jruby.plugins.version}</version>
5480
</extension>
5581
</extensions>
5682
<directory>${basedir}/pkg</directory>
5783
<plugins>
58-
<plugin>
59-
<artifactId>maven-jar-plugin</artifactId>
60-
<version>2.4</version>
61-
<executions>
62-
<execution>
63-
<phase>prepare-package</phase>
64-
<goals>
65-
<goal>jar</goal>
66-
</goals>
67-
</execution>
68-
</executions>
69-
<configuration>
70-
<outputDirectory>lib</outputDirectory>
71-
<finalName>jopenssl</finalName>
72-
</configuration>
73-
</plugin>
74-
<plugin>
75-
<artifactId>maven-clean-plugin</artifactId>
76-
<version>2.4</version>
77-
<configuration>
78-
<filesets>
79-
<fileset>
80-
<directory>lib</directory>
81-
<includes>
82-
<include>jopenssl.jar</include>
83-
</includes>
84-
</fileset>
85-
</filesets>
86-
</configuration>
87-
</plugin>
8884
<plugin>
8985
<groupId>de.saumya.mojo</groupId>
9086
<artifactId>gem-maven-plugin</artifactId>

0 commit comments

Comments
 (0)