Closed tveimo closed 2 years ago
I'm thinking this is an issue with the specific class loaders used in my deployment setup, running with embedded tomcat spun off with spring boot inside intellij.
Looks like AssetSpecLoader is loaded by org.springframework.boot.devtools.restart.classloader.RestartClassLoader while SassAssetFile is loaded by jdk.internal.loader.ClassLoaders.AppClassLoader.
Removing this line from build.gradle fixes it;
implementation 'org.springframework.boot:spring-boot-devtools:2.6.12'
which unfortunately has other side effects. But will close this issue with this comment.
Just for completeness for others having the same issue, it's possible to still use spring boot devtools if the following line is added to META-INF/spring-devtools.properties;
restart.include.sass-dart=/sass-dart-asset-pipeline-.+.jar
I am getting this error, so am unable to use sass-dart. No css is generated resulting in a 404;
WARN asset.pipeline.AssetSpecLoader.invoke(104) [] Asset specification asset.pipeline.dart.SassAssetFile not registered because it does not implement the AssetFile interface
Am unsure which details to provide to help resolve this?
Setting developmentRuntime to false doesn't get rid of the warning, but at least the css is compiled.
build.gradle;
buildscript { repositories { maven { url 'https://jitpack.io' } mavenCentral() } dependencies { classpath 'com.bertramlabs.plugins:asset-pipeline-gradle:3.4.6' classpath 'com.bertramlabs.plugins:less-asset-pipeline:3.4.6' classpath 'com.bertramlabs.plugins:sass-dart-asset-pipeline:3.4.6' classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.6.11' } }
plugins { id 'org.springframework.boot' version '2.6.11' id 'java' id 'com.github.node-gradle.node' version '3.1.1' }
apply plugin: 'war' apply plugin: 'io.spring.dependency-management' apply plugin: 'com.bertramlabs.asset-pipeline'
version = '0.2-SNAPSHOT' sourceCompatibility = '11'
task processPackageResources(type: Copy) { duplicatesStrategy = 'include' }
springBoot { buildInfo() }
assets { minifyJs = true minifyCss = true enableSourceMaps = true
/ sass: [ quietDeps: false, outputStyle: 'compressed' ] ]
}
repositories { maven { url 'https://jitpack.io' } mavenCentral() }
configurations { all { exclude group: 'com.google.collections', module: 'google-collections' exclude group: 'commons-logging', module: 'commons-logging' exclude group: 'log4j', module: 'log4j' exclude group: 'com.google.guava', module: 'guava-jdk5' exclude group: 'com.vaadin.external.google', module: 'android-json' } dev }
dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs')
[...] }