lesscss-maven-plugin
lesscss-maven-plugin copied to clipboard
Using lesscss-maven-plugin in Eclipse (with m2e)
Hello, I've tried to use your (wonderfull) plugin from within Eclipse (with m2e), but nothing happens : no css file is generated. Could you provide a kind of how-to for using this plugin in Eclipse ? Thanks a lot.
Here are the relevant portions of my pom.xml
:
<project>
<properties>
<lesscss.outputDirectory>${project.build.directory}/${project.build.finalName}/styles</lesscss.outputDirectory>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.lesscss</groupId>
<artifactId>lesscss-maven-plugin</artifactId>
<version>1.3.3</version>
<configuration>
<sourceDirectory>${project.basedir}/src/main/webapp/styles</sourceDirectory>
<outputDirectory>${lesscss.outputDirectory}</outputDirectory>
<compress>true</compress>
<includes>
<include>all.less</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
<phase>process-sources</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>m2e</id>
<activation>
<property>
<name>m2e.version</name>
</property>
</activation>
<properties>
<lesscss.outputDirectory>${project.build.directory}/m2e-wtp/web-resources/styles</lesscss.outputDirectory>
</properties>
</profile>
</profiles>
</project>
Thanks Aldaviva !
Hi i tried this, but when cleaning my project the less file is not compiled to m2e-wtp\web-resources\resources\css
until i change anything in my .less file
i'm using eclipse neo
Maybe changing the plugin execution phase from process-sources
to a different phase would help?
Hm did not help, it seams that the compile goal is not called at all when i change the "sourceDirectory" do anything invalid i get an error in my pom.xml, but after a clean the error diappears... but this source tells that compile should beexecuted: http://stackoverflow.com/questions/2632425/how-do-i-start-maven-compile-goal-on-save-in-eclipse#2633133 when saving the pom or my less file againt the arror re-appears