google / closure-stylesheets

A CSS+ transpiler that lints, optimizes, and I18n-izes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CSS compiler missing com.google.debugging.sourcemap

jart opened this issue · comments

I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: com/google/debugging/sourcemap/SourceMapFormat
        at com.google.common.css.compiler.passes.DefaultGssSourceMapGenerator.<init>(DefaultGssSourceMapGenerator.java:102)

In order to fix this, I had to put the Closure JavaScript Compiler jar on the classpath.

Your pom.xml file does not appear to declare a dependency on whatever provides that class.

Hi Justine,

I'm afraid that our pom.xml is in sore need of some updating. I take it that you are building from source, not the pre-packaged JAR? The issue may be that libsourcemap.jar is out of date, which would also explain why putting the JS compiler on the path makes the problem go away. (That jar is ripped directly from the JS compiler.)

Cleaning all of this stuff up has been planned for a long time, but I haven't had any time to work on it. If you're interested, please let me know.

Thanks,

Ian

P.S. I'll try to push a new version out next week to take care of the immediate problem.

I'm technically not using the pom.xml file. I'm fetching the jars from Maven and using them in Bazel. The workaround I mentioned is sufficient for my purposes. But this issue should probably be solved for people who use Maven instead of Bazel.

I believe this was addressed by
1493a85#diff-600376dffeb79835ede4a0b285078036R185

I looked into separating that code out of closure-compiler into a separate maven module, but there's a dependency cycle though, IIRC, the cycle is in test code.