kriswallsmith / assetic

Asset Management for PHP
MIT License
3.75k stars 559 forks source link

Yui Compressor does not work on Windows #536

Closed glen-84 closed 10 years ago

glen-84 commented 10 years ago

I get the following error:

PHP Fatal error:  Uncaught exception 'Assetic\Exception\FilterException' with message 'An error occurred while running:
"java" "-jar" "D:\Programming\Git\x\x-website\config\autoload/../../tools/yuicompressor-2.4.8.jar" "-o" "C:\Windows\Temp\YUI2C0E.tmp" "--type" "css" "C:\Windows\Temp\YUI2BFD.tmp"

Error Output:
java.io.FileNotFoundException: WindowsTempYUI2C0E.tmp:\Windows\Temp\YUI2BFD.tmp (The filename, directory name, or volume label syntax is incorrect)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at com.yahoo.platform.yui.compressor.YUICompressor.main(YUICompressor.java:208)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:21)

Input:
# in D:\Programming\Git\x\x-website\vendor\kriswallsmith\assetic\src\Assetic\Exception\FilterException.php on line 40

Could be related to issue #134 and #155

I'm using version 1.1.2.

johndodev commented 10 years ago

Same using symfony, windows 7, assetic 1.1.2, yui 2.4.8.

Not sure the problem is from assetic...

[message] An error occurred while running:
"C:/Program Files (x86)/Java/jre7/bin/java.exe" "-jar" "C:/xampp/htdocs/resume/app/Resources/java/yuicompressor-2.4.8.jar" "--charset" "UTF-8" "-o" "C:\Users\John\AppData\Local\Temp\YUI78DA.tmp" "--type" "css" "C:\Users\John\AppData\Local\Temp\YUI78D9.tmp"

Error Output:
java.io.FileNotFoundException: UsersJohnAppDataLocalTempYUI78DA.tmp:\Users\John\AppData\Local\Temp\YUI78D9.tmp (La syntaxe du nom de fichier, de repertoire ou de volume est incorrecte)
johndodev commented 10 years ago

Ok actually it works with yuiCompressor 2.4.7,

https://github.com/yui/yuicompressor/downloads (download zip and the .jar is on the folder "build").

https://github.com/yui/yuicompressor/issues/78

glen-84 commented 10 years ago

@johndodev You're right. Closing.

See also https://github.com/yui/yuicompressor/issues/111

Maykonn commented 7 years ago

Same here with 2.4.8 on Windows 10