jenkinsci / jenkins.rb

Deprecated, see https://www.jenkins.io/jep/7
393 stars 83 forks source link

Fix loading of Ruby plugins. #88

Closed dpogue closed 11 years ago

dpogue commented 11 years ago

In Jenkins 1.519 a change was made to move plugin classes into WEB-INF/lib/classes.jar rather than unpacked into WEB-INF/classes/.

This change causes the ruby runtime to unpack the classes.jar file to WEB-INF/lib/classes/ when it loads a ruby plugin. It also changes the load paths to look for the extra /lib in the file path.

I tested this with the RVM plugin, and it successfully installed the plugin, unpacked the classes.jar file, allowed me to set up a project with RVM, and successfully loaded that project after restarting Jenkins with no data loss.

Fixes JENKINS-18528.

yyuu commented 11 years ago

Seems fine :+1:

I've sent #89 too, but this might be nicer because it doesn't modify anything in jenkins-plugin-runtime.

yyuu commented 11 years ago

This can't work with Jenkins version prior to 1.518. Maybe the problem of path to the WEB-INF/classes.

dpogue commented 11 years ago

I've updated this with the requested changes to hopefully make it compatible with both <=1.518 and >=1.519.

yyuu commented 11 years ago

ok. I confirmed that this is working on both LTS (1.509.2) and latest release (1.521).

yyuu commented 11 years ago

Closed JENKINS-18528. Thanks for sending PR :+1: