I encountered the same issue when trying to compress a custom JS library of jQuery Plugins. Closure (unless you give it a reason not to) will just rename any jQuery library calls from within your plugin. And worse yet it will not even warn you (how could it? it assumes you the programmer know what you are doing!) the solution is to reference the external js file (or url points to the library). I used the web tool:
http://closure-compiler.appspot.com/home
by applying the fowlloing preamble, i was able to compile the file successfully:
// ==ClosureCompiler==
// @compilation_level ADVANCED_OPTIMIZATIONS
// @warning_level QUIET
// @output_file_name default.js
// @formatting pretty_print
// @externs_url http:// ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js
// @externs_url http:// ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/jquery-ui.js
// ==/ClosureCompiler==
The only issue remaining is making the compiler realize that the plugins name, cannot be simplified:
(function($) { $.fn.extend({ <name>:function(options) { } }); })(jQuery);
Because this is the name exposed to the world. Any ideas?