Skip to content

Commit

Permalink
The ruby gem is properly built - except that the shade plugin for som…
Browse files Browse the repository at this point in the history
…e strange reason add rhino.
  • Loading branch information
aslakhellesoy committed Jan 20, 2012
1 parent 6b42329 commit 70a63cc
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 216 deletions.
184 changes: 0 additions & 184 deletions build-common.xml

This file was deleted.

2 changes: 0 additions & 2 deletions build.properties

This file was deleted.

9 changes: 6 additions & 3 deletions jruby/cucumber-jvm.gemspec
@@ -1,6 +1,10 @@
# -*- encoding: utf-8 -*-

version = IO.read(File.dirname(__FILE__) + '/../build.properties').match(/^\s*cucumber-jvm\.version\s*=\s*(.*)$/n)[1].strip
require 'java'
version = Java::JavaLang::System.getProperty('cucumber-jvm.version')
if(version =~ /(.*)-SNAPSHOT$/)
version=$1
end

Gem::Specification.new do |s|
s.name = 'cucumber-jvm'
Expand All @@ -10,8 +14,7 @@ Gem::Specification.new do |s|
s.summary = "#{s.name}-#{s.version}"
s.email = 'cukes@googlegroups.com'
s.homepage = 'http://github.com/cucumber/cucumber-jvm'
s.files = Dir['lib/**/*'] + Dir['bin/**/*']
s.files -= Dir['**/.gitignore']
s.files = ['bin/cucumber-jvm', 'lib/cucumber-jruby-full.jar']
s.executables = ['cucumber-jvm']
s.require_path = 'lib'
s.platform = 'java'
Expand Down
44 changes: 19 additions & 25 deletions jruby/pom.xml
Expand Up @@ -54,35 +54,22 @@

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>package-full</id>
<phase>package</phase>
<configuration>
<target>
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
classpathref="maven.plugin.classpath"/>

<jarjar jarfile="target/${project.build.finalName}-full.jar">
<fileset dir="target/classes"/>
<zipfileset src="${maven.dependency.info.cukes.cucumber-core.jar.path}"/>
<zipfileset src="${maven.dependency.info.cukes.gherkin.jar.path}"/>
<zipfileset src="${maven.dependency.com.google.code.gson.gson.jar.path}"/>
<zipfileset
src="${maven.dependency.com.googlecode.java-diff-utils.diffutils.jar.path}"/>
<zipfileset src="${maven.dependency.com.thoughtworks.xstream.xstream.jar.path}"/>
</jarjar>

<!-- drop it in the lib directory for great justice -->
<copy file="${project.build.directory}/${project.build.finalName}-full.jar"
tofile="${basedir}/lib/cucumber-jruby-full.jar"/>
</target>
</configuration>
<goals>
<goal>run</goal>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>jruby-cli-test</id>
<phase>integration-test</phase>
Expand All @@ -109,9 +96,15 @@
<phase>package</phase>
<configuration>
<target>
<!-- drop it in the lib directory for great justice -->
<copy file="${project.build.directory}/${project.build.finalName}-full.jar"
tofile="${basedir}/lib/cucumber-jruby-full.jar"/>

<!-- build the gem file using jruby -->
<echo message="Building Gem"/>
<java jar="${maven.dependency.org.jruby.jruby-complete.jar.path}" failonerror="true" fork="true">
<java jar="${maven.dependency.org.jruby.jruby-complete.jar.path}" failonerror="true"
fork="true">
<sysproperty key="cucumber-jvm.version" value="${project.version}"/>
<arg value="-S"/>
<arg value="gem"/>
<arg value="build"/>
Expand All @@ -128,9 +121,10 @@
<phase>deploy</phase>
<configuration>
<target>
<!-- publish the gem to the right spot -->
<!-- publish the gem to rubygems.org -->
<echo message="Publishing Gem"/>
<java jar="${maven.dependency.org.jruby.jruby-complete.jar.path}" failonerror="true" fork="true">
<java jar="${maven.dependency.org.jruby.jruby-complete.jar.path}" failonerror="true"
fork="true">
<arg value="-S"/>
<arg value="gem"/>
<arg value="push"/>
Expand Down
5 changes: 3 additions & 2 deletions pom.xml
Expand Up @@ -229,6 +229,7 @@
<modules>
<module>core</module>
<module>junit</module>
<module>jruby</module>
<module>picocontainer</module>
<module>spring</module>
<module>guice</module>
Expand All @@ -238,8 +239,8 @@
<module>rhino</module>
<module>java</module>
<module>clojure</module>
<module>jruby</module>
<module>jython</module>

<!--<module>scala</module>-->
<!--<module>openejb</module>-->
</modules>
Expand Down Expand Up @@ -338,7 +339,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.4</version>
<version>1.5</version>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>full</shadedClassifierName>
Expand Down

0 comments on commit 70a63cc

Please sign in to comment.