Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Using lesscss-maven-plugin in Eclipse (with m2e) #8

Open
DenisGL opened this issue Jul 20, 2012 · 5 comments
Open

Using lesscss-maven-plugin in Eclipse (with m2e) #8

DenisGL opened this issue Jul 20, 2012 · 5 comments

Comments

@DenisGL
Copy link

DenisGL commented Jul 20, 2012

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.

@Aldaviva
Copy link

Aldaviva commented Jun 6, 2013

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>

@jeromevdl
Copy link

Thanks Aldaviva !

@wutzebaer
Copy link

wutzebaer commented Oct 17, 2016

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

@Aldaviva
Copy link

Maybe changing the plugin execution phase from process-sources to a different phase would help?

@wutzebaer
Copy link

wutzebaer commented Oct 17, 2016

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants