Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@headius
Created October 11, 2013 01:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save headius/6928100 to your computer and use it in GitHub Desktop.
Save headius/6928100 to your computer and use it in GitHub Desktop.
diff --git a/BUILDING.md b/BUILDING.md
index 341de80..64efe17 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -28,14 +28,12 @@ This will do all of the following:
* Compile JRuby
* Build `lib/jruby.jar`, needed for running at command line
-* Install `rake`, `rspec`, `jruby-launcher`, and a few other gems for running tests
+* Install the jruby-launcher gem to provide a native 'jruby' executable.
-The environment is now suitable for hacking JRuby and running all test
-targets via Rake.
+The environment is now suitable for running Ruby applications.
Bootstrapping only needs to be done once at first entry into a JRuby
-source dump or if you would like to ensure you're bootstrapped with
-updated gems.
+source dump or if you are updating JRuby from a git repository.
Running JRuby
-------------
@@ -80,6 +78,16 @@ Testing
JRuby employs a large suite of tests, so there are many ways you can
verify that JRuby is still fully functional.
+In order to prepare JRuby for testing, you must run the integration-test
+phase in Maven. This phase will do the following:
+
+* Install rspec, rake, minitest, minitest-excludes, and dependencies
+ needed to run integration tests.
+
+```
+mvn integration-test
+```
+
### Day to Day
For normal day-to-day testing, we recommend running the Ruby 1.9 tests
diff --git a/core/pom.xml b/core/pom.xml
index 8e4e69f..e57c321 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -17,6 +17,13 @@
<url>http://github.com/jruby/jruby</url>
</scm>
+ <repositories>
+ <repository>
+ <id>rubygems-releases</id>
+ <url>http://rubygems-proxy.torquebox.org/releases</url>
+ </repository>
+ </repositories>
+
<dependencies>
<dependency>
<groupId>junit</groupId>
@@ -199,6 +206,13 @@
<type>jar</type>
<scope>${tzdata.scope}</scope>
</dependency>
+ <dependency>
+ <groupId>rubygems</groupId>
+ <artifactId>jruby-launcher</artifactId>
+ <version>${jruby-launcher.version}</version>
+ <type>gem</type>
+ <scope>test</scope>
+ </dependency>
<!-- joda-time MUST come after the joda-timezone for the shade plugin
to pack it correctly -->
<dependency>
@@ -491,6 +505,25 @@
</includes>
</configuration>
</plugin>
+ <plugin>
+ <groupId>de.saumya.mojo</groupId>
+ <artifactId>gem-maven-plugin</artifactId>
+ <version>${jruby.plugins.version}</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals><goal>initialize</goal></goals>
+ <configuration>
+ <gemPath>${gem.home}</gemPath>
+ <gemHome>${gem.home}</gemHome>
+ <binDirectory>${jruby.basedir}/bin</binDirectory>
+ <includeRubygemsInTestResources>false</includeRubygemsInTestResources>
+ <libDirectory>${jruby.basedir}/lib</libDirectory>
+ <jrubyJvmArgs>-Djruby.home=${jruby.basedir}</jrubyJvmArgs>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
<resources>
<resource>
@@ -613,37 +646,37 @@
</lifecycleMappingMetadata>
</configuration>
</plugin>
- <plugin>
- <artifactId>maven-shade-plugin</artifactId>
- <executions>
- <execution>
- <id>pack jruby-noasm.jar</id>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <shadedArtifactAttached>true</shadedArtifactAttached>
- <shadedClassifierName>noasm</shadedClassifierName>
- <artifactSet>
- <includes>
- <include>com.github.jnr:jnr-ffi</include>
- <include>org.ow2.asm:*</include>
- </includes>
- </artifactSet>
- <relocations>
- <relocation>
- <pattern>org.objectweb</pattern>
- <shadedPattern>org.jruby.org.objectweb</shadedPattern>
- </relocation>
- </relocations>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
+ <plugin>
+ <artifactId>maven-shade-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>pack jruby-noasm.jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <shadedArtifactAttached>true</shadedArtifactAttached>
+ <shadedClassifierName>noasm</shadedClassifierName>
+ <artifactSet>
+ <includes>
+ <include>com.github.jnr:jnr-ffi</include>
+ <include>org.ow2.asm:*</include>
+ </includes>
+ </artifactSet>
+ <relocations>
+ <relocation>
+ <pattern>org.objectweb</pattern>
+ <shadedPattern>org.jruby.org.objectweb</shadedPattern>
+ </relocation>
+ </relocations>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
<profiles>
<profile>
<id>main</id>
diff --git a/test/pom.xml b/test/pom.xml
index 20911c7..d562190 100644
--- a/test/pom.xml
+++ b/test/pom.xml
@@ -97,12 +97,6 @@
</dependency>
<dependency>
<groupId>rubygems</groupId>
- <artifactId>jruby-launcher</artifactId>
- <version>${jruby-launcher.version}</version>
- <type>gem</type>
- </dependency>
- <dependency>
- <groupId>rubygems</groupId>
<artifactId>minitest</artifactId>
<version>${minitest.version}</version>
<type>gem</type>
@@ -140,7 +134,7 @@
<version>${jruby.plugins.version}</version>
<executions>
<execution>
- <phase>initialize</phase>
+ <phase>integration-test</phase>
<goals><goal>initialize</goal></goals>
<configuration>
<gemPath>${gem.home}</gemPath>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment