Do not install integration-testing gems during package phase #1114

headius opened this Issue Oct 11, 2013 · 7 comments

3 participants

JRuby Team member

I think we need to move the installs of all gems other than jruby-launcher out of the package phase.

I've been working with @hone to get 1.7.5 built for Heroku, and we ran into a snag: there's no way to build a working JRuby install without installing gems many (most) sites will not want installed.

I think we want the set up to work like this:

Phase X (probably package): build everything needed to have a functional JRuby instance. This would include jruby-launcher, but no other gems, since users may have their own preferred versions.

Phase Y (perhaps integration-test): install gems needed for integration testing, like rake, rspec, minitest-excludes, and so on.

I started trying to do this in this patch:

But the modules don't align right. In order to install the gem, it needs openssl, but openssl builds after core.


I'm seeing this on a test app on heroku:

~ $ gem list
Picked up JAVA_TOOL_OPTIONS: -Djava.rmi.server.useCodebaseOnly=true

*** LOCAL GEMS ***

bouncy-castle-java (1.5.0147)
bundler (1.4.0.rc.1)
diff-lcs (1.2.4)
jruby-launcher (1.0.19 java)
jruby-openssl (0.9.2)
json (1.8.0 java)
krypt (0.0.1)
krypt-core (0.0.1 universal-java)
krypt-provider-jdk (0.0.1)
minitest (4.7.5)
minitest-excludes (1.0.2)
rake (10.1.0)
rdoc (4.0.1)
rspec (2.14.1)
rspec-core (2.14.5)
rspec-expectations (2.14.3)
rspec-mocks (2.14.3)
JRuby Team member

no do not install the gem as core. we still can install the launcher as we did in ./test/pom.xml and install the other gems only when we run the tests. from a maven point of view setting the scope of those gems to test should do. not sure if the gem-maven-plugin can handle that as expected.

instead of adding that extra little feature to gem-maven-plugin we can put all those extra gems into the test profile which is anyways needed to execute the tests and only then these gems get installed.

@mkristian mkristian added a commit that referenced this issue Oct 11, 2013
@mkristian mkristian should fix #1114 1d1bf91
JRuby Team member

the above patch will install only the jruby-launcher gem and the other gems will be installed with $mvn -Ptest

I am not sure about the rake tasks they would probably need the $ mvn -Ptest to setup the tests. the old ant used by travis should work.

I did not adjust (yet) the file or merge it to master !!!

@mkristian mkristian added a commit that closed this issue Oct 16, 2013
@mkristian mkristian should fix #1114 1d1bf91
@mkristian mkristian closed this in 1d1bf91 Oct 16, 2013
JRuby Team member

keep that open until it is merged into master with proper docu in

@mkristian mkristian reopened this Oct 17, 2013
JRuby Team member

@mkristian Has this been properly merged to master?

JRuby Team member

only with -Pbootstrap extra gems get installed, otherwise there are only the default gems, both on master as well jruby-1.7

there is even an integration-test on jruby-complete and jruby-dist which verifies there are only these default gems pre-installed.

@mkristian mkristian closed this Feb 21, 2014
JRuby Team member

Thanks, @mkristian!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment