znerd / lessc2java Goto Github PK
View Code? Open in Web Editor NEWLessc2Java, for integrating Less-to-CSS compilers in Ant and Maven projects.
License: BSD 2-Clause "Simplified" License
Lessc2Java, for integrating Less-to-CSS compilers in Ant and Maven projects.
License: BSD 2-Clause "Simplified" License
As default, when using the task, original less files' directory structure is flatten. According to the short documentation, there is no option to preserve the original directory structure when converting files in a directory from less to css.
Cannot compile lessc2java from sources in an easy way, when Maven is not available. Sometimes, machine has a predefined set of software which includes only Ant.
There are issues with whitespace and tab that cause unit tests to fail
Currently, in v0.2, the 'includes' parameter does not work. Whatever it is set to, it acts as if it is set to "*.less".
Hi, I trying to use latest version of ant task and it doesn't work.
I cloned you repo & builded jars with maven
when running ant -d I see:
Apache Ant version 1.8.1 compiled on October 13 2010
Trying the default build file: build.xml
Buildfile: /d/tmp/less/test/build.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.6 in: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
Detected OS: Linux
Adding reference: ant.ComponentHelper
Setting ro project property: ant.file -> /d/tmp/less/test/build.xml
Setting ro project property: ant.file.type -> file
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile /d/tmp/less/test/build.xml with URI = file:/d/tmp/less/test/build.xml
Setting ro project property: ant.project.name -> testless
Adding reference: testless
Setting ro project property: ant.project.default-target -> build
Setting ro project property: ant.file.testless -> /d/tmp/less/test/build.xml
Setting ro project property: ant.file.type.testless -> file
Project base dir set to: /d/tmp/less/test
+Target:
+Target: build
Adding reference: ant.LocalProperties
parsing buildfile jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
Finding class org.znerd.lesscss.ant.LesscTask
BUILD FAILED
/d/tmp/less/test/build.xml:3: taskdef class org.znerd.lesscss.ant.LesscTask cannot be found
using the classloader AntClassLoader[/home/ekho/.m2/repository/org/znerd/lessc2java-ant-task/0.11-SNAPSHOT/lessc2java-ant-task-0.11-SNAPSHOT.jar:/home/ekho/.m2/repository/org/znerd/lessc2java-core/0.11-SNAPSHOT/lessc2java-core-0.11-SNAPSHOT.jar]
at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:622)
at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:239)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:179)
at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:82)
at org.apache.tools.ant.Main.runBuild(Main.java:786)
at org.apache.tools.ant.Main.startAnt(Main.java:218)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.ClassNotFoundException: org.znerd.lesscss.ant.LesscTask
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1361)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:594)
... 15 more
Total time: 0 seconds
build.xml :
<?xml version="1.0"?>
<project name="testless" default="build">
<taskdef name="lesscss" classname="org.znerd.lesscss.ant.LesscTask">
<classpath>
<pathelement location="/home/ekho/.m2/repository/org/znerd/lessc2java-ant-task/0.11-SNAPSHOT/lessc2java-ant-task-0.11-SNAPSHOT.jar"/>
<pathelement location="/home/ekho/.m2/repository/org/znerd/lessc2java-core/0.11-SNAPSHOT/lessc2java-core-0.11-SNAPSHOT.jar"/>
</classpath>
</taskdef>
<target name="build">
<lesscss dir="./css" todir="./css" command="lessc" />
</target>
</project>
LessCSS v1.2.1 has been released. Test the task with that version, adapt it if necessary and release a new version of the Ant task that works well with it and documents compatibility.
OS: Windows 7 x64
Node.js: 0.6.10
Lessc: 1.2.1 (LESS Compiler) [JavaScript]
When compiling .LESS files with the Ant task the following output is shown:
[lesscss] INFO Running command "lessc" with argument(s): ""-v"".
[lesscss] INFO Failed to determine command version.
Afterwards, no files get transformed to CSS.
Snippet from the buid.xml, used by Ant:
<taskdef name="lesscss" classname="org.znerd.lessc2java.ant.LesscTask">
<classpath>
<pathelement path="${libsdir}/ant/ant.jar"/>
<pathelement path="${libsdir}/commons/commons-exec.jar"/>
<pathelement path="${libsdir}/maven/maven-plugin-api.jar"/>
<pathelement path="${libsdir}/znerd/lessc2java-ant-task.jar"/>
<pathelement path="${libsdir}/znerd/lessc2java-core.jar"/>
<pathelement path="${libsdir}/znerd/znerd-util.jar"/>
</classpath>
</taskdef>
<lesscss dir="${sourcedir}/stylesheets" todir="${destinationdir}/stylesheets"/>
Note, lessc2java-ant-task.jar, lessc2java-core.jar, znerd-util.jar were compiled manually by adding the sources to a Java project in Eclipse, satisfying the dependencies and exporting the relevant packages as above three JAR archives.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.