lesscss-maven-plugin icon indicating copy to clipboard operation
lesscss-maven-plugin copied to clipboard

Upgrade to less css 1.5.1

Open cperotAxway opened this issue 11 years ago • 19 comments

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

<lessJs>src/main/resources/less/less.min.js</lessJs>:

[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 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 )

cperotAxway avatar Dec 02 '13 15:12 cperotAxway

+1

ghost avatar Dec 14 '13 01:12 ghost

+1

mschipperheyn avatar Jan 14 '14 17:01 mschipperheyn

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

funkyvisions avatar Jan 17 '14 19:01 funkyvisions

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

chubbard avatar Jan 17 '14 20:01 chubbard

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

chubbard avatar Jan 17 '14 20:01 chubbard

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

funkyvisions avatar Jan 17 '14 20:01 funkyvisions

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

ssbiswal1987 avatar Jan 23 '14 06:01 ssbiswal1987

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

chubbard avatar Jan 23 '14 16:01 chubbard

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

ssbiswal1987 avatar Jan 24 '14 11:01 ssbiswal1987

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?

funkyvisions avatar Jan 24 '14 15:01 funkyvisions

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

chubbard avatar Jan 24 '14 16:01 chubbard

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! :)

kimbo6365 avatar Jan 25 '14 17:01 kimbo6365

Any updates when is it planned to release ?

ssbiswal1987 avatar Jan 27 '14 13:01 ssbiswal1987

@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

ssbiswal1987 avatar Jan 27 '14 16:01 ssbiswal1987

@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.

mazilema avatar Jan 28 '14 10:01 mazilema

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

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

ssbiswal1987 avatar Feb 03 '14 20:02 ssbiswal1987

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

SingingBush avatar Feb 06 '14 10:02 SingingBush

@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

prak5190 avatar Feb 22 '14 07:02 prak5190

Any Updates on release?

ssbiswal1987 avatar Feb 24 '14 00:02 ssbiswal1987