Skip to content
Permalink
Browse files
run junit test on build the openssl jar
  • Loading branch information
mkristian committed Jun 6, 2014
1 parent 2d65b6f commit b45383be68e68f1dd40570a86bd066bf334b3e23
Showing with 44 additions and 36 deletions.
  1. +15 −3 ext/openssl/Mavenfile
  2. +29 −33 ext/openssl/pom.xml
@@ -2,12 +2,15 @@

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

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

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

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

# you can use -Djruby.version=1.6.8 to pick a jruby version
# TODO use 1.6.8 and let the gem-maven-plugin pick the right version
properties 'jruby.version' => '1.7.12'
# we need the jruby API here, the version should be less important here
jar 'org.jruby:jruby-core:1.6.8', :scope => :provided
jar 'org.jruby:jruby-core', '${jruby.version}', :scope => :provided
# this artifact is needed to run the packaging at the end of the build
jar 'org.jruby:jruby-stdlib', '${jruby.version}', :scope => :provided

scope :test do
jar 'junit:junit:4.11'
end

properties( 'gem.home' => '../target/rubygems',
'gem.path' => '${gem.home}',
@@ -9,11 +9,25 @@
<name>JRuby OpenSSL</name>
<description>JRuby-OpenSSL is an add-on gem for JRuby that emulates the Ruby OpenSSL native library.</description>
<url>https://github.com/jruby/jruby</url>
<developers>
<developer>
<name>Ola Bini</name>
<email>ola.bini@gmail.com</email>
</developer>
<developer>
<name>JRuby contributors</name>
</developer>
</developers>
<scm>
<connection>https://github.com/jruby/jruby.git</connection>
<url>https://github.com/jruby/jruby</url>
</scm>
<properties>
<jruby.version>1.7.12</jruby.version>
<tesla.dump.readonly>true</tesla.dump.readonly>
<gem.path>${gem.home}</gem.path>
<gem.home>../target/rubygems</gem.home>
<jruby.plugins.version>1.0.0-rc4</jruby.plugins.version>
<jruby.plugins.version>1.0.2</jruby.plugins.version>
<tesla.dump.pom>pom.xml</tesla.dump.pom>
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
</properties>
@@ -31,9 +45,21 @@
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-core</artifactId>
<version>1.6.8</version>
<version>${jruby.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-stdlib</artifactId>
<version>${jruby.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
@@ -45,42 +71,12 @@
<extensions>
<extension>
<groupId>de.saumya.mojo</groupId>
<artifactId>gem-extension</artifactId>
<artifactId>gem-with-jar-extension</artifactId>
<version>${jruby.plugins.version}</version>
</extension>
</extensions>
<directory>${basedir}/pkg</directory>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectory>lib</outputDirectory>
<finalName>jopenssl</finalName>
</configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4</version>
<configuration>
<filesets>
<fileset>
<directory>lib</directory>
<includes>
<include>jopenssl.jar</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>de.saumya.mojo</groupId>
<artifactId>gem-maven-plugin</artifactId>

0 comments on commit b45383b

Please sign in to comment.