Closed GoogleCodeExporter closed 9 years ago
Have you created a custom WroManagerFactory?
By default, there is a model transformer called
WildcardExpanderModelTransformer which replaces all wildcard occurances, so
this shouldn't be a problem.
I'll try to reproduce the problem and will let you know of my findings.
Original comment by alex.obj...@gmail.com
on 12 Jan 2012 at 5:39
I need more details to reproduce the problem. Can you attach the sample css
files and details about their location? Or even better, checkout the
wro4j-examples project from github and add your changes there, then share your
configuration.
I've tested locally this way:
* created a group with the following resource: css("classpath:ro/isdc/wro/resources/**.css")
* The "ro/isdc/wro/resources/" contains 3 nested css files at different depth
* Each css files contains relative backgrounds.
The outcome is as expected. Cannot reproduce the problem.
Original comment by alex.obj...@gmail.com
on 12 Jan 2012 at 8:50
Thanks for looking in to this. I should have provided more context.
What I do:
I have a dependency on a jar-file which contains images. This jar is available
on the class path. I have bundled all the contents of the jar together.
I have created a small demo to help you debug. I pushed it to GitHub:
https://github.com/ivarconr/wro4j-bug
There is two projects:
- wro4j-jar => adds a folder structure of css/images into a jar.
- wro4j-weapp => depends on the jar from wro4j (added to classpath) and uses
wro4j to bundle them together.
How to test the example:
1. Build the wro4j-jar first:
mvn clean install
2. Start the wro4j-webapp:
mvn jetty:run
3. Check the external external.css in browser:
http://localhost:8080/wro/external.css
Result:
URL for the background images is wrong inside the bundled css:
It shows:
background-image:url(/wro/wroResources?id=classpath:com/app/images/test.png
Correct value should be:
background-image:url(/wro/wroResources?id=classpath:com/app/level1/level2/styles
/images/test.png)
Original comment by ivarc...@gmail.com
on 12 Jan 2012 at 10:03
typo there.. *the jar contains CSS and images*
Original comment by ivarc...@gmail.com
on 12 Jan 2012 at 10:04
I can confirm that the bug can be reproduced. The idea is to have classpath
resources inside a jar. There is a problem with the JarWildcardStreamLocator
implementation which can be fixed.
Original comment by alex.obj...@gmail.com
on 13 Jan 2012 at 9:34
Original comment by alex.obj...@gmail.com
on 7 Feb 2012 at 9:04
Original issue reported on code.google.com by
ivarc...@gmail.com
on 12 Jan 2012 at 5:03