For some reason, I can't get theme.less
(from Bootstrap 3.2.0) to build/compile with wro4j. I get a number of errors in the Maven plugin output, such as:
[INFO] processing group: bootstrap-theme.css
2487 ERROR Less4jProcessor - Failed to compile less resource: ro.isdc.wro.model.resource.Resource@53bb87b9[CSS,bootstrap-theme,true].
2487 ERROR Less4jProcessor - 2069:13 no viable alternative at input '>' in ruleset (which started at 2068:1).
2487 ERROR Less4jProcessor - 2069:25 mismatched input '@start-color' expecting '~'<escaped value>'' in selectors (which started at 2069:3).
2487 ERROR Less4jProcessor - 2069:25 no viable alternative at input '@start-color' in ruleset (which started at 2069:3).
2487 ERROR Less4jProcessor - 2069:46 no viable alternative at input '@progress-bg' in selectors (which started at 2069:37).
The line numbers are useless due to the CSS imports, but they look to correspond to some of the references in the theme.less
file.
wro.properties
preProcessors=cssImport,semicolonAppender
postProcessors=less4j,cssMinJawr
wro.xml
<groups xmlns="http://www.isdc.ro/wro">
<!-- This file configures the Web Resource Optimizer for Java (wro4j). This
tool minifies JS, compiles LESS CSS, etc. See https://code.google.com/p/wro4j/
and https://github.com/jbosstools/m2e-wro4j/wiki/Sample-twitter-bootstrap-project
for details. -->
<group name="bootstrap">
<css>/bootstrap-3.2.0/less/bootstrap.less</css>
<js>/bootstrap-3.2.0/js/*.js</js>
</group>
<group name="bootstrap-theme">
<css>/bootstrap-3.2.0/less/theme.less</css>
</group>
</groups>
pom.xml
<plugin>
<!-- Run the Web Resource Optimizer for Java (wro4j) as part of the build.
This tool minifies JS, compiles LESS CSS, etc. See https://code.google.com/p/wro4j/
and https://github.com/jbosstools/m2e-wro4j/wiki/Sample-twitter-bootstrap-project
for details. -->
<groupId>ro.isdc.wro4j</groupId>
<artifactId>wro4j-maven-plugin</artifactId>
<version>1.7.6</version>
<configuration>
<wroManagerFactory>ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory</wroManagerFactory>
<!-- <targetGroups>bootstrap</targetGroups> -->
<!-- Search for resources in both the source and output trees, to ensure
that generated resources are also found. -->
<contextFolder>${basedir}/src/main/webapp/,${project.build.directory}</contextFolder>
<destinationFolder>${project.build.outputDirectory}/${project.build.finalName}</destinationFolder>
<cssDestinationFolder>${project.build.directory}/${project.build.finalName}/WEB-INF/resources/css</cssDestinationFolder>
<jsDestinationFolder>${project.build.directory}/${project.build.finalName}/WEB-INF/resources/js</jsDestinationFolder>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
I'm afraid that I'm rather out of ideas here. The normal bootstrap.less
builds just fine-- it's only the theme that seem to not.