Giter VIP home page Giter VIP logo

dart-sass-maven-plugin's People

Contributors

cleydyr avatar melloware avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

dart-sass-maven-plugin's Issues

Watch: Not watching correct directory

Trying to run ...

mvn io.github.cleydyr:dart-sass-maven-plugin:0.2.0:watch-sass

I am getting this its looking at src\main\sass and its not looking at my plugin config for which directory unless I am doing something wrong.

[INFO] --- dart-sass-maven-plugin:0.2.0:watch-sass (default-cli) @ primefaces-showcase ---
Error reading src\main\sass: Cannot open file.

Sass is watching for changes. Press Ctrl-C to stop.

Commons IO Incompatibility: Missing AbstractStreamBuilder

With 1.3.0.

[ERROR] Failed to execute goal io.github.cleydyr:dart-sass-maven-plugin:1.3.0:compile-sass (generate-css-using-sass) on project designer: 
Execution generate-css-using-sass of goal io.github.cleydyr:dart-sass-maven-plugin:1.3.0:compile-sass failed: 
A required class was missing while executing io.github.cleydyr:dart-sass-maven-plugin:1.3.0:compile-sass: org/apache/commons/io/build/AbstractStreamBuilder

I think you need to upgrade to 2.15.1: https://commons.apache.org/proper/commons-io/

Add classpath to loadPath

The libsass-maven-plugin plugin has the option to allow classpath resources to be used as imports:

@import "META-INF/resources/webjars/bootstrap-sass/assets/stylesheets/bootstrap/variables";

This functionality was provided by ClasspathAwareImporter.java.

Is it possible to add similar functionality to the dart-sass-maven-plugin?

My current workaround is to have maven-dependency-plugin extract some dependencies into a directory and add that directory as loadPath.

Option to ignore css Files

Hi,

i have problems that sass won't compile my css Files (Error: Interpolation isn't allowed in plain CSS) but it is not needed to compile css!
Is it possible to add an extra option to ignore css Files? Or maybe support of * in inputFolder like src/main/webapp/resources/**/*.scss?

Thanks
Daniel

noSourceMap isn't working

This plugin is wonderful!

I'm using <noSourceMap>true</noSourceMap> but a source map is still being generated.

It's being executed through Eclipse using org.eclipse.m2e:lifecycle-mapping but the other settings I have are being honored.

                <configuration>
                    <inputFolder>${project.basedir}/src/main/resources/sass/</inputFolder>
                    <noSourceMap>true</noSourceMap>
                    <outputFolder>${project.basedir}/src/main/resources/static/css/</outputFolder>
                    <style>EXPANDED</style>
                    <update>true</update>
                </configuration>

Process exiting with code 64

Hi,

I'm trying to replace EOL sass-maven-plugin with your dart-sass-maven-plugin but cannot seem to get it to compile, instead it crashes with following exception:

Can't execute SASS command
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can't execute SASS command
    at com.github.cleydyr.maven.plugin.CompileSassMojo.execute (CompileSassMojo.java:208)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
Caused by: com.github.cleydyr.dart.command.exception.SassCommandException: Process exited with code 64

My current setup for the plugin is:

           <plugin>
                <groupId>io.github.cleydyr</groupId>
                <artifactId>dart-sass-maven-plugin</artifactId>
                <version>0.1.0</version>
                <executions>
                    <execution>
                        <id>generate-css-using-sass</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>compile-sass</goal>
                        </goals>
                        <configuration>
                            <inputFolder>${basedir}/src/main/resources</inputFolder>
                            <outputFolder>${project.build.directory}/resources/css/sassy</outputFolder>
                            <loadPaths>
                                <path>${project.build.directory}/source-sass</path>
                            </loadPaths>
                            <update>true</update>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Since I am using unpacked webjars bootstrap and trying to extend its scss files I need to load additional path into the execution for the @imports to work. This seems to work fine with locally installed dart-sass with same inputs.

Any suggestions/ideas? Is this bug in the plugin or am I doing something wrong here?

noSourceMap option cannot be set -- no error message

When setting noSourceMap option, the build fails because AbstractSassCommand also passes --source-map-urls option to the executable. It returns with exit code 64 with no other error message in the log.

To get to what its problem was I had to debug the plugin to get the executed command, and call it from command line to see the actual error message returned by the executable. It seems that the error message is printed on the standard out (along with the usage instructions).

Please note I'm on Apple Silicon. Maybe Windows handles the process outputs differently.

[0.2.0] - Null Pointer Exception

Caused by: java.lang.NullPointerException at java.util.Objects.requireNonNull (Objects.java:221) at java.nio.file.Files.copy (Files.java:3035) at com.github.cleydyr.dart.system.io.PosixDartSassExecutableExtractor.extract (PosixDartSassExecutableExtractor.java:34) at com.github.cleydyr.maven.plugin.CompileSassMojo.extractExecutable (CompileSassMojo.java:236) at com.github.cleydyr.maven.plugin.CompileSassMojo.execute (CompileSassMojo.java:198) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289) at org.apache.maven.cli.MavenCli.main (MavenCli.java:193) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

[enhancement] support maven proxy settings

It looks like the plugin is not using maven proxy settings when trying to download sass from Github.
We added explicit proxy settings to a Bamboo maven task, now sass is cached.

Best regards and thanks for this plugin.

Allow use of `sass` executable found in PATH for offline usage

It could be useful for offline mode and air-gapped developers to allow the plugin to use the sass executable to be found in PATH instead of downloading or maintaining a <cachedFilesDirectory>

Could this be implement with an additional parameter or as a default failsafe behaviour?

Filename question

How can I specify the target filename?

My source file is application.scss and the final file becomes application.css.

I want to control the output name to become application.min.css.

Thread Safe and Update

@cleydyr just a couple of things.

  1. I see this warning in my Parrallel execution of tests but I am not having any issues just thought you should know.
Warning:  *****************************************************************
Warning:  * Your build is requesting parallel execution, but this         *
Warning:  * project contains the following plugin(s) that have goals not  *
Warning:  * marked as thread-safe to support parallel execution.          *
Warning:  * While this /may/ work fine, please look for plugin updates    *
Warning:  * and/or request plugins be made thread-safe.                   *
Warning:  * If reporting an issue, report it against the plugin in        *
Warning:  * question, not against Apache Maven.                           *
Warning:  *****************************************************************
Warning:  The following plugins are not marked as thread-safe in PrimeFaces Showcase:
Warning:    io.github.cleydyr:dart-sass-maven-plugin:0.3.0
Warning:  
Warning:  Enable debug to see precisely which goals are not marked as thread-safe.
Warning:  *****************************************************************
  1. I wonder if we should update to the latest Dart SASS Exe's?

  2. Finally I have been using this for months without issue maybe time for a 1.0.0 release?

Plugin started hanging since version 1.2.0

After a while after using version 1.2.0 of the plugin, I was no longer able to build my project since the plugin stucks after "Auto-detected operating system architecture: x64". The only way to build my project was to go back to version 1.1.0.
I experienced this problem in different projects on a Linux machine and on Windows. Running the build with -X gives no further output.

Mark plugins goals as thread-safe, if possible

Users may get this warning when requesting a parallel execution:

Warning:  *****************************************************************
Warning:  * Your build is requesting parallel execution, but this         *
Warning:  * project contains the following plugin(s) that have goals not  *
Warning:  * marked as thread-safe to support parallel execution.          *
Warning:  * While this /may/ work fine, please look for plugin updates    *
Warning:  * and/or request plugins be made thread-safe.                   *
Warning:  * If reporting an issue, report it against the plugin in        *
Warning:  * question, not against Apache Maven.                           *
Warning:  *****************************************************************
Warning:  The following plugins are not marked as thread-safe in PrimeFaces Showcase:
Warning:    io.github.cleydyr:dart-sass-maven-plugin:0.3.0
Warning:  
Warning:  Enable debug to see precisely which goals are not marked as thread-safe.
Warning:  *****************************************************************

The goal of this issue is to mark the plugin goals as thread-safe if possible and document this feature regardless of the result.

Source: #21

Build: mvn clean package fails

I checked out your project and ran mvn clean package and its failing. Full log attached:
failure.txt

Apache Maven 3.8.5
Maven home: C:\Tools\apache-maven-3.8.1\bin..
Java version: 11.0.10, vendor: AdoptOpenJDK, runtime: C:\Tools\jdk-11.0.10
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-cli) on project dart-sass-maven-plugin: Failed to clean project: Failed to delete C:\dev\melloware-git\dart-sass-maven-plugin\target\surefire\surefirebooter3636085958289191551.jar -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-cli) on project dart-sass-maven-plugin: Failed to clean project: Failed to delete C:\dev\melloware-git\dart-sass-maven-plugin\target\surefire\surefirebooter3636085958289191551.jar
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

Permission Denied when executing

We have issue that when running the plugin on our build server it no longer works due to following error:
Caused by: java.io.IOException: Cannot run program "/tmp/dart-sass-maven-plugin/linux/x64/1.69.3/sass": error=13, Permission denied

Currently running on version 1.1.0 but this worked in 0.3.0 - have not tried verisons in between.

Is this something that can be fixed in the plugin or is it configuration issue?

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.