marceloverdijk / lesscss-maven-plugin

LESS CSS Maven Plugin
170 stars 59 forks source link

Upgrade to less css 1.5.1 #37

Open cperotAxway opened 10 years ago

cperotAxway commented 10 years ago

Hello,

The plugin is not compliant with last less css version (1.5.0). Here is the output when I try to compile my sources and set lesscss file 1.5.0 in the configuration with

src/main/resources/less/less.min.js: [ERROR] C:\um\workspace\commons\ui\css\src\main\resources\style\base.less [0:0]: Error compiling LESS source org.lesscss.LessException: Impossible de trouver la fonction split dans lobjet {1}. at org.lesscss.LessCompiler.compile(LessCompiler.java:283) at org.lesscss.LessCompiler.compile(LessCompiler.java:335) at org.lesscss.LessCompiler.compile(LessCompiler.java:359) at org.lesscss.mojo.CompileMojo.execute(CompileMojo.java:131) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) 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:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.mozilla.javascript.JavaScriptException: [object Object](file:/C:/um/workspace/commons/ui/css/src/main/resources/less/less.min.js#11) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1018) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:107) at org.lesscss.LessCompiler.compile(LessCompiler.java:270) ... 24 more Is there a possible workaround. When do you plan to be compliant with last version of lesscss ? Regards, Christophe Pérot ( Axway )
ghost commented 10 years ago

+1

mschipperheyn commented 10 years ago

+1

funkyvisions commented 10 years ago

+1 if it at least used lesscss-java-1.4.1 (still in snapshot) it would fulfill my needs to support mixins with @import

chubbard commented 10 years ago

So the latest version in the repository is working with 1.5.1. I hope to release it soon.

chubbard commented 10 years ago

Snapshot of 1.5.1 has been released. https://oss.sonatype.org/content/repositories/snapshots/org/lesscss/lesscss/1.5.1-SNAPSHOT

funkyvisions commented 10 years ago

Awesome. Thanks for the response. I'll look for the release soon. It solves some good issues for us.

ghost commented 10 years ago

Any updates when version compatible with less 1.5.1 will be released.

chubbard commented 10 years ago

There is a snapshot out there so you can test it out now. And I was hoping someone would try it out and sanity check it outside of our testing before we release. You can test the snapshot out by changing your maven configuration to the following and add the snapshot repository to your repos:

https://oss.sonatype.org/content/repositories/snapshots/

org.lesscss lesscss 1.5.1-SNAPSHOT
ghost commented 10 years ago

I tried downloading the plugin by specifying the above changes but it could not download. It was looking for https://oss.sonatype.org/content/repositories/snapshots/org/lesscss/lesscss/1.5.1-SNAPSHOT/lesscss-1.5.1-SNAPSHOT.pom

I even looked for the url in the browser and could not find the esscss-1.5.1-SNAPSHOT.pom

Complete Error log

[INFO] ------------------------------------------------------------------------ [INFO] Preparing eclipse:eclipse Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/lesscss/lesscss/1.5.1-SNAPSHOT/lesscss-1.5.1-SNAPSHOT.pom [WARNING] Unable to get resource 'org.lesscss:lesscss:pom:1.5.1-SNAPSHOT' from repository eipa.snapshots (http://eipa.snapshots): Error transferring file: Connection timed out: connect Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/lesscss/lesscss/1.5.1-SNAPSHOT/lesscss-1.5.1-SNAPSHOT.pom [WARNING] Unable to get resource 'org.lesscss:lesscss:pom:1.5.1-SNAPSHOT' from repository eipa.snapshots (http://snapshots): Error transferring file: Connection timed out: connect Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/lesscss/lesscss/1.5.1-SNAPSHOT/lesscss-1.5.1-SNAPSHOT.pom [WARNING] Unable to get resource 'org.lesscss:lesscss:pom:1.5.1-SNAPSHOT' from repository central (http://central): Error transferring file: Connection timed out: connect [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error building POM (may not be this project's POM).

Project ID: org.lesscss:lesscss

Reason: POM 'org.lesscss:lesscss' not found in repository: Unable to download the artifact from any repository

org.lesscss:lesscss:pom:1.5.1-SNAPSHOT

from the specified remote repositories: nexus (https://oss.sonatype.org/content/repositories/snapshots), eipa.snapshots (https://oss.sonatype.org/content/repositories/snapshots)

for project org.lesscss:lesscss

funkyvisions commented 10 years ago

I verified that 1.5.1-SNAPSHOT is playing nicely with the maven plugin (at least for our use case). My plugin configuration looks as follows:

            <plugin>
                <groupId>org.lesscss</groupId>
                <artifactId>lesscss-maven-plugin</artifactId>
                <version>1.3.3</version>
                <configuration>
                    <outputDirectory>${project.build.directory}/${project.build.finalName}/assets</outputDirectory>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.lesscss</groupId>
                        <artifactId>lesscss</artifactId>
                        <version>1.5.1-SNAPSHOT</version>
                    </dependency>
                </dependencies>
            </plugin>

Will the dependency overriding always be required or will you change the plugin to use the RELEASED version of 1.5.1 when it's ready?

chubbard commented 10 years ago

Ok thanks @funkyvisions that may be enough for me to release it.

kimbo6365 commented 10 years ago

I encountered this (or a similar) error when trying to use Bootstrap 3 with this plugin. There is, however, an option in the configuration block to include a local version of Less.js and use that for compilation, for example:

<configuration>
    <lessJs>${project.basedir}/src/main/webapp/less-1.6.1.min.js</lessJs>
</configuration>

The only hitch is that you have to include Less.js in your repository with the sources. Hope that helps! :)

ghost commented 10 years ago

Any updates when is it planned to release ?

ghost commented 10 years ago

@kimbo6365

I tried using lessJs with 1.6.1 version. imports and lists all started working with version 1.3.1

Have you been successful with using

@import (reference) 'variables';

Whenever I do the above it throws a bunch of errors. This is supposed to be supported in 1.5.0 version

mazilema commented 10 years ago

@chubbard Using the 1.5.1-SNAPSHOT with @kimbo6365 config setting without problems here too. Any hint when you will release it? Our build server has no access to the snapshot repo so it would be great to have it on the release channel.

ghost commented 10 years ago

@iampivot Can you check if @import (refernce) works for you?

http://lesscss.org/features/#import-options-reference

SingingBush commented 10 years ago

@chubbard any chance of getting new release on maven central soon?

prak5190 commented 10 years ago

@funkyvisions technique worked perfectly for me. @ssbiswal1987 We're using less mainly for @import in our build process . All our files have extension .css rather than .less and it seems to be playing well with @import (less) "hello.css" syntax

ghost commented 10 years ago

Any Updates on release?