Coder Social home page Coder Social logo

sass-maven-plugin's Introduction

sass-maven-plugin's People

Contributors

adamjgray avatar apetro avatar edalquist avatar eranation avatar joepjoosten avatar jsedding avatar jwachter avatar minman avatar mmjmanders avatar mprins avatar rangerrick avatar savvasmisaghmoayyed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sass-maven-plugin's Issues

Passing relative paths to JRuby

When I try running the sass-maven-plugin, JRuby complains with the following error.

org.jruby.exceptions.RaiseException: (LoadError) no such file to load`
 -- jar:file:C:/Users/johnsmith/.m2/repository/org/jasig/maven
/sass-maven-plugin/1.0.1-SNAPSHOT/sass-maven-plugin-1.0.1-SNAPSHOT.jar!/gems/sass-3.2.2/lib/sass/../sass

I'm not sure where the relative path for the gems is coming from. This is the value being passed to jruby.eval(sassScript):

require 'rubygems'
require 'sass/plugin'
Sass::Plugin.options.merge!(
    :always_update => true,
    :cache_location => 'C:/Users/johnsmith/Dev/workspace/mycostatic/src/main/webapp/sass_cache',
    :style => :compressed
)
Sass::Plugin.add_template_location('C:/Users/johnsmith/Dev/workspace/mycostatic/src/main/webapp/mycoweb/scss', 'C:/Users/johnsmith/Dev/workspace/mycostatic/src/main/webapp/mycoweb')
Sass::Plugin.update_stylesheets

I believe my pom config is pretty basic.

<plugin>
  <groupId>org.jasig.maven</groupId>
  <artifactId>sass-maven-plugin</artifactId>
  <version>1.0.1-SNAPSHOT</version>
  <configuration>
    <sassSourceDirectory>C:/Users/johnsmith/Dev/workspace/mycostatic/src/main/webapp/mycoweb</sassSourceDirectory>
    <baseOutputDirectory>C:/Users/johnsmith/Dev/workspace/mycostatic/src/main/webapp/mycoweb</baseOutputDirectory>
    <sassOptions>
<cache_location>'C:/Users/johnsmith/Dev/workspace/mycostatic/src/main/webapp/sass_cache'</cache_location>
<always_update>true</always_update>
<style>:compressed</style>
    </sassOptions>
  </configuration>
</plugin> 

There is an issue opened against JRuby regarding relative paths, but I'm not sure which project is really best positioned to address this problem.
jruby/jruby#235

Compilation quietly fails when directory path has curly braces

See this guy's stackoverflow question: https://stackoverflow.com/questions/21314827/maven-build-with-sass-does-not-work-in-jenkins

I made a directory on my local machine called '{a}' and found I could replicate his issue by building from it, and worked around it by only passing relative paths to the SASS plugin. It would be good not to have to know/do this though, and also good for the plugin to complain if it thinks its source directory does not exist.

SASS 3.3 support

Is there an easy way to add SASS 3.3 support (myself)? Or can I configure this somehow?

Memory Leak

First off, thanks for the plugin.

Running update-stylesheets as a one off operation works great. Running it with maven package works too. But as soon as the maven operation gets too long, a permgen error occurs.
In particular, when running the tomcat7:run-war goal, while the tomcat server is starting up or at some short point afterwards, there is a permgen space error. Not running the sass plugin has a direct correlation as to whether or not that error occurs.

I've heard jRuby has some memory leak issues, but I can't really speculate as to what could be the issue.

Thanks,
Dom

Compass build does not pick up config.rb

<plugin>
    <groupId>org.jasig.maven</groupId>
    <artifactId>sass-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>sassProcessResources</id>
            <phase>generate-resources</phase>
            <goals>
                <goal>update-stylesheets</goal>
            </goals>
            <configuration>
                <useCompass>true</useCompass>
                <sassSourceDirectory>${basedir}/src/main/scss</sassSourceDirectory>
                <destination>${project.build.outputDirectory}/styleguide-components/resources/css</destination>
            </configuration>
        </execution>
    </executions>
</plugin>

I have a config.rb in the root of my "styleguide" folder which is in the "scss" folder.

If I run compass compile from the command line the config.rb gets picked up and the sprite I am trying to generate gets created as expected, however if I try to update-stylesheets using the maven plugin it fails with the below error.

No files were found in the load path matching "common_icons/*.png". Your current load paths are: ./images

How do I actually get the plugin to pick up the config.rb file?

Error in running the ruby script from maven

I give following command: mvn clean install -X
and I get:
Hi,
I am getting following error:

env['GEM_PATH'] += ENV['GEM_PATH'] unless ENV['GEM_PATH'].nil?
Gem.paths = env
require 'sass/plugin'
require 'java'
Sass::Plugin.options.merge!(
:always_update => true,
:cache_location => '/Users/work/git/gpp/content/target/sass_cache',
:css_location => '/Users/work/git/gpp/content/src/main/content/jcr_root/etc/designs/gpp/guide/css',
:debug_info => null,
:style => null,
:template_location => '/Users/work/git/gpp/content/src/main/content/jcr_root/etc/designs/gpp/guide/sass'
)
Sass::Plugin.on_compilation_error {|error, template, css| $compiler_callback.compilationError(error.message, template, css) }
Sass::Plugin.on_updated_stylesheet {|template, css| $compiler_callback.updatedStylesheeet(template, css) }
Sass::Plugin.on_template_modified {|template| $compiler_callback.templateModified(template) }
Sass::Plugin.on_template_created {|template| $compiler_callback.templateCreated(template) }
Sass::Plugin.on_template_deleted {|template| $compiler_callback.templateDeleted(template) }
require 'pp'
pp Sass::Plugin.options
Sass::Plugin.update_stylesheets
at org.jasig.maven.plugin.sass.AbstractSassMojo.executeSassScript(AbstractSassMojo.java:197)
at org.jasig.maven.plugin.sass.UpdateStylesheetsMojo.execute(UpdateStylesheetsMojo.java:43)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: javax.script.ScriptException: org.jruby.exceptions.RaiseException: (NameError) undefined local variable or method null' for main:Object at org.jruby.embed.jsr223.JRubyEngine.wrapException(JRubyEngine.java:115) at org.jruby.embed.jsr223.JRubyEngine.eval(JRubyEngine.java:93) at org.jruby.embed.jsr223.JRubyEngine.eval(JRubyEngine.java:153) at org.jasig.maven.plugin.sass.AbstractSassMojo.executeSassScript(AbstractSassMojo.java:191) ... 22 more Caused by: org.jruby.exceptions.RaiseException: (NameError) undefined local variable or methodnull' for main:Object

Can you please help me understand what this is about and how to fix this?

My POM Snippet looks like:

        <plugin>
            <groupId>org.jasig.maven</groupId>
            <artifactId>sass-maven-plugin</artifactId>
            <executions>
                <execution>
                    <id>sassProcessSource</id>
                    <phase>process-sources</phase>
                    <goals>
                        <goal>update-stylesheets</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <sassOptions>
                    <always_update>true</always_update>
                    <style>${sass.OutputStyle}</style>
                    <debug_info>${debug}</debug_info>
                </sassOptions>
                <useCompass>false</useCompass>
                <resources>
                    <resource>
                        <source>
                            <directory>${basedir}/src/main/content/jcr_root/etc/designs/gpp/guide/sass</directory>
                            <includes>
                                <include>*.scss</include>
                            </includes>
                            <excludes />
                        </source>
                        <destination>${basedir}/src/main/content/jcr_root/etc/designs/gpp/guide/css</destination>
                    </resource>
                </resources>
            </configuration>
        </plugin>

relativeOutputDirectory not working as expected

When defining <relativeOutputDirectory>..</relativeOutputDirectory> directly inside <configuration> it has no effect at all and when defining it inside a resource element it creates two css files, one respecting the relativeOutputDirectory and one not respecting it.

            <plugin>
                <groupId>org.jasig.maven</groupId>
                <artifactId>sass-maven-plugin</artifactId>
                <version>1.1.1</version>
                <configuration>
                    <resources>
                        <resource>
                            <source>
                                <directory>${basedir}/src/main/resources</directory>
                                <includes>
                                    <include>**/sass</include>
                                </includes>
                            </source>
                            <relativeOutputDirectory>..</relativeOutputDirectory>
                            <destination>${project.build.directory}/${project.build.finalName}</destination>
                        </resource>
                    </resources>
                </configuration>
            </plugin>

Did I do something wrong?

I'm using plugin version 1.1.1 and maven version 3.2.3 with java 1.7.0_67.

Support for Compass configuration properties and callbacks

I'm currently using gem-maven-plugin to use Compass in a Maven build and I was trying to migrate to sass-maven-plugin.

However, we're using a config.rb file for Compass with soms configuration properties and callbacks (as documented on http://compass-style.org/help/tutorials/configuration-reference/ ) and I don't see a way to pass these properties and callbacks to sass-maven-plugin. Is this possible?

Or is it possible to have sass-maven-plugin use our existing config.rb for Compass?

Errors in stylesheets dropped silently

When an invalid SCSS stylesheet is processed with the sass-maven-plugin, the plugin appears to dump the error message into the output CSS file and continue silently, rather than directing that output to the console and failing the build.

current snapshot fails compiling simple project

I'm running into problems compiling a very simple project using the current head/snapshot. Can anyone shed some light on this?

The essence is this message: SystemCallError: Unknown error - Unknown Error (20047) - C:\workspace\maven-compass-example\target\compass-example\css\C:

Somehow a spurious C: gets attached..

Compiling the same project with 1.0.2 works fine. It seems that 1.0.2 is using relative pathnames and 1.0.3 is using absolute pathnames.... (traces below) It looks like these changes were introduced with @joepjoosten 's pull #18 and/or #19

The project is at: https://github.com/mprins/maven-compass-example/tree/no-compass-use

trace 1.0.3-SNAPSHOT
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building maven-compass-example webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- sass-maven-plugin:1.0.3-SNAPSHOT:update-stylesheets (default) @ maven-compass-example ---
[INFO] Queing SASS Template for compile: C:\workspace\maven-compass-example/src/main/scss => C:\workspace\maven-compass-example\target\compass-example\css
[INFO] Compiling SASS Templates
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.218s
[INFO] Finished at: Fri Feb 22 09:40:53 CET 2013
[INFO] Final Memory: 12M/30M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jasig.maven:sass-maven-plugin:1.0.3-SNAPSHOT:update-stylesheets (default) on project maven-compass-example: Failed to execute SASS ruby script:
[ERROR] require 'rubygems'
[ERROR] require 'sass/plugin'
[ERROR] require 'java'
[ERROR] Sass::Plugin.options.merge!(
[ERROR] :always_update => true,
[ERROR] :cache_location => 'C:/workspace/maven-compass-example/target/sass_cache',
[ERROR] :debug_info => true,
[ERROR] :style => :expanded
[ERROR] )
[ERROR] java_import org.jasig.maven.plugin.sass.CompilationErrors
[ERROR] $compilation_errors = CompilationErrors.new
[ERROR] Sass::Plugin.on_compilation_error {|error, template, css| $compilation_errors.add(template, error.message) }
[ERROR] Sass::Plugin.add_template_location('C:\workspace\maven-compass-example/src/main/scss', 'C:\workspace\maven-compass-example\target\compass-example\css')
[ERROR] Sass::Plugin.update_stylesheets: org.jruby.exceptions.RaiseException: (SystemCallError) Unknown error - Unknown Error (20047) - C:\workspace\maven-compass-example\target\compass-example\css\C:
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jasig.maven:sass-maven-plugin:1.0.3-SNAPSHOT:update-stylesheets (default) on project maven-compass-example: Failed to execute SASS ruby script:
require 'rubygems'
require 'sass/plugin'
require 'java'
Sass::Plugin.options.merge!(
    :always_update => true,
    :cache_location => 'C:/workspace/maven-compass-example/target/sass_cache',
    :debug_info => true,
    :style => :expanded
)
java_import org.jasig.maven.plugin.sass.CompilationErrors
$compilation_errors = CompilationErrors.new
Sass::Plugin.on_compilation_error {|error, template, css| $compilation_errors.add(template, error.message) }
Sass::Plugin.add_template_location('C:\workspace\maven-compass-example/src/main/scss', 'C:\workspace\maven-compass-example\target\compass-example\css')
Sass::Plugin.update_stylesheets
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to execute SASS ruby script:
require 'rubygems'
require 'sass/plugin'
require 'java'
Sass::Plugin.options.merge!(
    :always_update => true,
    :cache_location => 'C:/workspace/maven-compass-example/target/sass_cache',
    :debug_info => true,
    :style => :expanded
)
java_import org.jasig.maven.plugin.sass.CompilationErrors
$compilation_errors = CompilationErrors.new
Sass::Plugin.on_compilation_error {|error, template, css| $compilation_errors.add(template, error.message) }
Sass::Plugin.add_template_location('C:\workspace\maven-compass-example/src/main/scss', 'C:\workspace\maven-compass-example\target\compass-example\css')
Sass::Plugin.update_stylesheets
    at org.jasig.maven.plugin.sass.UpdateStylesheetsMojo.execute(UpdateStylesheetsMojo.java:61)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more
Caused by: javax.script.ScriptException: org.jruby.exceptions.RaiseException: (SystemCallError) Unknown error - Unknown Error (20047) - C:\workspace\maven-compass-example\target\compass-example\css\C:
    at org.jruby.embed.jsr223.JRubyEngine.wrapException(JRubyEngine.java:115)
    at org.jruby.embed.jsr223.JRubyEngine.eval(JRubyEngine.java:93)
    at org.jruby.embed.jsr223.JRubyEngine.eval(JRubyEngine.java:153)
    at org.jasig.maven.plugin.sass.UpdateStylesheetsMojo.execute(UpdateStylesheetsMojo.java:49)
    ... 21 more
Caused by: org.jruby.exceptions.RaiseException: (SystemCallError) Unknown error - Unknown Error (20047) - C:\workspace\maven-compass-example\target\compass-example\css\C:
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

trace 1.0.2

[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building maven-compass-example webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- sass-maven-plugin:1.0.2:update-stylesheets (default) @ maven-compass-example ---
[INFO] Queing SASS Template for compile: src/main/scss => target/compass-example/css
[INFO] Compiling SASS Templates
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ maven-compass-example ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ maven-compass-example ---
[INFO] Nothing to compile - all classes are up to date
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.250s
[INFO] Finished at: Fri Feb 22 09:46:40 CET 2013
[INFO] Final Memory: 13M/32M
[INFO] ------------------------------------------------------------------------

Not respecting always_update = false

Hey guys.

Does someone also got the problem that the property always_update = false is not respected and on update_stylesheets it still compile files?

If I dump the ruby script and execute it (without the compiler callback) it works fine.

This is the ruby script I dumped out of the plugin before execution.
I just commented out the compiler callbacks for logging.

require 'rubygems'
env = { 'GEM_PATH' => [
    'xxx/target/rubygems'
] }
Gem.paths = env
require 'sass/plugin'
require 'compass'
require 'compass/exec'
Compass.add_project_configuration
Compass::Frameworks.register_directory('jar:'+ File.join(Compass::Core.base_directory, 'stylesheets'))
Sass::Plugin.options.merge!(
    :always_check => false,
    :always_update => false,
    :cache_location => 'xxx/target/sass_cache',
    :css_location => 'xxx/src/main/webapp/css',
    :full_exception => true,
    :load_paths => Compass.configuration.sass_load_paths,
    :style => :expanded,
    :template_location => 'xxx/src/main/webapp/sass',
    :unix_newlines => true
)
#Sass::Plugin.on_compilation_error {|error, template, css| $compiler_callback.compilationError(error.message, template, css) }
#Sass::Plugin.on_updated_stylesheet {|template, css| $compiler_callback.updatedStylesheeet(template, css) }
#Sass::Plugin.on_template_modified {|template| $compiler_callback.templateModified(template) }
#Sass::Plugin.on_template_created {|template| $compiler_callback.templateCreated(template) }
#Sass::Plugin.on_template_deleted {|template| $compiler_callback.templateDeleted(template) }
Sass::Plugin.update_stylesheets

Does someone know why this happen?

Thanks in advance
Regards FragSalat

Please add an autoprefixer

Most of the time, if you use a new CSS feature like flexbox or whatever, you need to prefix all options with maybe -webkit-flex and so on. In grunt you can use grunt-autoprefixer. What we do now is to call this process. It would be very nice, if we can have this option inside the sass-maven-plugin.

Cheers

Chris

round to 3 decimals

round($pixels/$context) is rounding. I'd like to have a round with 2 or 3 decimals. I'm using this plugin on maven..

sass::script::number.precision on Ruby works it seems. Is there a way i can configure in maven?

Slow SASS compilation

On my projects I tie SASS compilation into the package lifecycle and compiling SASS takes up a good portion of the build time. Especially, on travis where I do:

  • mvn install -DskipTests
  • mvn integration-tests

Assuming the user doesn't run a clean operation each time, we could could try checking if any files have changed before running the expensive sass compilation process?

NHibernate attempts to bypass unnecessary compilation by storing when files were written: http://nhforge.org/blogs/nhibernate/archive/2009/03/13/an-improvement-on-sessionfactory-initialization.aspx

Compilation Problem with compound selector's

Hi Folks,
SASS CSS sounds really perfect and because I'm using maven I stumbled into the sass-maven-plugin
. First of all great work, but I I currently got a Problem with compound selector's.

According to http://sass-lang.com/documentation/file.SASS_REFERENCE.html
The following code

#main {
  color: black;
  &-sidebar { border: 1px solid; }
}

should compile to

#main {
  color: black; }
  #main-sidebar {
    border: 1px solid; }

Unfortunately it does not and the build fails with the following Error-Message:

[INFO] Queing SASS Template for compile: ..../src/main/webapp/scss => ..../target
[ERROR] Compilation of template ..../src/main/webapp/scss/foo.scss failed: Invalid CSS after "  &": expected "{", was "-sidebar { bord..."

"-sidebar" may only be used at the beginning of a compound selector.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

Following Plugin-Config:

<plugin>
  <groupId>org.jasig.maven</groupId>
  <artifactId>sass-maven-plugin</artifactId>
  <version>1.1.1</version>
  <executions>
    <execution>
        <id>sass-css-generation</id>
        <phase>process-sources</phase>
        <goals>
            <goal>update-stylesheets</goal>
        </goals>
    </execution>
  </executions>
  <configuration>
    <resources>
        <resource>
            <source>
    <directory>${basedir}/src/main/webapp/scss</directory>
            </source>
            <destination>${project.build.directory}</destination>
        </resource>
    </resources>
    <failOnError>true</failOnError>
    <sassOptions>
        <style>:compressed</style>
    </sassOptions>
  </configuration>
</plugin>

Maven-Version:

$ mvn --version
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.7.0_65, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: de_DE, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-36-generic", arch: "amd64", family: "unix"

Java Version:

$ java -version
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.2) (7u65-2.5.2-3~14.04)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

Is there something wrong in my config or my scss-Files?
Many Thanks!

M2E connector

I couldn't get the m2e connector found here https://code.google.com/a/eclipselabs.org/p/m2e-jasig-sass-connector/ to do anything. Is there anything I need to do after installing it into eclipse. The plugin is not being run on Eclipse's auto build or on a manual build.

Here is what the plugin looks like in my pom

<plugin>
    <groupId>org.jasig.maven</groupId>
    <artifactId>sass-maven-plugin</artifactId>
    <version>1.1.0</version>
    <executions>
    </executions>
    <configuration>
        <resources>

            <resource>
                <source>
                    <directory>${basedir}/WebContent/stylesheets/sass</directory>
                </source>
                <destination>${basedir}/WebContent/stylesheets/css</destination>
            </resource>

        </resources>
        <useCompass>true</useCompass>
    </configuration>
</plugin>

I tried reducing the version number to 1.0.0 but it didn't make a difference.

No such file or directory running watch goal

I am attempting to run the sass:watch goal using sass-maven-plugin 1.0.2. The update-stylsheets goal will run just fine with no errors. When I try to run the watch goal however I get a "No such file or directory" error from within JRuby.

Running on OSX Mountain Lion. Maven output below

mvn sass:watch
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Spring MVC 2.23.0.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- sass-maven-plugin:1.0.2:watch (default-cli) @ spring-mvc ---
[INFO] Started watching SASS Template: src/main/webapp/WEB-INF/styles/scss => target/console/WEB-INF/styles
Errno::ENOENT: No such file or directory - file:/Users/derekgallo/.m2/repository/org/jasig/maven/sass-maven-plugin/1.0.2/sass-maven-plugin-1.0.2.jar!/gems/sass-3.2.5/vendor/listen/lib/listen/directory_record.rb
mtime at org/jruby/RubyFile.java:1656
DirectoryRecord at file:/Users/derekgallo/.m2/repository/org/jasig/maven/sass-maven-plugin/1.0.2/sass-maven-plugin-1.0.2.jar!/gems/sass-3.2.5/vendor/listen/lib/listen/directory_record.rb:21
Listen at file:/Users/derekgallo/.m2/repository/org/jasig/maven/sass-maven-plugin/1.0.2/sass-maven-plugin-1.0.2.jar!/gems/sass-3.2.5/vendor/listen/lib/listen/directory_record.rb:11
(root) at file:/Users/derekgallo/.m2/repository/org/jasig/maven/sass-maven-plugin/1.0.2/sass-maven-plugin-1.0.2.jar!/gems/sass-3.2.5/vendor/listen/lib/listen/directory_record.rb:5
initialize at file:/Users/derekgallo/.m2/repository/org/jasig/maven/sass-maven-plugin/1.0.2/sass-maven-plugin-1.0.2.jar!/gems/sass-3.2.5/vendor/listen/lib/listen/directory_record.rb:26
collect at org/jruby/RubyArray.java:2339
initialize at file:/Users/derekgallo/.m2/repository/org/jasig/maven/sass-maven-plugin/1.0.2/sass-maven-plugin-1.0.2.jar!/gems/sass-3.2.5/vendor/listen/lib/listen/multi_listener.rb:26
watch at file:/Users/derekgallo/.m2/repository/org/jasig/maven/sass-maven-plugin/1.0.2/sass-maven-plugin-1.0.2.jar!/gems/sass-3.2.5/lib/sass/plugin/compiler.rb:266
send at org/jruby/RubyKernel.java:2105
method_missing at file:/Users/derekgallo/.m2/repository/org/jasig/maven/sass-maven-plugin/1.0.2/sass-maven-plugin-1.0.2.jar!/gems/sass-3.2.5/lib/sass/plugin.rb:107
(root) at <script>:10
org.jruby.embed.EvalFailedException: (Errno::ENOENT) file:/Users/derekgallo/.m2/repository/org/jasig/maven/sass-maven-plugin/1.0.2/sass-maven-plugin-1.0.2.jar!/gems/sass-3.2.5/vendor/listen/lib/listen/directory_record.rb
at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:136)
at org.jruby.embed.jsr223.JRubyEngine.eval(JRubyEngine.java:90)
at org.jruby.embed.jsr223.JRubyEngine.eval(JRubyEngine.java:153)
at org.jasig.maven.plugin.sass.WatchMojo.execute(WatchMojo.java:84)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.jruby.exceptions.RaiseException: (Errno::ENOENT) file:/Users/derekgallo/.m2/repository/org/jasig/maven/sass-maven-plugin/1.0.2/sass-maven-plugin-1.0.2.jar!/gems/sass-3.2.5/vendor/listen/lib/listen/directory_record.rb
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.123s
[INFO] Finished at: Thu Mar 07 12:45:31 EST 2013
[INFO] Final Memory: 32M/238M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jasig.maven:sass-maven-plugin:1.0.2:watch (default-cli) on project spring-mvc: Failed to execute SASS Watch Script:
[ERROR] require 'rubygems'
[ERROR] require 'sass/plugin'
[ERROR] Sass::Plugin.options.merge!(
[ERROR] :always_update => true,
[ERROR] :cache_location => '/Users/derekgallo/Dropbox/Projects/Striketracker/Services2/servers/spring-mvc/target/sass_cache',
[ERROR] :css_location => '/Users/derekgallo/Dropbox/Projects/Striketracker/Services2/servers/spring-mvc/target/console/WEB-INF/styles',
[ERROR] :style => :compressed,
[ERROR] :template_location => '/Users/derekgallo/Dropbox/Projects/Striketracker/Services2/servers/spring-mvc/src/main/webapp/WEB-INF/styles/scss'
[ERROR] )
[ERROR] Sass::Plugin.watch: org.jruby.exceptions.RaiseException: (Errno::ENOENT) file:/Users/derekgallo/.m2/repository/org/jasig/maven/sass-maven-plugin/1.0.2/sass-maven-plugin-1.0.2.jar!/gems/sass-3.2.5/vendor/listen/lib/listen/directory_record.rb
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

sass:watch looping when no changes are happening

I have just started using this plugin, so maybe I missed a configuration or something, but this is what I'm seeing. The sass:watch command compiling my .scss files about every second, even when no changes are being made to them. I am running Windows 7 64bit with an SSD harddrive. I thought maybe this has been reported before, but couldn't find it in your issues. Any tips would be great. I'll update if I find anything as to the cause.

Thanks,
Adam

m2e connector - Failed to execute SASS ruby script:

I am having troubles using the m2e-jasig-sass-connector(1.0.0). The sass-maven-plugin (1.1.1) runs smoothly when launched from command line (or when maven runs it during deployment), but Eclipse always throws an error when validating the app. It says :

Failed to execute SASS ruby script:
require 'rubygems'
env = { 'GEM_PATH' => [
'/home/cowcow/Documents/Projects/eclipse/vicu-app/target/rubygems'
] }
env['GEM_PATH'] += ENV['GEM_PATH'] unless ENV['GEM_PATH'].nil?
Gem.paths = env
require 'sass/plugin'
...
Sass::Plugin.on_template_modified {|template| $compiler_callback.templateModified(template) }
Sass::Plugin.on_template_created {|template| $compiler_callback.templateCreated(template) }
Sass::Plugin.on_template_deleted {|template| $compiler_callback.templateDeleted(template) }
Sass::Plugin.update_stylesheets (org.jasig.maven:sass-maven-plugin:1.1.1:update-stylesheets:generate-css:process-sources)

I unfortunately can't see the actual cause for the error. The plugin is bound to the process-sources maven phase.

"No such file" when using JRuby 1.7.0 & 1.7.1

I'm getting the following on the current build:

[INFO] --- sass-maven-plugin:1.0.1-SNAPSHOT:update-stylesheets (sassProcessSource) @ ft-cmsWeb ---
[INFO] Queing SASS Template for compile: src/site/resources/sass/scss => target/cms/media/css
[INFO] Compiling SASS Templates
LoadError: no such file to load -- jar:file:/home/neale/.m2/repository/org/jasig/maven/sass-maven-plugin/1.0.1-SNAPSHOT/sass-maven-plugin-1.0.1-SNAPSHOT.jar!/gems/sass-3.2.2/lib/sass/../sass
  require at org/jruby/RubyKernel.java:1019
  require at jar:file:/home/neale/.m2/repository/org/jruby/jruby-complete/1.7.0/jruby-complete-1.7.0.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36

And I've tested it with JRuby 1.7.1 too

Perhaps someone closer to the code might be able to push for a fix in JRuby if it's a bug there

Error during build caused by <gemPaths> configuration

I'm getting a configuration error during build. I've tried both explicitly setting the and leaving it as the default and the error is always the same.

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to configure plugin parameters for: org.jasig.maven:sass-maven-plugin:1.1.1
Cause: Cannot assign configuration entry 'gemPaths' to 'class [Ljava.lang.String;' from 'null', which is of type class java.lang.String

I've tried emptying my repository and building again, but no luck.

Stacktraced build output and configured pom.xml in the link below:
https://gist.github.com/justindsmith/7cac80c66c654fc46dfc

Versions:

  • sass-maven-plugin: 1.1.1
  • maven: 2.2.1
  • java: 1.7.0_17

Can SASS/Compass version be configurable?

I've been trying to build a fork of this locally and consume it in another Maven project to no avail (it does not put the rubygems folder in the new project's target, so it the execution fails).

I love this plug in and want to use it, but I need access to newer SASS features.

No obvious way to use Compass

The Sass command-line tool has the option --compass, which brings in all the Compass stuff (imports, language extensions, etc). The sass-maven-plugin does not appear to be able to do this.

sass:watch ruby puts to log

Is there a way to forward ruby puts into maven log? It would be helpful during 'sass:watch' to see messages like

"Change detected to ..."

and (more important) things like

"error .... (Line 22: Invalid CSS after...)"

this would be great!

TypeError: can't convert String into Array when GEM_PATH is set

[INFO] --- sass-maven-plugin:1.1.1:update-stylesheets (default) @ lor ---
[INFO] Compiling SASS Templates
[INFO] Queing SASS Template for compile: /Users/maxcom/git-checkout/lorsource/src/main/webapp/sass => /Users/maxcom/git-checkout/lorsource/target/lor-1.0-SNAPSHOT
TypeError: can't convert String into Array
       + at org/jruby/RubyArray.java:2963
  (root) at <script>:5
org.jruby.embed.EvalFailedException: (TypeError) can't convert String into Array
    at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:136)
    at org.jruby.embed.jsr223.JRubyEngine.eval(JRubyEngine.java:90)
    at org.jruby.embed.jsr223.JRubyEngine.eval(JRubyEngine.java:153)
    at org.jasig.maven.plugin.sass.AbstractSassMojo.executeSassScript(AbstractSassMojo.java:191)
    at org.jasig.maven.plugin.sass.UpdateStylesheetsMojo.execute(UpdateStylesheetsMojo.java:43)

Here is the beginning of that script:

[ERROR] require 'rubygems'
[ERROR] env = { 'GEM_PATH' => [
[ERROR] '/Users/maxcom/git-checkout/lorsource/target/rubygems'
[ERROR] ] }
[ERROR] env['GEM_PATH'] += ENV['GEM_PATH'] unless ENV['GEM_PATH'].nil?
[ERROR] Gem.paths = env

Workaround: unset GEM_PATH before running mvn

NameError: uninitialized constant Compass

Compiling scss scripts with Compass disabled results in an error: uninitialized constant Compass.

Workaround: set useCompass to true

Plugin version: 1.1.0
Maven: 3.0.3

pom.xml:

      <plugin>
        <groupId>org.jasig.maven</groupId>
        <artifactId>sass-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>sassProcessSource</id>
            <phase>package</phase>
            <goals>
              <goal>update-stylesheets</goal>
            </goals>
            <configuration>
              <useCompass>false</useCompass>
              <resources>
                <resource>
                  <source>
                    <directory>${basedir}/src/main/sass/</directory>
                    <includes>
                      <include>**</include>
                    </includes>
                  </source>
                  <destination>${project.build.directory}/${project.build.finalName}/wurca/</destination>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>

maven -X output:

NameError: uninitialized constant Compass
  const_missing at org/jruby/RubyModule.java:2647
         (root) at <script>:17
org.jruby.embed.EvalFailedException: (NameError) uninitialized constant Compass
    at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:136)
    at org.jruby.embed.jsr223.JRubyEngine.eval(JRubyEngine.java:90)
    at org.jruby.embed.jsr223.JRubyEngine.eval(JRubyEngine.java:153)
    at org.jasig.maven.plugin.sass.UpdateStylesheetsMojo.execute(UpdateStylesheetsMojo.java:50)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
...
[ERROR] Sass::Plugin.update_stylesheets: org.jruby.exceptions.RaiseException: (NameError) uninitialized constant Compass
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jasig.maven:sass-maven-plugin:1.1.0:update-stylesheets (sassProcessSource) on project wurca-client: Failed to execute SASS ruby script:
require 'rubygems'
require 'sass/plugin'
require 'java'
Sass::Plugin.options.merge!(
    :cache_location => '/home/makeroo/tmp_wurca/wurca.git/wurca-client/target/sass_cache',
    :style => :expanded,
    :cache => true,
    :unix_newlines => true,
    :always_update => true
)
java_import org.jasig.maven.plugin.sass.CompilationErrors
$compilation_errors = CompilationErrors.new
Sass::Plugin.on_compilation_error {|error, template, css| $compilation_errors.add(template, error.message) }
Sass::Plugin.add_template_location('/home/makeroo/tmp_wurca/wurca.git/wurca-client/src/main/sass/', '/home/makeroo/tmp_wurca/wurca.git/wurca-client/${webappDirectory}/wurca')
require 'pp'
pp Sass::Plugin.options
pp Compass::configuration
Sass::Plugin.update_stylesheets
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

How to include compass configuration from config.rb?

Hi,

I am trying to move an existing sass/compass project into maven. The compilation is basically working (great!), but I am having troubles "transfer" the compass configuration in config.rb into the maven plugin.

My config.rb specifies e.g. :

images_dir      = "images"

In the sass file, the images are referred as:

$bgSpriteIcons  : image-url('icons/sprite-icons.png');
# spec_images
$teaserBigWidth               : image-width("spec_images/some_image.png");

For some reason, the images directory containing all the images and so on, has to reside in the path from which I execute the mvn call.

How do I configure the plugin, so it loads the images from the images path?

Error: The parameters "resources" are missing or invalid

After importing the plugin into my project pom.xml and run the project, I get the following Error:

[ERROR] Failed to execute goal org.jasig.maven:sass-maven-plugin:1.1.0:update-stylesheets (default-cli) on project scss: The parameters 'resources' for goal org.jasig.maven:sass-maven-plugin:1.1.0:update-stylesheets are missing or invalid.

How to solve this problem :(?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.