google-code-export / wro4j

Automatically exported from code.google.com/p/wro4j
1 stars 1 forks source link

Css url rewriting issue on *nix with maven plugin #718

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Reported by a user (more details can be found on mailing list thread: 
https://groups.google.com/forum/?fromgroups=#!topic/wro4j/xZdiq8Gpvl0):

I'm using build 1.6.3 of the plugin and it's still writing the URL's wrong only 
on Mac & Linux systems. Windows (my local) works fine, but *nix based systems 
add way too many ../ items to the url()... like so:

My windows build: 
url(../style/images/default.png)

Remote linux build / A buddy's Mac local build:
url(../../../../style/images/default.png)

Here's my configuration:

<groupId>ro.isdc.wro4j</groupId>
                <artifactId>wro4j-maven-plugin</artifactId>
                <version>1.6.3</version>
                <configuration>
                    <minimize>true</minimize>
                    <cssDestinationFolder>${project.build.directory}/classes/jcr_root/include/style</cssDestinationFolder>
                    <jsDestinationFolder>${project.build.directory}/classes/jcr_root/include/script</jsDestinationFolder>
                    <contextFolder>${basedir}/src/main/content/jcr_root/include/</contextFolder>
                    <wroFile>${basedir}/wro.xml</wroFile>
                    <wroManagerFactory>ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory</wroManagerFactory>
                    <extraConfigFile>${basedir}/wro.properties</extraConfigFile>
                    <ignoreMissingResources>false</ignoreMissingResources>
                </configuration>

Just like the original posted, if I change the cssDestinationFolder to the 
source directory it works fine and all the url's come out as ../style. 
<cssDestinationFolder>${basedir}/src/main/content/jcr_root/include/style</cssDes
tinationFolder> That's what I'm using now, but it's certainly not ideal. None 
of these get 'cleaned' and they essentially need 2 builds before it's actually 
updated in the web directory. 

Can you see anything in my config that I have setup wrong? Need any further 
information? Any help would be greatly apreciated, it's a large code structure 
and I'd REALLY rather not have to change all my CSS image references to root 
relative URLs to fix this (over 1000 changes in that case)

Original issue reported on code.google.com by alex.obj...@gmail.com on 13 May 2013 at 6:55