bertramdev / asset-pipeline Goto Github PK
View Code? Open in Web Editor NEWThe core implementation of the asset pipeline for the jvm
The core implementation of the asset pipeline for the jvm
Hi,
I have an angular app made of a main gsp view, and html templates loaded async by angular.
The html templates are located in the grails-app/assets/templates folder.
When I use utf8 in the gsp view, everything works. But when I use utf8 accents (e.g. 'é') in an html asset, and access it with my browser (http://localhost:8080/assets/home.html for example) the files are not utf8-encoded :
The content type of the gsp returned by grails is "text/html;charset=UTF-8" while the one of the html asset is "Content-Type:text/html" : the charset seems to be ignored
Hello,
I am running io.ratpack:ratpack-gradle:1.1.1 and I don't seem to be able to get the plugin(asset-pipeline-gradle:2.4.3) to work. I get a 404 for application.js file.
when I use io.ratpack:ratpack-gradle:0.9.18, I don't have this issue. Is there a configuration I am missing when using 1.1.1?
build.gradle gist
https://gist.github.com/javazquez/02e8112864ae1a5da545
ratpack.groovy gist
https://gist.github.com/javazquez/0ad0c1ab72b7270be4bd
thanks,
Juan
If assets in the plugin are stored in a non-default folder (i.e., any folder but "images", "javascripts", or "stylesheets") they can't be accessed from the application that depends on the plugin.
I don't know if this is limited to "inline plugins" or not; I haven't tried packaging and installing the plugin.
Grails documentation for using inline plugins: http://grails.github.io/grails-doc/3.0.x/guide/plugins.html#creatingAndInstallingPlugins
To Reproduce:
> grails create-plugin simplePlugin
> grails create-app simpleApp
> echo include 'simplePlugin', 'simpleApp' > settings.gradle
> mkdir simplePlugin\grails-app\assets\other
Place an image, "image.png", into simplePlugin\grails-app\assets\images
Place an image, "image2.png", into simplePlugin\grails-app\assets\other
Edit simpleApp\build.gradle and add:
dependencies {
compile project(":simplePlugin")
....
}
Edit simpleApp\grails-app\views\index.gsp and add:
<p>
Image from plugin default folder: <img src="${assetPath(src:'image.png')}" /><br />
Image from plugin non-default folder: <img src="${assetPath(src:'image2.png')}" />
</p>
Run the application:
> cd simpleApp
> grails
grails> run-app
Load the default index page: http://localhost:8080/
image.png will load properly, image2.png will return a 404 error.
Grails: 3.0.9
OS: Win 7 64-bit
Java: 1.7
Dependency Report Output:
\--- org.grails.plugins:asset-pipeline: -> 3.0.8
+--- org.mozilla:rhino:1.7R4
\--- com.bertramlabs.plugins:asset-pipeline-core:2.5.0
+--- org.mozilla:rhino:1.7R4
+--- com.google.javascript:closure-compiler:v20141023
| +--- com.google.javascript:closure-compiler-externs:v20141023
| +--- args4j:args4j:2.0.26
| +--- com.google.guava:guava:18.0
| +--- com.google.protobuf:protobuf-java:2.5.0
| +--- com.google.code.gson:gson:2.2.4
| \--- com.google.code.findbugs:jsr305:1.3.9
\--- commons-logging:commons-logging:1.1.1 -> 1.2
I turned on logging for the asset-pipeline but saw nothing enlightening regarding this issue.
I would have attached the example application / plugin, but can't attach zip files.
Hi,
I have a very basic application available here : https://github.com/anthofo/asset-pipeline-bug
This app uses Spring boot + gradle. The app uses Typescript, so I developped a TypeScript processor for asset pipeline.
I'm also using the spring boot asset pipeline plugin.
The problem is that my TypeScriptProcessor is correctly called by the spring boot plugin when I run my app, and the Typescript is compiled to javascript.
But, when I launch the assetCompile task, the TypeScriptProcessor is not called at all and my ts is interpreted like js, which produces an error :
:assetCompile
Processing File 1 of 2 - application.js
Uglifying File 1 of 2 - application
application.unminified.js:2: ERROR - Parse error. ',' expected
constructor(public greeting: string) { }
^
Compressing File 1 of 2 - application
Processing File 2 of 2 - testts.ts
Compressing File 2 of 2 - testts
I also tried to use existing processors such as CoffeeScript and I have exactly the same problem.
So for now, I'm able to use asset pipeline at runtime on dev mode, but I cannot produce a jar :s
I have the following asset structure in a Grails plugin:
images/lib/fonts/glyphicons-halflings-regular.eot
stylesheets/lib/bootstrap/bootstrap.css (references ../fonts/glyphicons-halflings-regular.eot)
stylesheets/lib/bootstrap.css (requires bootstrap/bootstrap.css)
stylesheets/plugin.css (requires lib/bootstrap.css)
If I use the Grails plugin under development mode, the relative font paths are correctly overwritten to work from plugin.css
(e.g. lib/fonts/glyphicons-halflings-regular.eot)
When using grails package
however (I'm assuming com.bertramlabs.plugins:asset-pipeline-gradle:2.5.0
is responsible for this) the paths do not get overwritten and the resulting CSS file references ../fonts/glyphicons-halflings-regular.eot
from plugin.css
which the browser interprets as http://mydomain/fonts/glyphicons-halflings-regular.eot
where it can't find them.
Running java -jar
on the generated war file from grails war
produces the following error when a page is accessed. (Brand new project) It only happens in the war file, doing grails run-app works just fine.
Stack trace
java.lang.NoSuchMethodError: asset.pipeline.AssetPipelineResponseBuilder.getHeaders()Ljava/lang/Object;
at asset.pipeline.AssetPipelineFilter.doFilterInternal(AssetPipelineFilter.groovy:43) ~[asset-pipeline-3.0.1.jar!/:na]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:102) ~[spring-boot-actuator-1.2.4.RELEASE.jar!/:1.2.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:73) ~[grails-web-mvc-3.0.2.jar!/:3.0.2]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67) ~[grails-web-mvc-3.0.2.jar!/:3.0.2]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:68) ~[spring-boot-actuator-1.2.4.RELEASE.jar!/:1.2.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[grailsDispatcherServlet] - Servlet.service() for servlet [grailsDispatcherServlet] in context with path [] threw exception [Filter execution threw an exception] with root cause
java.lang.NoSuchMethodError: asset.pipeline.AssetPipelineResponseBuilder.getHeaders()Ljava/lang/Object;
at asset.pipeline.AssetPipelineFilter.doFilterInternal(AssetPipelineFilter.groovy:43) ~[asset-pipeline-3.0.1.jar!/:na]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:102) ~[spring-boot-actuator-1.2.4.RELEASE.jar!/:1.2.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:73) ~[grails-web-mvc-3.0.2.jar!/:3.0.2]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67) ~[grails-web-mvc-3.0.2.jar!/:3.0.2]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:68) ~[spring-boot-actuator-1.2.4.RELEASE.jar!/:1.2.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[grailsDispatcherServlet] - Servlet.service() for servlet [grailsDispatcherServlet] in context with path [] threw exception [Filter execution threw an exception] with root cause
java.lang.NoSuchMethodError: asset.pipeline.AssetPipelineResponseBuilder.getHeaders()Ljava/lang/Object;
at asset.pipeline.AssetPipelineFilter.doFilterInternal(AssetPipelineFilter.groovy:43) ~[asset-pipeline-3.0.1.jar!/:na]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:102) ~[spring-boot-actuator-1.2.4.RELEASE.jar!/:1.2.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:73) ~[grails-web-mvc-3.0.2.jar!/:3.0.2]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67) ~[grails-web-mvc-3.0.2.jar!/:3.0.2]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:68) ~[spring-boot-actuator-1.2.4.RELEASE.jar!/:1.2.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[grailsDispatcherServlet] - Servlet.service() for servlet [grailsDispatcherServlet] in context with path [] threw exception [Filter execution threw an exception] with root cause
java.lang.NoSuchMethodError: asset.pipeline.AssetPipelineResponseBuilder.getHeaders()Ljava/lang/Object;
at asset.pipeline.AssetPipelineFilter.doFilterInternal(AssetPipelineFilter.groovy:43) ~[asset-pipeline-3.0.1.jar!/:na]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:102) ~[spring-boot-actuator-1.2.4.RELEASE.jar!/:1.2.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:73) ~[grails-web-mvc-3.0.2.jar!/:3.0.2]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67) ~[grails-web-mvc-3.0.2.jar!/:3.0.2]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:68) ~[spring-boot-actuator-1.2.4.RELEASE.jar!/:1.2.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
build.gradle file
buildscript {
ext {
grailsVersion = project.grailsVersion
}
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath 'com.bertramlabs.plugins:asset-pipeline-gradle:2.3.4'
}
}
plugins {
id "io.spring.dependency-management" version "0.5.1.RELEASE"
}
version "0.1"
group "pewpew"
apply plugin: "spring-boot"
apply plugin: "war"
apply plugin: "asset-pipeline"
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: "org.grails.grails-web"
apply plugin: "org.grails.grails-gsp"
ext {
grailsVersion = project.grailsVersion
gradleWrapperVersion = project.gradleWrapperVersion
}
assets {
minifyJs = true
minifyCss = true
}
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
dependencyManagement {
imports {
mavenBom "org.grails:grails-bom:$grailsVersion"
}
applyMavenExclusions false
}
dependencies {
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-dependencies"
compile "org.grails:grails-web-boot"
compile "org.grails.plugins:hibernate"
compile "org.grails.plugins:cache"
compile "org.hibernate:hibernate-ehcache"
runtime "org.grails.plugins:asset-pipeline"
runtime "org.grails.plugins:scaffolding"
compile "com.bertramlabs.plugins:asset-pipeline-core:2.3.4"
// compile "com.bertramlabs.plugins:sass-asset-pipeline:2.3.0"
testCompile "org.grails:grails-plugin-testing"
testCompile "org.grails.plugins:geb"
// Note: It is recommended to update to a more robust driver (Chrome, Firefox etc.)
testRuntime 'org.seleniumhq.selenium:selenium-htmlunit-driver:2.44.0'
console "org.grails:grails-console"
}
task wrapper(type: Wrapper) {
gradleVersion = gradleWrapperVersion
}
| Grails Version: 3.0.2
| Groovy Version: 2.4.3
| JVM Version: 1.8.0_45
I am trying to use errbuddy/babel-asset-pipeline to transpile JSX to JavaScript. I was a little surprised that it wasn't minified by asset-pipeline. Looking at asset.pipeline.AssetCompiler
, it is correctly identifying the file as asset.pipeline.babel.JsxAssetFile
and invoking the asset.pipeline.babel.BabelProcessor
, but because the contentType is 'text/jsx'
, it doesn't get minified. However, asset.pipeline.babel.JsxAssetFile#contentType
is a list and it contains 'application/javascript'
. What if there was a way to have the minify check look to see if the contentType contains 'application/javascript'
? Or a way to customize what will get minified?
I am building my Grails 3 app in an environment that doesn't have access to rubygems.org. So, whenever I try to assemble the project, I get:
ERROR: Could not find a valid gem 'compass' (= 1.0.3), here is why:
Unable to download data from https://rubygems.org/ - Connection reset by peer (https://rubygems.org/specs.4.8.gz)
and several other lines hinting a connectivity issue to rubygems.org.
I do have access to an internal Artifactory instance where the gems are cached. Is there a way to configure asset-pipeline to use the internal repository rather than rubygems.org?
Hi David,
When I checked the source code 'AssetPipelineFilter.groovy', I found 'sdf' is an Filter instance property, but SimpleDateFormat is not thread-safe, so accessing 'sdf' concurrently will encounter multi-thread issues.
code snippets:
class AssetPipelineFilter implements Filter {
public static final String HTTP_DATE_FORMAT = "EEE, dd MMM yyyy HH:mm:ss zzz"
// SimpleDateFormat is not thread-safe,
//FYI http://stackoverflow.com/questions/6840803/simpledateformat-thread-safety
private final SimpleDateFormat sdf = new SimpleDateFormat(HTTP_DATE_FORMAT);
// **getLastModifiedDate invoked concurrently is not thread-safe**
private String getLastModifiedDate(file) {
String lastModifiedDateTimeString = sdf.format(new Date())
try {
lastModifiedDateTimeString = sdf.format(new Date(file?.lastModified()))
} catch (Exception e) {
log.debug("Could not get last modified date time for file", e)
}
return lastModifiedDateTimeString
}
void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
def mapping = 'assets'
def fileUri = request.requestURI
def baseAssetUrl = request.contextPath == "/" ? "/$mapping" : "${request.contextPath}/${mapping}"
if (fileUri.startsWith(baseAssetUrl)) {
fileUri = fileUri.substring(baseAssetUrl.length())
}
def file = applicationContext.getResource("classpath:assets${fileUri}")
if (file.exists()) {
//Do this early so a 304 will still contain 'Last-Modified' in the case that there is a CDN in between client and server
response.setHeader('Last-Modified', getLastModifiedDate(file))
I tried to run a clean grails project locally.
If env is dev everything works fine but if is prod Im getting some errors.
this is my build.gradle
buildscript {
dependencies {
classpath 'com.bertramlabs.plugins:asset-pipeline-gradle:2.3.8'
classpath 'com.bertramlabs.plugins:sass-asset-pipeline:2.3.0'
}
}
assets {
minifyJs = true
minifyCss = true
}
dependencies {
...
runtime "org.grails.plugins:asset-pipeline"
runtime 'com.bertramlabs.plugins:asset-pipeline-core:2.3.8'
runtime "com.bertramlabs.plugins:sass-asset-pipeline:2.3.0"
}
These are the commands that I'm running to test env prod locally
grails prod war [BUILD SUCCESSFUL]
java -Dgrails.env=prod -Dserver.port=8080 -Dserver.host=0.0.0.0 -jar build/libs/grails-test-0.1.jar
Grails application running at http://localhost:8080 in environment: production
Checking in the browser I saw the assets:
<link rel="stylesheet" href="/assets/application-78c0e2ed02a6c387af6ccd2ada2500c1.css"/>
<script src="/assets/application-b9c8d18e6c27efad588bb020ddc3f505.js" type="text/javascript" ></script>
I can't access them via browser.
I'm not sure if I'm missing something. Any help ? thanks in advances
ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[grailsDispatcherServlet] - Servlet.service() for servlet [grailsDispatcherServlet] in context with path [] threw exception [Filter execution threw an exception] with root cause
java.lang.NoSuchMethodError: asset.pipeline.AssetPipelineResponseBuilder.getHeaders()Ljava/lang/Object;
at asset.pipeline.AssetPipelineFilter.doFilterInternal(AssetPipelineFilter.groovy:43) ~[asset-pipeline-3.0.1.jar!/:na]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:102) ~[spring-boot-actuator-1.2.4.RELEASE.jar!/:1.2.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:73) ~[grails-web-mvc-3.0.2.jar!/:3.0.2]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67) ~[grails-web-mvc-3.0.2.jar!/:3.0.2]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:68) ~[spring-boot-actuator-1.2.4.RELEASE.jar!/:1.2.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[grailsDispatcherServlet] - Servlet.service() for servlet [grailsDispatcherServlet] in context with path [] threw exception [Filter execution threw an exception] with root cause
java.lang.NoSuchMethodError: asset.pipeline.AssetPipelineResponseBuilder.getHeaders()Ljava/lang/Object;
at asset.pipeline.AssetPipelineFilter.doFilterInternal(AssetPipelineFilter.groovy:43) ~[asset-pipeline-3.0.1.jar!/:na]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:102) ~[spring-boot-actuator-1.2.4.RELEASE.jar!/:1.2.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:73) ~[grails-web-mvc-3.0.2.jar!/:3.0.2]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67) ~[grails-web-mvc-3.0.2.jar!/:3.0.2]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:68) ~[spring-boot-actuator-1.2.4.RELEASE.jar!/:1.2.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[grailsDispatcherServlet] - Servlet.service() for servlet [grailsDispatcherServlet] in context with path [] threw exception [Filter execution threw an exception] with root cause
java.lang.NoSuchMethodError: asset.pipeline.AssetPipelineResponseBuilder.getHeaders()Ljava/lang/Object;
at asset.pipeline.AssetPipelineFilter.doFilterInternal(AssetPipelineFilter.groovy:43) ~[asset-pipeline-3.0.1.jar!/:na]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:102) ~[spring-boot-actuator-1.2.4.RELEASE.jar!/:1.2.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:73) ~[grails-web-mvc-3.0.2.jar!/:3.0.2]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67) ~[grails-web-mvc-3.0.2.jar!/:3.0.2]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:68) ~[spring-boot-actuator-1.2.4.RELEASE.jar!/:1.2.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[grailsDispatcherServlet] - Servlet.service() for servlet [grailsDispatcherServlet] in context with path [] threw exception [Filter execution threw an exception] with root cause
java.lang.NoSuchMethodError: asset.pipeline.AssetPipelineResponseBuilder.getHeaders()Ljava/lang/Object;
at asset.pipeline.AssetPipelineFilter.doFilterInternal(AssetPipelineFilter.groovy:43) ~[asset-pipeline-3.0.1.jar!/:na]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:102) ~[spring-boot-actuator-1.2.4.RELEASE.jar!/:1.2.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:73) ~[grails-web-mvc-3.0.2.jar!/:3.0.2]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67) ~[grails-web-mvc-3.0.2.jar!/:3.0.2]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:68) ~[spring-boot-actuator-1.2.4.RELEASE.jar!/:1.2.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar!/:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) ~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.23.jar!/:8.0.23]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
Why does http://repo.grails.org/grails/repo/org/grails/plugins/asset-pipeline/ show 2.6.5 / 3.0.9 as the latest versions but on the official grails plugin portal: https://grails.org/plugin/asset-pipeline the version is still 2.5.9?
Are the 2.6.x and 3.0.x versions not stable?
I outlined the problem on StackOverflow, copied here.
I'm running on windows (currently development mode). I've also tested with 2.8.1 (latest on maven) to the same problem.
I have a .scss
file (encoded utf8) with this binary data (this is a specific example, there are more unicode characters in the file):
0xE2809C
Which is the character “
(left-quote).
The file gets included (by @import
directive, not the asset-pipeline directive, but both methods fail to read it correctly) in another file, and when fetching the result, I get this binary data:
0xC3A2E282ACC593
Which are the characters “
Gradle build file has:
buildscript {
...
dependencies {
...
classpath 'com.bertramlabs.plugins:asset-pipeline-gradle:2.7.2'
}
}
...
apply plugin: "asset-pipeline"
...
dependencies {
...
runtime "org.grails.plugins:asset-pipeline"
runtime: 'com.bertramlabs.plugins:sass-asset-pipeline:2.7.2'
...
}
(not sure if there are any other relevant entries)
I made a reproduction case (latest default configurations): Wolvereness/Grails-Sass-Unicode-Test
Solutions that have not worked:
@charset
in either/both files-Dfile.encoding=UTF-8
on grails
or the run-app
command
//=encoding utf-8
at the top of the file(s)I did further investigation, and found that -Dfile.encoding=windows-1252
is being forced as a JVM parameter on my system. However, asset-pipeline should ignore that when the file explicitly specifies @charset
or //= encoding
, and plausibly because of the sass specification that will default to assume utf8 when not otherwise specified.
SomMeri/less4j v1.15.0 has a problem.
additional space in css selector since 1.15.0 #314
@davydotcom
The commit c190ebf you did looks like fix this problem, but v1.15.1 has no effect according to the comment (-> SomMeri/less4j#314 (comment) ).
Could you upgrade less4j to v1.15.2 ?
Before this commit, e.g., in an asset file located at a/b/c/1.html
, the relative URL d/2.html
would be rewritten as ../c/d/2.html
(ignoring cache digests).
After this commit, the URL will remain as d/2.html
.
Maybe there is a reason for the old behavior that I've missed, so maybe this shouldn't be merged into master
...
Hard to come up with a good title for this one, but this is an issue I ran into with my angular template module: https://github.com/craigburke/angular-template-asset-pipeline
This is related to the issue of compound file extensions like tpl.html.
These files ultimate resolve to JS files, but it doesn't work to use require_tree within a JS.
At least for the FileSystemResolver, I tracked down the issue here:
https://github.com/bertramdev/asset-pipeline-core/blob/master/asset-pipeline-core/src/main/groovy/asset/pipeline/fs/FileSystemAssetResolver.groovy#L134
Basically with these files, the mime type ends up being text/html
instead of application/javascript
so they won't be included.
I can work up a pull request for a change to the AssetHelper class so that all potential mime types would be returned from assetMimeTypeForURI, but I wanted to get your opinion before proceeding.
When a plugin defines the asset-pipeline-gradle build dep, plugin apply and an asset closure inside it's build config - a consuming web application breaks when trying to load local assets (less, css, js). The tag renders with <script... application.js> but without the ?compile=false and asking for the resource directly produces a 404.
In the example below the foo.css asset from the plugin is rendered and the background is green, but the parents level assets of application.js and application.css are not processed. I have tried including the excluding the asset-pipeline-gradle from the web project to no avail. It isn't until the plugin project removes the asset-pipeline-gradle reference that everything works.
Example of the issue using grails 3.0.9 and asset-pipeline 2.6.9.
https://github.com/Grails-Plugin-Consortium/asset-pipeline-bug
Cheers.
I would like a file watching based setup that I could hook into asset-pipeline-servlet. This would also be useful for asset-pipeline-gradle. So it would make sense to implement this watcher in asset-pipeline-core. Alternatively as a separate asset-pipeline-watcher module.
In asset-pipeline-servlet, I'm imagining an implementation that works like this:
onFilter
of the servlet filter, check if the watcher is currently processing assets. If it is, block the request.That way, I can just reload the page and have the request block/hang while asset pipeline finishes processing in the background.
I haven't investigated the details yet, so I'm not confident on the implementation details. Looking at asset.pipeline.AssetCompiler, it seems to me that we could write a WatchingAssetCompiler that takes options similar to the AssetCompiler, and creates its own private AssetCompiler that it uses under the hood, and sets up file system watching to invoke the compiler when relevant files change. What do you think about this?
I've never implemented file system watching on the JVM, so I don't have any opinions on what library one would use to back this up. Do you have any opinions?
When these questions are answered, I can get to work on implementing it if that's OK with you!
Hi,
Is it possible to add support for the asset:javascript, asset:stylesheet, etc like you do for GSPs and the grails-asset-pipeline, but for asset-pipeline-spring-boot? Maybe add it as a thymeleaf tag-lib?
Thanks!
Files requested individually are loaded but those requested with require_full_tree are not.
@davydotcom mentioned that this wont work its due to a class loader limitation
Parent Project has no assets overridden, child structure:
child-project/
grails-app/
assets/
javascripts/
application.js
core/
<multiple nested directories>
application.js
//= require_full_tree core
maybe there is a more sensible default which jar tasks are relevant? or some sort of configuration could make sense?
for custom jar tasks (e.g. a pathing jar, source jars, etc.), depending on assetCompile
and having the assets copied into the jar is not very useful.
Need the ability to flag for minification in development environment so that you can test your javascript and css code minified.
I am working on grails 3.0.9
app
..
--assets
-- test1.css
plugin
..
--assets
-- test2.css
-- test3.css
app.war
--assets
-- test1.css
-- test2.css
-- test3.css
--web-Inf
-- plugin.jar
--META-INF
-- test2.css
-- test3.css
Currently when I try to use gradle's continuous build feature I receive the message
./gradlew -t assetCompile
...
Exiting continuous build as no executed tasks declared file system inputs.
http://gradle.org/feature-spotlight-continuous-build/
This would be nice to have in combination with incremental tasks
https://docs.gradle.org/current/userguide/custom_tasks.html#incremental_tasks
Hello there!
I'm currently investigating using asset-pipeline in a stand-alone app where I don't want to use the "default" servlet to serve files.
I found these two filters:
https://github.com/bertramdev/asset-pipeline/blob/rel-2.6.9/asset-pipeline-spring-boot/src/main/groovy/asset/pipeline/springboot/AssetPipelineFilter.groovy
https://github.com/bertramdev/asset-pipeline/blob/rel-2.6.9/asset-pipeline-spring-boot/src/main/groovy/asset/pipeline/springboot/AssetPipelineDevFilter.groovy
They do exactly what I want, but I'm not able to use them since I don't use spring-boot.
The dev filter can be made to work simply by removing the line in init()
that calls into WebApplicationContextUtils
- the return value is not used for anything.
The normal filter also uses WebApplicationContextUtils
but it doesn't seem to use the resulting applicationContext
for much. So it shouldn't be too much work to turn that into an abstract class or something, and put it in asset-pipeline-core, or maybe create a new asset-pipeline-servlet project.
I can contribute a pull request for this, but I thought I'd discuss it with you first, to see if this is something you'd be interested in!
I'm trying to generate war file and I'm getting
Caused by: org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- jruby/java
at asset.pipeline.sass.SassProcessor.<init>(SassProcessor.groovy:56)
at asset.pipeline.AbstractAssetFile.processedStream(AbstractAssetFile.groovy:159)
at asset.pipeline.DirectiveProcessor.fileContents(DirectiveProcessor.groovy:307)
at asset.pipeline.DirectiveProcessor.loadContentsForTree(DirectiveProcessor.groovy:129)
at asset.pipeline.DirectiveProcessor.loadContentsForTree(DirectiveProcessor.groovy:124)
at asset.pipeline.DirectiveProcessor.compile(DirectiveProcessor.groovy:67)
at asset.pipeline.AssetCompiler.compile(AssetCompiler.groovy:147)
at asset.pipeline.gradle.AssetCompile.compile(AssetCompile.groovy:176)
When I'm running the app everything is fine.
We have Handlebars templates and Javascripts that rely on the LinkGenerator's createLink method to generate the link based on the environment.
We have this working in development mode by implementing a custom Processor, and doing a regex replacement for ${createLink( {{map }} ):
class JsLinkProcessor implements Processor {
@Autowired
LinkGenerator linkGenerator
String process(String inputText, AssetFile assetFile) {
inputText = inputText.replaceAll(regex, { all, params ->
def list = Eval.me("[$params]")
try {
def link = linkGenerator.link(list)
log.warn("Generated link $link for $all in file $assetFile.name")
link
} catch (Exception e) {
log.warn("Failed to generate link for $all and $params in file $assetFile.name: $e")
throw e;
}
})
...
In production mode, the processor doesn't seem to be invoked at all and none of the links are being replaced.
Is there a way to get the assets to run through the processor in Production mode?
Thanks for any assistance.
The CSS file for the Leaflet library contains a peculiar piece of CSS that throws java.lang.StackOverflowError (no error message)
while processing the assets.
I've narrowed the problem down to this single line of CSS: behavior: url(#default#VML);
It's a Microsoft proprietary extension (I had to look it up) and my guess is that the URL replacement algorithm goes into some cycle while trying to resolve a local file. Quoting the contents of the url
statement did not help and neither did commenting the whole line out. Removing the leading #
prevents the exception, however.
Version used was asset-pipeline:3.0.7
I'm trying to establish a shared set of LESS mixins that can be consumed by multiple subprojects in a multi project Gradle setup.
As an example, there are two Gradle subprojects, A and B.
Should LESS files from A be able to reference mixins from B?
Here's the relevant info:
A/A.gradle
apply plugin: "com.bertramlabs.asset-pipeline"
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.6.9"
}
}
assets {
minifyJs = true
minifyCss = true
excludes = ['**/_*.less']
from "$projectDir/src/less"
from "$rootDir/B/src/assets/shared-styles"
}
A/src/less/example.less
@import (reference) "../../../B/src/assets/shared-styles/_palette.less";
body {
background-color: @purple;
}
B/src/assets/shared-styles/_pallete.less
@purple: #5a2a6b;
./gradlew assetCompile -s
Caused by: java.lang.RuntimeException: File was not sourced from the same ScanDirectory D:\projects\demo\B\src\assets\shared-styles\_palette.less scanDir: D:\projects\demo\A\src\less
at asset.pipeline.fs.FileSystemAssetResolver.relativePathToResolver(FileSystemAssetResolver.groovy:166)
at asset.pipeline.fs.AbstractAssetResolver.resolveAsset(AbstractAssetResolver.groovy:77)
at asset.pipeline.fs.FileSystemAssetResolver.getAsset(FileSystemAssetResolver.groovy:77)
at asset.pipeline.fs.AssetResolver$getAsset$0.call(Unknown Source)
at asset.pipeline.AssetHelper.fileForUri(AssetHelper.groovy:48)
at asset.pipeline.AssetHelper$fileForUri$3.call(Unknown Source)
at asset.pipeline.less.AssetPipelineLessSource.relativeSource(AssetPipelineLessSource.groovy:51)
A Grails application that uses the asset-pipeline cannot be run in a web container running on Java 6. However, the requirement for Java 7 seems to originate from processes that are performed at the stage of building a WAR file (e.g the file glob-bing in FileSystemAssetResolver. The release notes also mention the closure compiler as needing java 7; again, a pre-processing step)
When a few non-essential Java 7 constructs (e.g the usage of the diamond operator in Urls.java) are taken out, it seems to me on quick inspection that a separate jar file could be constructed that cannot be used to pre-process any assets, but that only contains the functionality needed by the Grails application running in the web container. This jar could then be compiled at the Java 6 language level, and could be included in a WAR instead of the (current) asset-pipeline-core-2.6.7.jar.
This is important, as one generally has no control over the Java version customers are running on their web server, so Java 7 requirement can cause problems. Of course, there is no problem to conform to the Java 7 requirement at the pre-processing/WAR production stage.
We want be able to pass additional params to directive.
But here
Passed only first agrument. Was it intentional? If we pass directive.trim()
instead of unprocessedArgs[0]
it shouldn't affect current plugins. But inside custom plugin we can split this string and extract arguments
You raising here https://github.com/bertramdev/asset-pipeline-core/blob/master/asset-pipeline-core/src/main/groovy/asset/pipeline/AssetCompiler.groovy#L226 common event. Better raise distinct event e.g. "AssetsProcessed" so we can hook and do custom post-post-process.
It even can looks like:
grails.war.resources = { stagingDir ->
whatever(gant: task, we: want)
}
MyApp > pluginOne > pluginTwo
I have my fonts folder inside pluginTwo. I add the above setting but no help. My system can't recognize the fonts :(
pluginTwo
- grails-app
-assets
-fonts
-fontawesome-webfont.eot
-stylesheets
-sample.css
I found following setting to be ad for for plugin but adding it inside application.groovy dosen't made any difference.
grails.assets.plugin.”plugin-name”.includes=[“fonts/*”]
This works in grails 2.4 and above as I tested 2.4.3 but broken in 3..
I took help from following blogs
http://www.technologyscout.net/2015/07/adding-assets-in-grails-3/
http://davydotcom.com/blog/2015-01-29-grails-3-0-0-m1-asset-pipeline-tips-tricks
On all my developer machines (MacOS+JDK8u66), I am able to build just fine. However on 2 different jenkins servers (CentOS+JDK8u66), I'm getting this error
08:32:54.182 [ERROR] [org.gradle.BuildExceptionReporter] > File was not sourced from the same ScanDirectory /home/jenkins/workspace/MK_CL/src/assets/bower/bower_components/bootstrap/less/bootstrap.less scanDir: /home/jenkins/workspace/MK_CL/src/assets/images
Is there a way to debug this further besides enabling --debug
in gradle?
Am I not reading the error message correctly?
Edit: I got my jenkins to build that codebase on a Mac, and everything's fine. I also ran it without jenkins on a CentOS instance and still see it fail.
The documentation explains how to use deferred scripts, and shows the following example
<asset:javascript src="application.js" asset-defer/>
<asset:script type="text/javascript">
console.log("Hello World");
</asset:script>
Using this syntax in Grails 3 will throw an exception in the GSP
Class
org.grails.taglib.GrailsTagException
Message
Request processing failed; nested exception is java.lang.RuntimeException: Error initializing GroovyPageView
Caused by
[grails-app\views\public\contact.gsp:127] Expecting '=' after attribute name (src="public/contact.js" asset-defer).
Around line 127 of grails-app\views\public\contact.gsp
<asset:javascript src="public/contact.js" asset-defer/>
Trace
Line | Method
->> 212 | createGroovyPageView in org.grails.web.servlet.view.GroovyPageViewResolver
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 192 | createGrailsView in ''
| 97 | loadView . . . . . . in ''
| 36 | loadView in grails.plugin.scaffolding.ScaffoldingViewResolver
| 244 | createView . . . . . in org.springframework.web.servlet.view.AbstractCachingViewResolver
Java's file globbing leaves much to be desired. For instance, it isn't possible to say "include x/** except for x/bad/**". This can be handled by letting PathMatcher take regular expressions (currently PathMatcher is hardcoded to 'glob:') or by adding a third filter so the precedence given as "exclude X, except include Y, except exclude Z" (currently it's X and Y in that order).
Z could be a regex filter, which makes it completely backwards-compatible. Alternately, checking X/Y for glob:
/ regex:
and defaulting to the former is pretty easy and not out of line with the check for a leading **/
that is already there.
Have any thoughts on this?
I'd like to add support for an explicit marker to rewrite URLs in assets.
I have some assets that will be easier to reference via absolute URLs, and AP currently only rewrites relative URLs; it doesn't rewrite absolute URLs.
I'm working on this in a branch in my AP fork.
I will also include some minor modifications that should improve the existing AP Processor code (factoring out duplicate code, simplifying & hopefully speeding up regex matching, properly handling URL etc.).
I'll create a pull request once the code is ready.
I propose to still rewrite relative URLs in both css & html files as before. I'll probably add URL rewriting capability for js files, too, if you don't mind.
The new code will also rewrite any URL that begins with "asset:", regardless if it's relative or absolute.
If the URL following "asset:" is:
How should URL schemes for relative URLs be handled? (e.g., in an asset file located at http://host/path/asset.html
, there is a relative URL like ftp:this/is/a/relative/path
; I ignore cache digests for these examples)
If no base URL has been specified, then I imagine that we could use the hostname of the asset file, and make the path relative to the path of the referring file. We could use the scheme from the relative URL (in the case of the example, the rewritten URL will be ftp://host/path/this/is/a/relative/path
).
The only problem is if a base URL has been specified and it has a scheme (e.g., http://cdn/base/path
). Can we replace the scheme from the base URL with the scheme from the relative URL (so, for the example, we'd use ftp://cdn/base/path/this/is/a/relative/path
)?
In the future, if you want to allow AP to be separately configured to enable / disable relative URL rewriting, and to enable / disable "asset:" scheme URL rewriting, I'll leave that config setup to you.
Coffeescript sourcemaps are not created, so the sources are not available in the browser developer tools
It would appear that setting the following in a plugin's config does not get picked up from an application. You have to directly add this to your application level config. Other non-asset-pipeline config properties are read just fine from the plugin's application.yml
grails:
assets:
mapping: foo-assets
We are migrating from grails 2.4 to 3.0.8
Main app > plugin 1 > plugin 2 > plugin 3
where plugin 1 has dependency on plugin 2 and plugin 2 has dependency on plugin 3
assests exist in main project and plugin 3. (js, css and less)
buildscript {
ext {
grailsVersion = project.grailsVersion
}
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath 'com.bertramlabs.plugins:asset-pipeline-gradle:2.6.2'
classpath 'com.bertramlabs.plugins:less-asset-pipeline:2.6.2
}
}
....
....
apply plugin: 'asset-pipeline'
...
...
assets {
minifyJs = false
minifyCss = false
excludes = ['/less/*.less', '/mixin/.less','/.svn/','__/examples/*']
includes = ['bootstrap.less']
configOptions = [
less: [
compiler: 'less4j'
]
]
}
dependencies {
...
...
runtime "org.grails.plugins:asset-pipeline"
...
...
}
When I run the app in development mode I can see it compiles all the assets from plugin. But it does not compile any asset from app. Which results in not recognizing assets from app at runtime.
Observations:
Running run-app run task assetCompile only on plugin not on app.
Running package command executes task assetCompile on plugin as well as on app. Which copies assets twice inside app.jar and inside plugin.jar.
While trying to fix failing tests in angular-asset-pipeline-plugin
by @craigburke in Windows platform, I came across GenericAssetFile
used in the plugin.
/
is used as path separator in this class. This was causing tests to fail in windows because \
being the file separator in Windows.
Should it (GenericAssetFile
) be modified to use File.separator
in order to make the implementation OS agnostic? I found out this was the reason tests we failing for angular-asset-pipeline plugin.
Here is the related line for failing test and here is the PR submitted to fix it by bypassing call to GenericAssetFile
I have been migrating a large legacy grails codebase to grails 3.x. There are over 3500 assets (note: I inherited this, not my fault) and when I run gradle assetCompile
it fails with "Too many open files in system". It appears that something is not closing the file streams after a file has been written.
I have a gist with the stacktrace if that is helpful. I am using gradle 2.11, with asset-pipeline-gradle 2.6.9, grails 3.0.14 on a Mac.
When I run:
sysctl kern.maxfiles; sysctl kern.maxfilesperproc; ulimit -a
I get:
kern.maxfiles: 12288
kern.maxfilesperproc: 10240
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 10240
pipe size (512 bytes, -p) 1
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 709
virtual memory (kbytes, -v) unlimited
Has anyone tried to use this with maven and succeeded?
Whilst firefox works well Chrome can't find libraries minified into js file, such as jquery, my customize js files and so on.
If I try to load file directly by url like this http://localhost:8080/assets/globalGraph-1c26099dbd37df815cc8204dd205999e.js Chrome shows something like that:
//# sourceMappingURL=globalGraph.js.map
References issue #62
Upgrading plugin from version 2.2.3 to 2.2.4 results in an java.lang.NoSuchMethodError
exception in my Grails project (downgrading back to 2.2.3 resolves the problem).
The error occurs when the first web page is loaded.
$ grails run-app
Download https://repo1.maven.org/maven2/com/bertramlabs/plugins/asset-pipeline-gradle/2.2.4/asset-pipeline-gradle-2.2.4.pom
Download https://repo1.maven.org/maven2/com/bertramlabs/plugins/asset-pipeline-core/2.2.4/asset-pipeline-core-2.2.4.pom
Download https://repo1.maven.org/maven2/com/bertramlabs/plugins/asset-pipeline-gradle/2.2.4/asset-pipeline-gradle-2.2.4.jar
BUILD SUCCESSFUL
Total time: 8.49 secs
Download https://repo1.maven.org/maven2/com/bertramlabs/plugins/asset-pipeline-core/2.2.4/asset-pipeline-core-2.2.4.jar
:compileJava UP-TO-DATE
:compileGroovy UP-TO-DATE
:processResources
:classes
:findMainClass
:bootRun
objc[13820]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
Grails application running at http://localhost:8080 in environment: development
ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[grailsDispatcherServlet] - Servlet.service() for servlet [grailsDispatcherServlet] in context with path [] threw exception [Filter execution threw an exception] with root cause
java.lang.NoSuchMethodError: asset.pipeline.AssetPipelineConfigHolder.getManifest()Ljava/util/Properties;
at asset.pipeline.AssetPipelineFilter.doFilterInternal(AssetPipelineFilter.groovy:28) ~[asset-pipeline-3.0.1.jar:na]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:102) ~[spring-boot-actuator-1.2.4.RELEASE.jar:1.2.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:73) ~[grails-web-mvc-3.0.2.jar:3.0.2]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
at org.grailslters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67) ~[grails-web-mvc-3.0.2.jar:3.0.2]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) ~[spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:68) ~[spring-boot-actuator-1.2.4.RELEASE.jar:1.2.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) ~[tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat-embed-core-8.r:8.0.23]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478) [tomcat-embed-core-8.0.23.jar:8.0.23]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.23.jar:8.0.23]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
> Building 83% > :bootRun
My environment is:
Darwin Blade.local 14.3.0 Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
Grails Version: 3.0.2
Groovy Version: 2.4.3
JVM Version: 1.8.0_45
Dear Author:
I want use asset-pipeline in my springBoot web application ,do you have
some idea or suggestion to me? I hope get your help.thank
The easiest way to achieve this will be call grails.assets.url
closure and if it return null fallback to default mechanism
Hi, not sure if this is a known issue here or in the grails-asset-pipeline project. I have a multiproject Gradle (2.10) build that has multiple Grails subprojects, app1 and app2. I added an app1-dummy-stylesheet.css in app1, and an app2-not-empty-stylesheet.css in app2.
When I build the whole project, app1 will be built first then app2. But when I look at the logged messages on the console, I see this:
...
Compressing File 18 of 24 - jquery-2.1.3
Processing File 19 of 24 - app1-dummy-stylesheet.css
Minifying File 19 of 24 - app1-dummy-stylesheet
Compressing File 19 of 24 - app1-dummy-stylesheet
Processing File 20 of 24 - application.css
Minifying File 20 of 24 - application
Compressing File 20 of 24 - application
Processing File 21 of 24 - errors.css
Minifying File 21 of 24 - errors
Compressing File 21 of 24 - errors
Processing File 22 of 24 - main.css
Minifying File 22 of 24 - main
Compressing File 22 of 24 - main
Processing File 23 of 24 - mobile.css
Minifying File 23 of 24 - mobile
Compressing File 23 of 24 - mobile
Processing File 24 of 24 - app2-not-empty-stylesheet.css
Minifying File 24 of 24 - app2-not-empty-stylesheet
Compressing File 24 of 24 - app2-not-empty-stylesheet
Finished Precompiling Assets
:app2:buildProperties
...
The stylesheet from app1 is added to app2. I checked the generated app2 war file, the app1 stylesheet is in there.
If this is an expected behavior, is there a work around to keep other assets from being added to the succeeding subproject builds?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.