Skipping compression step PocketChange build

3 views
Skip to first unread message

hwiechers

unread,
Sep 3, 2009, 12:37:13 AM9/3/09
to The Lift Book
Hi

I'm a complete newbie, so please be patient.

I pulled 805d76c9f8fc31434b3944b796cc58054e06f601 from github this
morning.
When I try running mvn compile I get:

[INFO] [yuicompressor:compress {execution: default}]
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] null
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.RuntimeException
at
com.yahoo.platform.yui.compressor.JavaScriptCompressor.printSourceNumber
(JavaScriptCompressor.java:299)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse
(JavaScriptCompressor.java:335)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>
(JavaScriptCompressor.java:532)
....

I tried compiling a few other revisions and I get the same, so I think
my yuicompressor is probably broken.

Is there an easy way to skip the compression step?

Thanks,
Henri

Derek Chen-Becker

unread,
Sep 3, 2009, 3:19:17 PM9/3/09
to the-li...@googlegroups.com
Remove (or comment out) the following section in your pom.xml:

      <plugin>
        <groupId>net.sf.alchim</groupId>
        <artifactId>yuicompressor-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>compress</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <nosuffix>true</nosuffix>
        </configuration>
      </plugin>


Derek

Ross Mellgren

unread,
Sep 3, 2009, 11:41:15 AM9/3/09
to the-li...@googlegroups.com
I find the YUI compressor to be really noisy and annoying, so I
disabled it. It's as simple as going into pom.xml and commenting out
the <plugin> block for it, e.g.


<!--
<plugin>
<groupId>net.sf.alchim</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>compress</goal>
</goals>
</execution>
</executions>
<configuration>
<nosuffix>true</nosuffix>
<excludes>
<exclude>**/jquery-dimensions/**</exclude>
<exclude>**/jquery-ui/**</exclude>
</excludes>
</configuration>
</plugin>
-->

-Ross

hwiechers

unread,
Sep 4, 2009, 1:19:00 AM9/4/09
to The Lift Book
Thanks for help, guys. It's working now.

Ed .

unread,
Sep 6, 2009, 10:21:59 PM9/6/09
to the-li...@googlegroups.com
Make sure that you are using Sun JDK and not open JDK. I believe by default most of linux distros are using openJDK(JRE) and you wont be able to compile lift on it.

check your JAVA_HOME before running mvn.

David Pollak

unread,
Sep 8, 2009, 12:20:44 PM9/8/09
to the-li...@googlegroups.com
On Sun, Sep 6, 2009 at 7:21 PM, Ed . <edr...@gmail.com> wrote:
Make sure that you are using Sun JDK and not open JDK. I believe by default most of linux distros are using openJDK(JRE) and you wont be able to compile lift on it.

Ummm... why can't you compile Lift on OpenJDK?  I do it on a regular basis.



--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

Ed .

unread,
Sep 11, 2009, 11:13:19 PM9/11/09
to the-li...@googlegroups.com
Doing so with OpenJDK would generate RuntimeException in yui library:

java.lang.RuntimeException
      at com.yahoo.platform.yui.compressor.JavaScriptCompressor.printSourceNumber
 (JavaScriptCompressor.java:299)
I did it from scratch with empty maven repo and was able to build lift. Switching to sun's jdk fixed the problem.

Tim Nelson

unread,
Sep 12, 2009, 6:35:03 PM9/12/09
to the-li...@googlegroups.com
Ed,

I believe you mean that happens when you build your lift project, not the lift framework itself. You're not referring to building the lift framework from source, are you?

Tim

Ed .

unread,
Sep 13, 2009, 3:27:00 PM9/13/09
to the-li...@googlegroups.com
Hi Tim,
Actually I decided to learn lift and yes I clone latest git repository on my local Ubuntu 9.04 machine. I have maven 2.0.9 installed and tried to build framework from scratch (mvn package). By default ubuntu comes with openJDK jre only installed and I had issue with just building framework. Checked few posts where people suggested to clean up repo. I tried it but without any luck. Then I had another common problem when maven were complaining about tooos.jar not found. I realized that I'm using JRE (not jdk) and installed Sun's JDK 1.6.14.
Lastly based on what David said I could try to re-build framework with OpenJDK (jdk) and let you know if it works. I dont have much to loose by wiping my m2 repo so its not a problem.

Thanks,
ed.
PS: I didnt realized that I dont need to build framework at all to use tutorials. It came much later :)

Ed .

unread,
Sep 13, 2009, 10:26:48 PM9/13/09
to the-li...@googlegroups.com
Just to confirm using default OpenJDK:
%which java
/usr/bin/java
/usr/bin/java -> /etc/alternatives/java
/etc/alternatives/java -> /usr/lib/jvm/java-6-openjdk/jre/bin/java

even pointing to open jdk(not jre) yields the same message.
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk


[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.RuntimeException
    at com.yahoo.platform.yui.compressor.JavaScriptCompressor.printSourceNumber(JavaScriptCompressor.java:299)
    at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:335)

    at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:532)
    at net.sf.alchim.mojo.yuicompressor.YuiCompressorMojo.processFile(YuiCompressorMojo.java:178)
    at net.sf.alchim.mojo.yuicompressor.MojoSupport.processDir(MojoSupport.java:151)
    at net.sf.alchim.mojo.yuicompressor.MojoSupport.execute(MojoSupport.java:103)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 35 seconds
[INFO] Finished at: Sun Sep 13 22:21:47 EDT 2009
[INFO] Final Memory: 67M/543M

however just by changing JAVA_HOME
export JAVA_HOME=/usr/lib/jvm/java-6-sun
builds lift framework just fine. Sorry I dont have much time to see why its failing with Open JDK, but maybe somebody who knows more about those unit test will able to fix it?

Thanks,
ed.
Reply all
Reply to author
Forward
0 new messages