Comments (13)
Works exactly like the old plugin now but WAY faster. Thanks again for your great work.
from dart-sass-maven-plugin.
Hey, @melloware. Can you post the relevant configuration section of your pom.xml file so that I can check it out?
from dart-sass-maven-plugin.
Sure its right here: https://github.com/primefaces/primefaces/blob/master/primefaces-showcase/pom.xml
from dart-sass-maven-plugin.
Ok. So, I guess by invoking mvn io.github.cleydyr:dart-sass-maven-plugin:0.2.0:watch-sass
directly maven is not supposed to get the configuration from your pom.xml. Or is it?
from dart-sass-maven-plugin.
that is how sass:watch
worked in the old plugin. It used your pom.xml config for the watch.
from dart-sass-maven-plugin.
I see that if you put the configuration inside a specific execution, you'll have to specify the execution id when calling the plugin. So, in your case it should be dart-sass:watch-sass@generate-css-using-sass
. If you simply call dart-sass:watch-sass
(or its fully qualified equivalent), then only the general plugin config will be read.
Does it make sense?
from dart-sass-maven-plugin.
Yep that works. Can you update the readme I don't think others would figure that out!
from dart-sass-maven-plugin.
Isn't it the the expected Maven behavior?
from dart-sass-maven-plugin.
so i am just going on the old Ruby sass plugin where once it was configured in the pom.xml you could run sass:watch
or sass:compile
and both used the plugins values from the pom.xml regardless of execution cycle.
I look at it as the plugin is configured in the pom.xml. It has a default lifecycle but any calls to the plugin should execute based on the configuration in the pom.xml by default. I thought that is is how most Maven plugins work?
from dart-sass-maven-plugin.
I've checked https://maven.apache.org/pom.html and the executions example corroborates my hypothesis.
Consider this sample:
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>echodir</id>
<goals>
<goal>run</goal>
</goals>
<phase>verify</phase>
<inherited>false</inherited>
<configuration>
<tasks>
<echo>Build Dir: ${project.build.directory}</echo>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
If I add it to a project's pom.xml, then execute antrun:run
the echo task is not executed, while if I execute antrun:run@echodir
, then the echo task is executed.
Is there something I'm missing in this case?
from dart-sass-maven-plugin.
Hmmm so this was the plugin configuration we used before switching to your plugin...
<plugin>
<groupId>nl.geodienstencentrum.maven</groupId>
<artifactId>sass-maven-plugin</artifactId>
<version>3.7.2</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>update-stylesheets</goal>
</goals>
</execution>
</executions>
<configuration>
<sassSourceDirectory>${basedir}/src/main/webapp/resources/showcase/css</sassSourceDirectory>
<destination>${basedir}/src/main/webapp/resources/showcase/css</destination>
<sassOptions>
<always_update>true</always_update>
<sourcemap>:none</sourcemap>
</sassOptions>
</configuration>
</plugin>
Same as yours has an execution and goals. However if I ran mvn sass:watch
it watched the correct directory using the plugin's config.
Same is if I run the mvn war:war
plugin it uses the pom.xml even though that has an execution and goals as well. It builds the war based on the pom.xml config.
from dart-sass-maven-plugin.
The issue is not having an execution. The issue is having an execution X, putting the plugin configuration inside that execution X and then invoking the plugin without specifying the execution X. Notice that your old plugin configuration was outside the execution.
from dart-sass-maven-plugin.
HA i didn't even noticed that I cut and pasted your example. I just moved it outside of the execution and it works!
Whoops!
from dart-sass-maven-plugin.
Related Issues (20)
- [0.2.0] - Null Pointer Exception HOT 9
- Thread Safe and Update HOT 5
- Mark plugins goals as thread-safe, if possible HOT 1
- Update executables with latest Dart Sass release HOT 5
- Option to ignore css Files HOT 5
- File counter may give incorrect results if input folder and output folder are the same and there's at least one css file on the input folder HOT 1
- Add classpath to loadPath HOT 5
- noSourceMap isn't working HOT 2
- Filename question HOT 1
- As a user I'd like to choose the Dart Sass plugin version and have it downloaded automatically HOT 1
- [enhancement] support maven proxy settings HOT 6
- Use fallback when current version is unavailable HOT 7
- Permission Denied when executing HOT 10
- Add Many-to-Many Mode HOT 5
- Plugin started hanging since version 1.2.0 HOT 14
- Support Linux OSes not built with glibc HOT 3
- Commons IO Incompatibility: Missing AbstractStreamBuilder HOT 19
- Use Release tags instead of plain tags to mark new versions HOT 1
- Allow use of `sass` executable found in PATH for offline usage HOT 1
- dart-sass-maven-plugin 1.77.4 is not a Win32 valid application HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dart-sass-maven-plugin.