我目前在我的Intellij Spring应用程序中使用org.lesscss的lesscss-maven-plugin;构建正常,并且正在正确编译。
<build>
<plugins>
<plugin>
<groupId>org.lesscss</groupId>
<artifactId>lesscss-maven-plugin</artifactId>
<version>1.7.0.1.1</version>
<configuration>
<sourceDirectory>${project.basedir}/src/main/webapp/resources/less</sourceDirectory>
<outputDirectory>${project.basedir}/src/main/webapp/resources/css</outputDirectory>
<compress>true</compress>
<includes>
<include>bootstrap/bootstrap.less</include>
<include>template.less</include>
<include>var.less</include>
</includes>
<force>true</force>
<lessJs>${project.basedir}/src/main/webapp/resources/js/less-rhino-1.7.0.js</lessJs>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
要更新css输出目录,我必须运行mvn clean install
并重新启动我的tomcat ...这绝对不是有效的!
此方法在Eclipse下完美运行。