add "/usr/share/java/" to to yuicompressor*.jar search path #45

Closed
orbisvicis opened this Issue Sep 17, 2011 · 6 comments

Projects

None yet

2 participants

@orbisvicis

"/usr/share/java/" is the default location for many jar files on linux.
"/usr/bin/" is only the location of the wrapper files (usually bash scripts)

I'm running Arch Linux

@orbisvicis

Unfortunately I'm not familiar enough with ruby esp instantiation of modules vs classes, but I think some possible solutions are:
1] extend Juicer::Binary::locate to accept varargs list of additional search paths
2] modify Juicer::JavaBase::initialize to append all extra search paths to the @path variable

@cjohansen
Owner

You mean that /usr/bin is ahead of /usr/share/java on the path and it provides a useless java binary? Juicer uses java unqualified, and so should be using whatever binary is preferred on your path. Seems odd that this should be a useless binary?

@orbisvicis

No, i'd just like to run "juicer merge" without --path
$ cat /usr/bin/yuicompressor
#!/bin/bash
java -jar /usr/share/java/yuicompressor-2.4.6.jar "$@"
It won't even match bin_glob which is how juicer finds the yuicompressor jar. "/usr/bin/" is really a useless piece of information.

"/usr/share/java/" is the default path for jar files in linux (but it isnt on $PATH env var) so I thought juicer should look for the jar there by default as well.

@cjohansen
Owner

Juicer finds the YUICompressor jar in ~/.juicer, which is where juicer install puts them. I don't think Juicer at any point knows anything about /usr/bin/yuicompressor, I don't even know where that came from.

@orbisvicis

Anyway, can you add /usr/share/java in addition to ~/.juicer ?

@cjohansen
Owner

Hey, sorry to be difficult but I'm not sure what to do. Juicer shells out to java to run Java stuff. It uses jar files found in ~/.juicer. If you want to use other jar files, symlink them to ~/.juicer. If you want to use another java, alias juicer to something like alias juicy="PATH=/use/share/java/bin:$PATH juicer".

Juicer does not search for the java binary, only the jar files.

@cjohansen cjohansen closed this Oct 5, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment