Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I went down the same road recently using <a href="http://www.lesscss.org/" rel="nofollow noreferrer">LessCss</a>, a similar technology. At first I tried to embed JRuby in my build lifecycle. But unfortunately Maven + JRuby is a monster, it's slow, huge and buggy (half the time it wouldn't even start because it would complain about the file path it was running on).</p> <p>Fortunately, there is now a JavaScript port of LessCss, which I now embed via Mozilla Rhino. I <a href="http://mostlymagic.wordpress.com/2010/07/22/compile-less-files-to-css-in-maven-again-using-gmaven/" rel="nofollow noreferrer">describe the process in this blog post</a>.</p> <p>Yesterday though I took it to the next level, making a Maven LessCss Plugin to minimize POM configuration and code duplication. Unfortunately I can't share it because it's proprietary code for my current client, but the solution is simple:</p> <p><a href="http://docs.codehaus.org/display/GMAVEN/Implementing+Maven+Plugins" rel="nofollow noreferrer">Use GMaven to create the Plugin</a>, create an abstract base mojo that calls the LessCss compiler and several concrete implementations that configure the base mojo for different resource sets:</p> <p>e.g.</p> <ul> <li><code>lesscss:compile</code><br> compiles from all <code>&lt;resources&gt;</code> to <code>${project.build.outputDirectory}</code></li> <li><code>lesscss:test-compile</code><br> compiles from all <code>&lt;testResources&gt;</code> to <code>${project.build.testOutputDirectory}</code></li> <li><code>lesscss:war-compile</code><br>(compiles from all <code>src/main/webapp</code> to <code>${project.build.directory}/${project.build.finalName}</code> , the exploded war directory)</li> </ul> <p>So while I can't help you with SASS (apart from you asking the auth or to port it to Groovy, Java or JavaScript), I think I've shown you a feasible alternative.</p> <p>Of course you can also implement a Maven Plugin in java without Groovy (also embedding the JavaScript via Rhino), but I think it's easier in Groovy.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload