Fork me on GitHub

Compilation

How to solve the java.lang.StackOverflowError Exception in main thread?

This error occurs in the Third-Party dependence (Rhino) when the sources are very complex. To solve this problem you need to add -Xss argument to increase the maximum stack size.

Example:

mvn -Xss1m biz.gabrys.maven.plugins:lesscss-maven-plugin:compile

[top]


Can CSS files be save in the directory with Less sources?

Yes. Generated CSS files can be save in the source directory. You need to set the same path in the sourceDirectory and outputDirectory parameters.

Example:

<configuration>
   <sourceDirectory>src/main/less</sourceDirectory>
   <outputDirectory>src/main/less</outputDirectory>
   ...
</configuration>

[top]

Integrated Development Environment

How to disable auto compilation in the Eclipse IDE?

M2Eclipse is an Eclipse plugin which provides tight integration for Maven. It determines who and when plugins should be executed. Each plugin can store lifecycle mapping metadata with data on which it based its decision (see M2E compatible maven plugins). By default this plugin is called on incremental builds. If you want to disable automatic compilation, then you need to add the following entry to your pom.xml:

<pluginManagement>
   <plugins>
      <plugin>
         <groupId>org.eclipse.m2e</groupId>
         <artifactId>lifecycle-mapping</artifactId>
         <version>1.0.0</version>
         <configuration>
            <lifecycleMappingMetadata>
               <pluginExecutions>
                  <pluginExecution>
                     <pluginExecutionFilter>
                        <groupId>biz.gabrys.maven.plugins</groupId>
                        <artifactId>lesscss-maven-plugin</artifactId>
                        <versionRange>[0,)</versionRange>
                        <goals>
                           <goal>compile</goal>
                        </goals>
                     </pluginExecutionFilter>
                     <action>
                        <ignore />
                     </action>
                  </pluginExecution>
               </pluginExecutions>
            </lifecycleMappingMetadata>
         </configuration>
      </plugin>
   </plugins>
</pluginManagement>

[top]