mvn clean package wipes out installed jruby launcher #1257

Closed
headius opened this Issue Nov 22, 2013 · 4 comments

Projects

None yet

2 participants

@headius
Member
headius commented Nov 22, 2013

Back and forth we go?

Every time I switch from jruby-1_7 branch to master or vice-versa, I have to do a clean build. Unfortunately a clean build replaces the installed jruby launcher (native bin/jruby) with the bash script, while the bin stubs for gems still reference it via a long shebang. This causes those scripts not to work until I re-install jruby-launcher again.

Sigh.

@mkristian
Member

well, there are two points

  • leave the jruby-launcher in place on mvn clean
  • fix the shebang of the bin stubs

I guess the first point is the better solution

@headius
Member
headius commented Nov 22, 2013

Yeah, I understand this is one of the weirder aspects of JRuby. I propose the following:

  • Do not install any gems for a basic build. This will mean a new clone will be running off jruby.bash (copied to bin/jruby) but it avoids dist processes accidentally pulling in the binary.

Installing jruby-launcher alone from here is easy enough, and I believe rvm already does it.

  • Move the jruby-launcher install into the "bootstrap" profile under test, so it installs with the other gems.

This makes it a one-shot deal to bootstrap into a good dev/test environment.

  • Do whatever necessary to get bin/jruby pointing at jruby.bash by default, but don't replace a native launcher if installed.

I'm not sure whether this should be done during the build (copy/link bin/jruby.bash to bin/jruby) or whether we should just always have a bin/jruby present. The issue with the latter is that github will see changes to the file, but .gitignore would avoid that.

/cc @enebo

@mkristian
Member

I did fix the jruby-dist by telling the archiver to copy bin/jruby.bash to bin/jruby - so that part is now independent of what we do with $JRUBY_HOME/bin/jruby

the jruby-launcher I moved into the bootstrap profile - let's see who complains about that

the creation of bin/jruby is only happening when the file is missing and I could not find any clean tasks which would remove it.

but I do like the github + .gitignore idea since it would relief the build a bit which is unix only tasks anyways.

@mkristian
Member

003c10a

finally fixes this as well.

@mkristian mkristian closed this Nov 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment