I'm looking for some information on how to get LESS compiling Bootstrap using the Maven plugin. I need to compile bootstrap with my less because I use bootstrap less in my files. Right now I have the maven plugin compiling less files into css, but it breaks when I try to get it to compile bootstrap less. I think this might be a version issue, but just want to know if anyone's been able to figure this out or has a better approach.
pom.xml
<plugin>
<groupId>org.lesscss</groupId>
<artifactId>lesscss-maven-plugin</artifactId>
<version>1.3.3</version>
<configuration>
<sourceDirectory>${project.basedir}/src/main/webapp/less</sourceDirectory>
<outputDirectory>${project.build.directory}/${project.build.finalName}/css</outputDirectory>
<compress>true</compress>
<includes>
<include>bootstrap/bootstrap.less</include>
<include>test.less</include>
</includes>
<force>true</force>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
I running the above in a run configuration that calls "clean lesscss:compile"
error
Failed to execute goal org.codehaus.mojo:lesscss-maven-plugin:1.0-beta-3:compile (default-cli) on project FastTest: Error while compiling LESS source: bootstrap\alerts.less: Syntax Error on line 57: [object Object] (compile.js#1) -> [Help 1]
I'm not sure why it's going after the first item in the list for bootstrap so I renamed bootstrap.less to see if it ran and this is what I got:
Failed to execute goal org.codehaus.mojo:lesscss-maven-plugin:1.0-beta-3:compile (default-cli) on project FastTest: Error while compiling LESS source: bootstrap\abootstrap.less: Syntax Error on line 686: [object Object] (compile.js#1) -> [Help 1]
You are not compiling your code with correct plugin.
You are defining:
<groupId>org.lesscss</groupId>
<artifactId>lesscss-maven-plugin</artifactId>
<version>1.3.3</version>
But from output it is obvious that a different plugin was triggered:
org.codehaus.mojo:lesscss-maven-plugin:1.0-beta-3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With